| 306 | } |
| 307 | |
| 308 | string DebugString(const nvinfer1::DataType trt_dtype) { |
| 309 | switch (trt_dtype) { |
| 310 | case nvinfer1::DataType::kFLOAT: |
| 311 | return "kFLOAT"; |
| 312 | case nvinfer1::DataType::kHALF: |
| 313 | return "kHALF"; |
| 314 | case nvinfer1::DataType::kINT8: |
| 315 | return "kINT8"; |
| 316 | case nvinfer1::DataType::kINT32: |
| 317 | return "kINT32"; |
| 318 | default: |
| 319 | return "Invalid TRT data type"; |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | string DebugString(const nvinfer1::Dims& dims) { |
| 324 | string out = StrCat("nvinfer1::Dims(nbDims=", dims.nbDims, ", d="); |