DBraun / PyTorchTOP

GPU PyTorch TOP in TouchDesigner with CUDA-enabled OpenCV
Other
77 stars 5 forks source link

Failed to load DLL #11

Closed simplo closed 3 years ago

simplo commented 3 years ago

Hi, I just compiled all with success (it seems), but as soon as TD opens the project the cplusplus comp says "failed to load DLL" even if paths are right. Opening the project it says that some DLL dependence is missing, but I have not clue on what is missing. Any idea? Thank you Simone

DBraun commented 3 years ago

Are the libtorch DLL files next to the compiled PyTorchTOP.dll? The files from libtorch/lib/*.dll need to be in %USERPROFILE%/Documents/Derivative/Plugins. More info is here https://github.com/DBraun/PyTorchTOP/issues/5

simplo commented 3 years ago

Thank you for your fast reply. I checked the other post, it seems I have all the right DLLs in my folder: Volume in drive C has no label. Volume Serial Number is AC01-7794

Directory of C:\Users\paperspace\Documents\Derivative\plugins

05/01/2021 08:23

. 05/01/2021 08:23 .. 04/01/2021 21:45 242.176 asmjit.dll 04/01/2021 21:45 355.328 c10.dll 04/01/2021 21:45 230.912 c10_cuda.dll 04/01/2021 21:45 21.732.352 caffe2_detectron_ops_gpu.dll 04/01/2021 21:45 69.120 caffe2_module_test_dynamic.dll 04/01/2021 21:45 15.360 caffe2_nvrtc.dll 04/01/2021 21:45 88.860.672 cublas64_11.dll 04/01/2021 21:45 159.866.368 cublasLt64_11.dll 04/01/2021 21:45 401.408 cudart64_110.dll 04/01/2021 21:45 222.720 cudnn64_8.dll 04/01/2021 21:45 99.908.096 cudnn_adv_infer64_8.dll 04/01/2021 21:45 65.183.232 cudnn_adv_train64_8.dll 04/01/2021 21:45 508.834.304 cudnn_cnn_infer64_8.dll 04/01/2021 21:45 51.145.728 cudnn_cnn_train64_8.dll 04/01/2021 21:45 240.333.312 cudnn_ops_infer64_8.dll 04/01/2021 21:45 25.651.712 cudnn_ops_train64_8.dll 04/01/2021 21:45 162.937.856 cufft64_10.dll 04/01/2021 21:45 272.896 cufftw64_10.dll 04/01/2021 21:45 52.446.720 curand64_10.dll 04/01/2021 21:46 505.477.120 cusolver64_10.dll 04/01/2021 21:46 294.363.136 cusolverMg64_10.dll 04/01/2021 21:46 160.346.112 cusparse64_11.dll 04/01/2021 21:46 3.268.096 fbgemm.dll 04/01/2021 21:46 1.961.328 libiomp5md.dll 04/01/2021 21:46 110.448 libiompstubs5md.dll 04/01/2021 21:46 5.117.440 nvrtc-builtins64_110.dll 04/01/2021 21:46 16.161.792 nvrtc64_110_0.dll 04/01/2021 21:46 48.128 nvToolsExt64_1.dll 04/01/2021 20:24 998.337.536 opencv_world451.dll 04/01/2021 22:19 475 Plugins.json 04/01/2021 21:45 202.752 PyTorchTOP.dll 04/01/2021 21:46 9.728 torch.dll 04/01/2021 21:46 186.265.088 torch_cpu.dll 04/01/2021 21:46 797.608.960 torch_cuda.dll 04/01/2021 21:46 9.216 torch_global_deps.dll 04/01/2021 21:46 195.072 uv.dll 37 File(s) 4.448.192.699 bytes 2 Dir(s) 14.303.322.112 bytes free

simplo commented 3 years ago

It seems I fixed it! It was a matter of TD version. With the latest experimental it works.

simplo commented 3 years ago

Thank you for your support and the very fast replies!

DBraun commented 3 years ago

Great. For future reference, https://github.com/lucasg/Dependencies can be useful for identifying which DLL needs to be loaded. In previous versions of TouchDesigner, TD would load a dll from its bin folder, and when the custom plugin would ask to load the same dll from the custom plugins, the operating system would say effectively, “No need to load that DLL because it’s already loaded.” So then the custom plugin wouldn’t work with the message you received. The solution was to replace the overlapping plugins in the TouchDesigner bin folder, but this is no longer necessary, and it also risks stability/functionality of the rest of TouchDesigner.