Skip to content

Windows Binary Installer -- afcuda.dll is absolutely massive... why? #2863

@scottmudge

Description

@scottmudge

I have compiled my fair share of CUDA-dependent libraries, many of them massive... OpenCV, TensorFlow, custom-rolled libraries, etc. Even the largest and most complex of these libraries is smaller than the pre-compiled afcuda.dll distributed on the ArrayFire website.

afcuda.dll is 963,264 KB (~940 MB) -- why on earth is it so massive? The '.nv_fatb' PE section, constituting all of the nvcc compilation, is 851,898 KB, taking up a vast majority of the file size.

It is 2.68x larger than its debug symbols file. For comparison, the afcpu.dll file is ~8x smaller than its debug symbols file.

Would it be possible to change the default build configuration to link against the non-static CUDA runtime and just distribute the much smaller cudart64_10.dll file? Another good strategy to shrink the file size is to exclude unnecessary CUDA architectures. Are every possible gencode= and arch= permutation being used?

I've also noticed that with MSVC, some linker and compiler flags dramatically bloat library sizes, especially with respect to CUDA libraries. A couple of these in particular are /GL and /LTCG, which when used with libraries like PCL can cause the compiled library to be 8x larger, when CUDA support is enabled.

It is simply untenable to distribute software binaries linked against afcuda.lib on Windows, when the associated DLL is a gigabyte in size.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions