Closed LightSun closed 2 years ago
/usr/bin/c++ -DMGB_ENABLE_CPUINFO_CHECK -DMGB_ENABLE_FBS_SERIALIZATION=1 -Igflags/include -I/usr/local/cuda/targets/x86_64-linux/include -I../../../../../../third_party/cpuinfo/include -I/home/heaven7/heaven7/work/TensorRT-8.2.2.1/include -I/usr/local/cuda-11.1/include -I/usr/local/cuda-11.1/include/nvtx3 -I../../../../../../third_party/midout/src -Igenfiles -I../../../../../../src/core/include -I../../../../../../src/gopt/include -I../../../../../../src/opr/include -I../../../../../../src/plugin/include -I../../../../../../src/serialization/include -I../../../../../../src/rdnn/include -I../../../../../../src/jit/include -I../../../../../../src/jit/impl/cuda -I../../../../../../src/tensorrt/include -Isrc/serialization/include/megbrain/serialization/internal -Isrc/serialization/include -Isrc/genfiles -Isrc/opr/include -I../../../../../../dnn/include -Idnn/include -Idnn -I../../../../../../third_party/flatbuffers/include -include /home/heaven7/heaven7/study/github/third/MegEngine/src/bin_reduce_cmake.h -ffunction-sections -fdata-sections -Wall -Wextra -Wno-unused-parameter -Wno-extra -m64 -msse4.2 -mfpmath=sse -g -O3 -DNDEBUG -fno-finite-math-only -fPIC -Wno-unused-parameter -std=c++1z -MD -MT src/CMakeFiles/megbrain.dir/tensorrt/impl/opr_replace.cpp.o -MF src/CMakeFiles/megbrain.dir/tensorrt/impl/opr_replace.cpp.o.d -o src/CMakeFiles/megbrain.dir/tensorrt/impl/opr_replace.cpp.o -c ../../../../../../src/tensorrt/impl/opr_replace.cpp ../../../../../../src/tensorrt/impl/opr_replace.cpp:128:40: error: ‘DimensionType’ is not a member of ‘nvinfer1’ mgb::SmallVector<nvinfer1::DimensionType> dimtypes = {}); ^~~~~~~~~~~~~ ../../../../../../src/tensorrt/impl/opr_replace.cpp:128:40: note: suggested alternative: ‘IDimensionExpr’ mgb::SmallVector<nvinfer1::DimensionType> dimtypes = {}); ^~~~~~~~~~~~~ IDimensionExpr ../../../../../../src/tensorrt/impl/opr_replace.cpp:128:53: error: template argument 1 is invalid mgb::SmallVector<nvinfer1::DimensionType> dimtypes = {}); ^ ../../../../../../src/tensorrt/impl/opr_replace.cpp: In lambda function: ../../../../../../src/tensorrt/impl/opr_replace.cpp:655:39: error: ‘DimensionType’ is not a member of ‘nvinfer1’ SmallVector<nvinfer1::DimensionType> dimtypes(ndim); ^~~~~~~~~~~~~ ../../../../../../src/tensorrt/impl/opr_replace.cpp:655:39: note: suggested alternative: ‘IDimensionExpr’ SmallVector<nvinfer1::DimensionType> dimtypes(ndim); ^~~~~~~~~~~~~ IDimensionExpr ../../../../../../src/tensorrt/impl/opr_replace.cpp:655:52: error: template argument 1 is invalid SmallVector<nvinfer1::DimensionType> dimtypes(ndim); ^ ../../../../../../src/tensorrt/impl/opr_replace.cpp:657:31: error: invalid types ‘int[int]’ for array subscript dimtypes[i] = nvinfer1::DimensionType::kSPATIAL; ^ ../../../../../../src/tensorrt/impl/opr_replace.cpp:657:45: error: ‘nvinfer1::DimensionType’ has not been declared dimtypes[i] = nvinfer1::DimensionType::kSPATIAL; ^~~~~~~~~~~~~ ../../../../../../src/tensorrt/impl/opr_replace.cpp: In lambda function: ../../../../../../src/tensorrt/impl/opr_replace.cpp:851:43: error: ‘DimensionType’ is not a member of ‘nvinfer1’ SmallVector<nvinfer1::DimensionType> dimtypes(tensor_ndim); ^~~~~~~~~~~~~ ../../../../../../src/tensorrt/impl/opr_replace.cpp:851:43: note: suggested alternative: ‘IDimensionExpr’ SmallVector<nvinfer1::DimensionType> dimtypes(tensor_ndim); ^~~~~~~~~~~~~ IDimensionExpr ../../../../../../src/tensorrt/impl/opr_replace.cpp:851:56: error: template argument 1 is invalid SmallVector<nvinfer1::DimensionType> dimtypes(tensor_ndim); ^ ../../../../../../src/tensorrt/impl/opr_replace.cpp:853:35: error: invalid types ‘int[size_t {aka long unsigned int}]’ for array subscript dimtypes[i] = nvinfer1::DimensionType::kSPATIAL; ^ ../../../../../../src/tensorrt/impl/opr_replace.cpp:853:49: error: ‘nvinfer1::DimensionType’ has not been declared dimtypes[i] = nvinfer1::DimensionType::kSPATIAL; ^~~~~~~~~~~~~ ../../../../../../src/tensorrt/impl/opr_replace.cpp: In lambda function: ../../../../../../src/tensorrt/impl/opr_replace.cpp:903:35: error: ‘DimensionType’ is not a member of ‘nvinfer1’ SmallVector<nvinfer1::DimensionType> dimtypes; ^~~~~~~~~~~~~ ../../../../../../src/tensorrt/impl/opr_replace.cpp:903:35: note: suggested alternative: ‘IDimensionExpr’ SmallVector<nvinfer1::DimensionType> dimtypes; ^~~~~~~~~~~~~ IDimensionExpr ../../../../../../src/tensorrt/impl/opr_replace.cpp:903:48: error: template argument 1 is invalid SmallVector<nvinfer1::DimensionType> dimtypes; ^ ../../../../../../src/tensorrt/impl/opr_replace.cpp:907:35: error: ‘nvinfer1::DimensionType’ has not been declared nvinfer1::DimensionType::kSPATIAL, ^~~~~~~~~~~~~ ../../../../../../src/tensorrt/impl/opr_replace.cpp:908:35: error: ‘nvinfer1::DimensionType’ has not been declared nvinfer1::DimensionType::kSPATIAL}; ^~~~~~~~~~~~~ ../../../../../../src/tensorrt/impl/opr_replace.cpp:908:58: error: cannot convert ‘<brace-enclosed initializer list>’ to ‘int’ in assignment nvinfer1::DimensionType::kSPATIAL}; ^ ../../../../../../src/tensorrt/impl/opr_replace.cpp:914:35: error: ‘nvinfer1::DimensionType’ has not been declared nvinfer1::DimensionType::kINDEX, ^~~~~~~~~~~~~ ../../../../../../src/tensorrt/impl/opr_replace.cpp:915:35: error: ‘nvinfer1::DimensionType’ has not been declared nvinfer1::DimensionType::kSPATIAL, ^~~~~~~~~~~~~ ../../../../../../src/tensorrt/impl/opr_replace.cpp:916:35: error: ‘nvinfer1::DimensionType’ has not been declared nvinfer1::DimensionType::kSPATIAL}; ^~~~~~~~~~~~~ ../../../../../../src/tensorrt/impl/opr_replace.cpp:916:58: error: cannot convert ‘<brace-enclosed initializer list>’ to ‘int’ in assignment nvinfer1::DimensionType::kSPATIAL}; ^ ../../../../../../src/tensorrt/impl/opr_replace.cpp: In lambda function: ../../../../../../src/tensorrt/impl/opr_replace.cpp:960:35: error: ‘DimensionType’ is not a member of ‘nvinfer1’ SmallVector<nvinfer1::DimensionType> dimtypes(tensor_ndim); ^~~~~~~~~~~~~ ../../../../../../src/tensorrt/impl/opr_replace.cpp:960:35: note: suggested alternative: ‘IDimensionExpr’ SmallVector<nvinfer1::DimensionType> dimtypes(tensor_ndim); ^~~~~~~~~~~~~
I found that tensorrt 8.2 doesn't have 'nvinfer1::DimensionType' , how do I handle it ?
@natelowry @nihui @steinmann @r-b-g-b
fixed by add enum DimensionType
I found that tensorrt 8.2 doesn't have 'nvinfer1::DimensionType' , how do I handle it ?