error in data types
@lanluo-nvidia is already working on this.
Since Jul 19, 2025.
- Dominant language
- Python
- Stars
- 3k
- Forks
- 410
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 78
Description
i have got those errors during build from scratch using cmake
~/projects/m.tarek_master/packages/TensorRT/build$ make -j20
[ 1%] Built target core_util_logging
[ 2%] Building CXX object core/util/CMakeFiles/core_util.dir/trt_util.cpp.o
In file included from /home/cplus/projects/m.tarek_master/packages/TensorRT/core/util/trt_util.cpp:1:
/home/cplus/projects/m.tarek_master/packages/TensorRT/core/util/trt_util.h: In function ‘std::ostream& nvinfer1::operator<<(std::ostream&, const nvinfer1::DataType&)’:
/home/cplus/projects/m.tarek_master/packages/TensorRT/core/util/trt_util.h:56:30: error: ‘kINT64’ is not a member of ‘nvinfer1::DataType’; did you mean ‘kINT8’?
56 | case nvinfer1::DataType::kINT64:
| ^~~~~~
| kINT8
/home/cplus/projects/m.tarek_master/packages/TensorRT/core/util/trt_util.h:58:30: error: ‘kBF16’ is not a member of ‘nvinfer1::DataType’
58 | case nvinfer1::DataType::kBF16:
| ^~~~~
/home/cplus/projects/m.tarek_master/packages/TensorRT/core/util/trt_util.cpp: In function ‘const std::unordered_map<c10::ScalarType, nvinfer1::DataType>& torch_tensorrt::core::util::{anonymous}::get_at_trt_type_map()’:
/home/cplus/projects/m.tarek_master/packages/TensorRT/core/util/trt_util.cpp:295:39: error: ‘kINT64’ is not a member of ‘nvinfer1::DataType’; did you mean ‘kINT8’?
295 | {at::kLong, nvinfer1::DataType::kINT64},
| ^~~~~~
| kINT8
/home/cplus/projects/m.tarek_master/packages/TensorRT/core/util/trt_util.cpp:299:43: error: ‘kBF16’ is not a member of ‘nvinfer1::DataType’
299 | {at::kBFloat16, nvinfer1::DataType::kBF16}};
| ^~~~~
/home/cplus/projects/m.tarek_master/packages/TensorRT/core/util/trt_util.cpp:299:49: error: could not convert ‘{{c10::kFloat, nvinfer1::DataType::kFLOAT}, {c10::kHalf, nvinfer1::DataType::kHALF}, {c10::kInt, nvinfer1::DataType::kINT32}, {c10::kLong, }, {c10::kChar, nvinfer1::DataType::kINT8}, {c10::kByte, nvinfer1::DataType::kINT8}, {c10::kBool, nvinfer1::DataType::kBOOL}, {c10::kBFloat16, }}’ from ‘’ to ‘const std::unordered_map<c10::ScalarType, nvinfer1::DataType>’
299 | {at::kBFloat16, nvinfer1::DataType::kBF16}};
| ^
| |
|
/home/cplus/projects/m.tarek_master/packages/TensorRT/core/util/trt_util.cpp: In function ‘const std::unordered_map<nvinfer1::DataType, c10::ScalarType>& torch_tensorrt::core::util::{anonymous}::get_trt_at_type_map()’:
/home/cplus/projects/m.tarek_master/packages/TensorRT/core/util/trt_util.cpp:308:28: error: ‘kINT64’ is not a member of ‘nvinfer1::DataType’; did you mean ‘kINT8’?
308 | {nvinfer1::DataType::kINT64, at::kLong},
| ^~~~~~
| kINT8
/home/cplus/projects/m.tarek_master/packages/TensorRT/core/util/trt_util.cpp:311:28: error: ‘kBF16’ is not a member of ‘nvinfer1::DataType’
311 | {nvinfer1::DataType::kBF16, at::kBFloat16}};
| ^~~~~
/home/cplus/projects/m.tarek_master/packages/TensorRT/core/util/trt_util.cpp:311:49: error: could not convert ‘{{nvinfer1::DataType::kFLOAT, c10::kFloat}, {nvinfer1::DataType::kHALF, c10::kHalf}, {nvinfer1::DataType::kINT32, c10::kInt}, {, c10::kLong}, {nvinfer1::DataType::kINT8, c10::kChar}, {nvinfer1::DataType::kBOOL, c10::kBool}, {, c10::kBFloat16}}’ from ‘’ to ‘const std::unordered_map<nvinfer1::DataType, c10::ScalarType>’
311 | {nvinfer1::DataType::kBF16, at::kBFloat16}};
| ^
| |
|
make[2]: *** [core/util/CMakeFiles/core_util.dir/build.make:93: core/util/CMakeFiles/core_util.dir/trt_util.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:603: co
i use cuda 11.8 with tensorrt 10.12.0.36
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.