-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Closed
Labels
caffe2triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🐛 Bug
Building Caffe2 with TensorRT support ends with an error:
[ 83%] Building CXX object caffe2/CMakeFiles/torch_cuda.dir/contrib/tensorrt/tensorrt_op_trt.cc.o
/home/user/Documents/Eclipse/workspace/PyTorch/caffe2/contrib/tensorrt/tensorrt_op_trt.cc: In member function ’void caffe2::TensorRTOp::MaybeAdjustOutputShape(int, std::vector<long int, std::allocator<long int> >*)’:
/home/user/Documents/Eclipse/workspace/PyTorch/caffe2/contrib/tensorrt/tensorrt_op_trt.cc:139:50: error: no match for ’operator*’ (operand type is ’const std::vector<long int, std::allocator<long int> >’)
const auto total_c2 = c10::multiply_integers(*dims_hint);
^~~~~~~~~~
It happens because of trying to dereference not a pointer but a reference to a collection element of
std::unordered_map<int, std::vector<int64_t>> output_size_hints_;
The bug was introduced with switch from std:: to c10:: accumulators.
I will do PR with fix.
To Reproduce
Configure and build Caffe2 with TensorRT support (-D USE_TENSORRT=ON)
Environment
- PyTorch Version (e.g., 1.0): current master
- OS (e.g., Linux): Linux
- How you installed PyTorch (
conda
,pip
, source): source - CUDA/cuDNN version: 11.1 / 8.1 (TensorRT 7.2.3)
Metadata
Metadata
Assignees
Labels
caffe2triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module