-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 [Bug] Windows native library support (works!) #2371
Comments
@markivfb Can you use this with Pytorch? Or just native C/C++? If yes, can you tell me, what you did with the dlls and where did you put them? |
This script works on my cuda 11.7 too with torch 2.0.1. |
@Justin62628 I have build torch_tensorrt.dll successfully too, but something more complicated. However: What do I actually do with these dll files for Pytorch? |
so far I can only work with these dll files with libtorch. |
@Justin62628 Could you share your wheel file for Python, so I could install this? You can upload as a image file here and then I can rename the extension back to .py and install it. |
for me i also have to edit file |
Did you manage to somehow work it with pytorch with python? |
@jensdraht1999 wheel built successfully but unusable (dll linking error like #856) |
Bug Description
Hi, based on some past posts like this and this and this, I was able to get a bazel build working for windows for the c++ library, with both model compilation and inference, by building torch_tensorrt.dll, which I believe includes both the runtime and the compilation plugins.
I am wondering what it would take for official windows support. I've attached a full patch, I think the declspec may not be needed.
Once this builds, all one has to do to use torch_tensorrt in their project is, link to torch_tensorrt.dll.if.lib and ensure torch_tensorrt.dll is loaded up with LoadLibrary as mentioned in other issue reports.
More info about exact versions of libraries used:
cuda_11.8.0_522.06_windows.exe
TensorRT-8.6.1.6.Windows10.x86_64.cuda-11.8
libtorch-win-shared-with-deps-2.0.1+cu118
cudnn-windows-x86_64-8.8.0.121_cuda11-archive
Build command:
bazel-6.3.2-windows-x86_64.exe build //:libtorchtrt --compilation_mode opt
Environment
conda
,pip
,libtorch
, source): libtorch, sourceAdditional context
0001-WINDOWS-SUPPORT.patch
The text was updated successfully, but these errors were encountered: