Size of libtorch/CUDA DLLs

Hi,

we are currently upgrading from libtorch 1.4 to 1.7 in order to support Ampere GPUs.
We noticed that torch.dll is larger, new CUDA dlls (e.g. cusolver) have been introduced and existing ones (e.g. cuDNN) are much larger.
This is problematic because we need to ship some of our products on DVD and we are running out of space.

We have analyzed which DLLs are actually called at runtime and it seems like only cudart and cuDNN (except adv) are used. We are only using CNNs (training and inference).

It would be great if libtorch could be configured at compile-time so that only required functionality (e.g. CNNs) is enabled. As a workaround we could link the unused DLLs with delay loading and not deploy them, but we aren’t sure if this is safe.

Could you please create a feature request on GitHub and tag me there, so that we can track it?

Done.