-
Notifications
You must be signed in to change notification settings - Fork 26
Build and Install
J. Tian edited this page Dec 12, 2022
·
7 revisions
cuSZ is distributed in source code, and there are two methods to build cuSZ,
- from git-cloned source code
- from Spack automated installation.
- 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 \
-DBUILD_TESTING=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 \
-DBUILD_TESTING=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
After setting up Spack, run
spack install cusz +cuda cuda_arch=[your CUDA gpu arch]
spack load cusz
The table gives a quick view of toolchain compatibility (i.e., GCC or LLVM only serves as host compiler)
- corresponding to 1dd0b8a
- more reference: CUDA compilers, and CUDA architectures & gencode.
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
(C) 2022 by Indiana University and Argonne National Laboratory. See COPYRIGHT.
- developers: Jiannan Tian, Cody Rivera, Wenyu Gai, Dingwen Tao, Sheng Di, Franck Cappello
- contributors (alphabetic): Jon Calhoun, Megan Hickman Fulp, Xin Liang, Robert Underwood, Kai Zhao
- Special thanks to Dominique LaSalle (NVIDIA) for serving as Mentor in Argonne GPU Hackaton 2021!