Skip to content

Instantly share code, notes, and snippets.

@shrubb
Last active October 17, 2021 17:27
Show Gist options
  • Save shrubb/891327019c35a672099f476f75e03c93 to your computer and use it in GitHub Desktop.
Save shrubb/891327019c35a672099f476f75e03c93 to your computer and use it in GitHub Desktop.
PyTorch 1.9.1 build command
LIBS_ROOT=/nfs/hpc-4/hdd-raid/e_burkov/Libraries
# CMake variables (CMake will detect them)
CUDNN_ROOT=$LIBS_ROOT/cudnn-11.3
export CUDNN_LIBRARY_PATH=$CUDNN_ROOT/lib64/libcudnn.so
export CUDNN_LIBRARY=$CUDNN_ROOT/lib64
export CUDNN_INCLUDE_PATH=$CUDNN_ROOT/include
export CUDNN_INCLUDE_DIR=$CUDNN_ROOT/include
# Environment variables that will be detected too but aren't CMake variables
export MAGMA_HOME=$LIBS_ROOT/magma-2.5.4/install
# setup.py variables
export USE_SYSTEM_NCCL=1
NCCL=$LIBS_ROOT/nccl_2.9.8-1+cuda11.0_x86_64
export NCCL_LIB_DIR=$NCCL/lib
export NCCL_INCLUDE_DIR=$NCCL/include
export MAX_JOBS=40
export TORCH_CUDA_ARCH_LIST="5.2;6.1"
export CUDA_HOME=/usr/local/cuda
export BUILD_TEST=0
export BLAS=OpenBLAS
nohup time python3 setup.py build --cmake-only > cmake-log.txt 2>&1 &
nohup time python3 setup.py bdist_wheel -v > build-log.txt 2>&1 &
pip3 install dist/*whl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment