项目文件夹

文件
Rhett Ying 0c5d6f1b00 [BUILD] enable dgl sparse build in default (#5175)
* enable dgl sparse build in default

* disable sparse build on cugraph

* update
2023-01-16 14:01:39 +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