Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compress CUDA device code in
libfaiss.so
(#2091)
Summary: Pass `-Xfatbin=-compress-all` to `nvcc` so device code is compressed when embedded in `libfaiss.so`. In our testing[[1]](https://github.com/rapidsai/cudf/pull/7583)[[2]](https://gist.githubusercontent.com/robertmaynard/2cfb4ba27afcd7e52b2deccce3b78c29/raw/0a0d3b48e82ab26c2dac5af00e428333e852b8a5/results.txt), compressing device code has negligible (or no) impact on compile, load, or run times, but significantly reduces the library size on disk: ```bash # cmake -GNinja -B build -S . \ # -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF \ # -DFAISS_ENABLE_GPU=ON -DFAISS_ENABLE_PYTHON=OFF \ # -DCMAKE_CUDA_ARCHITECTURES="60-real;70-real;75-real;80-real;86" # v1.7.0: $ du -Shc build/faiss/libfaiss.so 318M build/faiss/libfaiss.so # this PR: $ du -Shc build/faiss/libfaiss.so 160M build/faiss/libfaiss.so ``` Pull Request resolved: #2091 Reviewed By: mdouze Differential Revision: D32597803 Pulled By: wickedfoo fbshipit-source-id: a2adb43aea0fa24a9581abe14a7d90a6e98523ce
- Loading branch information