Closed jonahclarsen closed 2 years ago
Hi @jonahclarsen !
I added simple CMakeLists.txt to the examples (amongst which the int8/ptq
example you mention in this issue) on my branch on #1058 . Compiling and installing the lib using CMake on windows I am able to compile the ptq example without linking error. The CMake configuration command is slightly verbose but here it is:
cmake -S. -Bbuild_dir -DTorch_DIR="..\..\..\..\libtorch\share\cmake\Torch" -Dtorchtrt_DIR="C:\Program Files (x86)\Torch-TensorRT\lib\cmake\torchtrt" -DTensorRT_ROOT="C:\Program Files\NVIDIA GPU Computing Toolkit\TensorRT-8.2.4.2"
This specifies:
C:\Program Files (x86)
by default.Can you try that out and let me know if that solves your linking issue?
@gcuendet Awesome - that fixed the linking error! Thanks so much.
I'm now getting a "CUDA illegal memory access" error with my implementation of the ptq example after a few batches are calibrated. I'm not sure if this is due to my implementation or if it's a problem with the libraries.
EDIT: It was a problem with my implementation. I was using the wrong input shape. Works now!
❓ Question
I am getting a linking error when using
torch_tensorrt::ptq::make_int8_calibrator
. I am using the Windows build based on CMake, so I'm not sure if it's a problem with the way it was built, but I suspect not since I can use functions from ::torchscript just fine.I am trying to create a barebones program to test ptq based on examples/int8/ptq/main.cpp, and I get this linker error whenever
torch_tensorrt::ptq::make_int8_calibrator
is used. Any help would be greatly appreciated.Environment
conda
,pip
,libtorch
, source): libtorch from pytorch.orgAdditional context
This is the linker error that I get: