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

Requirements:

  • NVIDIA GPU with CUDA 11
  • cmake 3.18 onward
  • C++14 enabled compiler, GCC 9
More details about build tools
  • The table gives a quick view of toolchain compatibility
CUDA 11.0 11.1 11.2 11.3 11.4 11.5 11.6 11.7 11.8
gcc 7 7 7 7 7 7 7
8 8 8 8 8 8 8 8
9 9 9 9 9

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_INSTALL_PREFIX=[/path/to/install/dir] \
    -DCMAKE_CUDA_ARCHITECTURES="75;80;86"
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_INSTALL_PREFIX=[/path/to/install/dir] \
    -DCUB_DIR=$(dirname $(which nvcc))/../include/cub/cmake \
    -DCMAKE_CUDA_ARCHITECTURES="75;80;86"
# ... and follow the same subsequent commands
Clone this wiki locally