Skip to content
J. Tian edited this page Oct 28, 2022 · 7 revisions

cuSZ is distributed in source code, and there are two methods to build cuSZ,

  1. from git-cloned source code
  2. from Spack automated installation.

build cuSZ

  • NVIDIA GPU with CUDA 11.3 onward
    • see detailed compatibility matrix below
    • Spack installation can work for 11.0 onward
  • cmake 3.18 onward
  • C++14 enabled compiler, GCC 8 onward
git clone https://github.com/szcompressor/cuSZ.git cusz-latest
cd cusz-latest && mkdir build && cd build

# Example architectures (";"-separated when specifying)
#   Volta        : 70
#   Turing       : 75
#   Ampere       : 80 86
#   Ada Lovelace : 89 (as of CUDA 11.8)
#   Hopper       : 90 (as of CUDA 11.8)
cmake .. -DCUSZ_BUILD_EXAMPLES=on \
    -DCMAKE_BUILD_TYPE=Release \
    -DCUSZ_BUILD_TESTS=on \
    -DCMAKE_CUDA_ARCHITECTURES="75;80;86" \
    -DCMAKE_INSTALL_PREFIX=[/path/to/install/dir]
make -j8
# Install to [/path/to/install/dir]
make install
# An optional testcase run can be done using `ctest`.

For CUDA 11.4 or older, given the different machanism of finding NVIDIA::CUB, use need to otherwise specify CUB_DIR, which is basically $CUDA_HOME/include/cub/cmake. A one-liner is given below,

cmake .. -DCUSZ_BUILD_EXAMPLES=on \
    -DCMAKE_BUILD_TYPE=Release \
    -DCUSZ_BUILD_TESTS=on \
    -DCMAKE_CUDA_ARCHITECTURES="75;80;86" \
    -DCUB_DIR=$(dirname $(which nvcc))/../include/cub/cmake \
    -DCMAKE_INSTALL_PREFIX=[/path/to/install/dir]
# ... and follow the same subsequent commands

On certain Ubuntu-based systems, CUB_DIR may be different. If the above is not working, try the below instead.

-DCUB_DIR=$(dirname $(which nvcc))/../targets/x86_64-linux/lib/cmake/cub

Spack install

After setting up Spack, run

spack install cusz +cuda cuda_arch=[your CUDA gpu arch]
spack load cusz

compatibility

The table gives a quick view of toolchain compatibility (i.e., GCC or LLVM only serves as host compiler)

CUDA 11.0 11.1 11.2 11.3 11.4 11.5 11.6 11.7 11.8
GCC 8.5 ^ ^ ^ ok ok ok ok ok ok
9.3 ^ ^ ^ ok ok ok ok ok ok
10.2 ^ ^ ^ ok ok ok ok ok ok
11.2 ! ! ! ! ! ok ok ok ok
 # only accessible using spack
 ! GCC version too high for CUDA SDK
Clone this wiki locally