项目文件夹

文件
Hongzhi (Steve), Chen 325e795a18 Revert "Set USE_LIBXSMM default to OFF. (#5287)" (#5392)
This reverts commit a5e3139155.
2023-03-01 16:47:34 +08:00

25 行
562 B
Bash

#!/bin/bash
set -e
# Default building only with cpu
DEVICE=${DGL_BENCH_DEVICE:-cpu}
pip install -r /asv/torch_gpu_pip.txt
# build
# 'CUDA_TOOLKIT_ROOT_DIR' is always required for sparse build as torch1.13.1+cu116 is installed.
CMAKE_VARS="-DUSE_OPENMP=ON -DBUILD_TORCH=ON -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda"
if [[ $DEVICE == "gpu" ]]; then
CMAKE_VARS="-DUSE_CUDA=ON -DUSE_NCCL=ON $CMAKE_VARS"
fi
arch=`uname -m`
if [[ $arch == *"x86"* ]]; then
CMAKE_VARS="-DUSE_AVX=ON $CMAKE_VARS"
fi
mkdir -p build
pushd build
cmake $CMAKE_VARS ..
make -j8
popd