Skip to content
J. Tian edited this page Sep 20, 2023 · 7 revisions

build pSZ/cuSZ

pSZ Backend overview: cuSZ (CUDA) and more
alias status backend toolkit used cmake host copmiler device compiler cpp std
cuSZ released CUDA CUDA toolkit 11.3+ 3.17 nvcc * gcc 8+ c++14
hipSZ in dev. HIP HIP toolkit 5.x 3.21 hipcc * hipcc c++17
dpSZ in dev. oneAPI oneAPI toolkit 2023.x 3.23 icpx * icpx c++17

* Device-code compiler is specified by the toolkit.

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/ML P100
70 Volta HPC/ML V100
75 Turing consumer/professional RTX 20?0, Quadro RTX ?000
80 Ampere HPC/ML A100
86 Ampere consumer/professional RTX 30?0, RTX A?000
89 * Ada consumer/professional RTX 40?0, RTX ?000
90 * Hopper HPC/ML H100

* as of CUDA 11.8

CUDA toolkit compatibility matrix

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 12.0 12.1 12.2
GCC 8.5 ^ ^ ^ ok ok ok ok ok ok
9.3 ^ ^ ^ ok ok ok ok ok ok ok ok ok
10.2 ^ ^ ^ ok ok ok ok ok ok
11.2 ! ! ! ! ! ok ok ok ok
11.4 ! ! ! ! ! ok ok
 # only accessible using spack
 ! GCC version too high for CUDA SDK
AMD ROCm architectures and representative GPUs.
arch. id GPU arch.
gfx906 MI50 Vega
gfx908 MI100 CDNA
gfx90a MI210 CDNA2
gfx90a MI250 CDNA2
gfx90a MI250X CDNA2

CUDA backend

  • NVIDIA GPU with CUDA 11.3 onward
  • cmake 3.17 onward
  • C++14 enabled compiler, GCC 8 onward
# Example architectures (";" to separate multiple SM versions)
# Install to [/path/to/install/dir]

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="75;80;86" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_COLOR_DIAGNOSTICS=on \
    -DCMAKE_INSTALL_PREFIX=[/path/to/install/dir]
make -j
make install
# `ctest` to perform testing
Build for development

If possible, use ninja 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" \
    -DCMAKE_BUILD_TYPE=Debug \
    -DCMAKE_COLOR_DIAGNOSTICS=on \
    -DPSZLOG_ENABLE_ALL=off \
    -GNinja
ninja
# `ctest` to perform testing

HIP-ROCm backend (dev mode)

Build for development

If possible, use ninja for faster build process.

git clone https://github.com/szcompressor/cuSZ.git cusz-dev
cd cusz-dev && mkdir build && cd build
cmake .. \
    -DPSZ_BACKEND=hip \
    -DPSZ_BUILD_EXAMPLES=on \
    -DCMAKE_BUILD_TYPE=Debug \
    -DCMAKE_C_COMPILER=hipcc \
    -DCMAKE_CXX_COMPILER=hipcc \
    -DCMAKE_HIP_ARCHITECTURES="gfx90a" \
    -GNinja
ninja
# `ctest` to perform testing

DPCPP backend (dev mode)

Build for development

If possible, use ninja for faster build process. Global -DCMAKE_CXX_STANDARD=17 ensures the correct inclusion of <dpct/dpct.hpp>.

git clone https://github.com/szcompressor/cuSZ.git cusz-dev
cd cusz-dev && mkdir build && cd build
source /opt/intel/oneapi/setvars.sh --force 
cmake .. \
    -DPSZ_BACKEND=1api\
    -DPSZ_BUILD_EXAMPLES=on \
    -DCMAKE_BUILD_TYPE=Debug \
    -DCMAKE_C_COMPILER=icx \
    -DCMAKE_CXX_COMPILER=icpx \
    -DCMAKE_CXX_STANDARD=17 \
    -DCMAKE_CXX_STANDARD_REQUIRED=ON \
    -GNinja
ninja
# `ctest` to perform testing
Clone this wiki locally