未验证 提交 6934ae2b 编写于 作者: W Wilber 提交者: GitHub

Fix compiler error with_trt (#47716)

上级 84c9a0d6
...@@ -257,7 +257,9 @@ if(WITH_ROCM) ...@@ -257,7 +257,9 @@ if(WITH_ROCM)
string(REPLACE "-Werror" "-Wno-error" CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) string(REPLACE "-Werror" "-Wno-error" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
endif() endif()
if(WITH_PSCORE OR WITH_PSLIB) if(WITH_PSCORE
OR WITH_PSLIB
OR WITH_TENSORRT)
string(REPLACE "-Wnon-virtual-dtor" "-Wno-non-virtual-dtor" CMAKE_CXX_FLAGS string(REPLACE "-Wnon-virtual-dtor" "-Wno-non-virtual-dtor" CMAKE_CXX_FLAGS
${CMAKE_CXX_FLAGS}) ${CMAKE_CXX_FLAGS})
string(REPLACE "-Wnon-virtual-dtor" "-Wno-non-virtual-dtor" CMAKE_C_FLAGS string(REPLACE "-Wnon-virtual-dtor" "-Wno-non-virtual-dtor" CMAKE_C_FLAGS
......
...@@ -82,8 +82,9 @@ inline uint32_t getElementSize(nvinfer1::DataType t) noexcept { ...@@ -82,8 +82,9 @@ inline uint32_t getElementSize(nvinfer1::DataType t) noexcept {
case nvinfer1::DataType::kBOOL: case nvinfer1::DataType::kBOOL:
case nvinfer1::DataType::kINT8: case nvinfer1::DataType::kINT8:
return 1; return 1;
} default:
return 0; return 0;
}
} }
inline int64_t getWeightsSize(const nvinfer1::Weights& w, inline int64_t getWeightsSize(const nvinfer1::Weights& w,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册