Skip to content
J. Tian edited this page Apr 27, 2025 · 9 revisions

build pSZ/cuSZ

Due to limited bandwidth, CUDA-backend pSZ (cuSZ) is the developmental focus.

CUDA GPU architectures (SM version) and representative GPUs.

NVIDIA CUDA architectures and names and representative GPUs are listed below. More details can be found at CUDA GPUs.

SM id arch. grade/segment GPU product example
60 ! Pascal HPC/AI P100
70 ! Volta HPC/AI V100
75 Turing consumer/professional 20 series, Quadro RTX
80 Ampere HPC/AI A100
86 Ampere consumer/professional 30 series, RTX (Ampere)
89 * Ada consumer/professional 40 series, RTX (Ada)
90 * Hopper HPC/AI H100
100 ** Blackwell HPC/AI B100
120 ** Blackwell consumer/professional 50 series, RTX (Blackwell)
  • ! deprecated as of CUDA 12.8
  • * as of CUDA 11.8
  • ** as of CUDA 12.8
Recommended CUDA development environment
  • Almost arbitrary version of Clang + CUDA toolkit
  • selected GCC + CUDA combination:
    • GCC: the odd-number version is preferred.
    • GCC 9 (Ubuntu 20.04), GCC 11 (Ubuntu 22.04), GCC 13 (Ubuntu 24.04)
    • GCC 11/13 (depending on the "x" in RHEL 9.x)

CUDA backend

  • NVIDIA GPU with CUDA 11.4 onward
  • C++17-compiant host compiler
    • GCC 9 onward or any version of Clang
    • cmake 3.18 onward

Below provides the maximum compatibility for various CUDA GPU architectures (separate multiple SM versions with a semicolon ";"). An unmatched architecture with the target GPU runtime can produce unexpected results. Disabling unnecessary backends once the target SM is determined can speed up the build process. Please refer to the GPU architecture details provided above.

git clone https://github.com/szcompressor/cuSZ.git cusz-latest
cd cusz-latest && mkdir build && cd build
cmake .. \
    -DPSZ_BACKEND=cuda \
    -DPSZ_BUILD_EXAMPLES=on \
    -DCMAKE_CUDA_ARCHITECTURES="80;86;89;90;100;120" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_COLOR_DIAGNOSTICS=on \
    -DCMAKE_INSTALL_PREFIX=[/path/to/install/dir]
make -j
make install
Build for development

If possible, use ninja and Debug mode for faster build process.

git clone https://github.com/szcompressor/cuSZ.git cusz-dev
cd cusz-dev && mkdir build && cd build
cmake .. \
    -DPSZ_BACKEND=cuda \
    -DPSZ_BUILD_EXAMPLES=on \
    -DCMAKE_CUDA_ARCHITECTURES="75;80;86;89;90;100;120" \
    -DCMAKE_BUILD_TYPE=Debug \
    -DCMAKE_COLOR_DIAGNOSTICS=on \
    -GNinja \
    -DCMAKE_INSTALL_PREFIX=[/path/to/install/dir]
ninja
# `ctest` to perform testing

Clone this wiki locally