'Which libtorch libraries do I need to distribute?

A new DLL in my application requires the C++ libtorch API. A fellow developer has downloaded it and created a C++ DLL that uses it. However the entire thing - debug and release builds - is absolutely massive: Over 4 GB on disk. It would more than triple the size of our repo.

I would prefer not to add all of that to source control if I don't need it but I cannot find any sort of guide as to which libtorch DLL/LIB is needed for what functionality. Does such a guide exist? I don't see it in the tutorials or readme

The DLLs I see in the distribution are

asmjit.dll, c10.dll, caffe2_detection_ops.dll, fbgemm.dll, libiomp5md.dll, libiompstubs5md.dll, torch.dll, torch_cpu.dll, torch_global_deps.dll

The .LIBs I see are

asmjit.lib, c10.lib, caffe2_detectron_ops.lib, caffe2_module_test_dynamic.lib, clog.lib, dnnl.lib, fbgemm.lib, libprotobufd.lib, libprotobuf-lited.lib, libprotocd.lib, mkldnn.lib, torch.lib, torch_cpu.lib

We only link to two of the .LIBs in the project (c10.lib and torch_cpu.lib) but experimentation has shown that we need more than just the correspondingly named DLLs present at runtime (e.g. if asjmit.dll orfbgemm.dll are missing, it won't work)

Is there any documentation to show me what DLLs, if any, I may safely omit?

-Joe



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source