Unverified Commit cb39eae1 authored by Vikram Sharma's avatar Vikram Sharma Committed by GitHub
Browse files

Supporting DGL build with arch specific optimization (#3996)

Based on the pull request: https://github.com/dmlc/dgl/pull/3983
parent 1a6806e2
......@@ -13,6 +13,12 @@ CMAKE_VARS="-DBUILD_CPP_TEST=ON -DUSE_OPENMP=ON -DBUILD_TORCH=ON"
# statement for default Python interpreter.
CMAKE_VARS="$CMAKE_VARS -DTORCH_PYTHON_INTERPS=/opt/conda/envs/pytorch-ci/bin/python"
#This is implemented to detect underlying architecture and enable arch specific optimization.
arch=`uname -m`
if [[ $arch == *"x86"* ]]; then
CMAKE_VARS="-DUSE_AVX=ON $CMAKE_VARS"
fi
if [ "$1" == "gpu" ]; then
CMAKE_VARS="-DUSE_CUDA=ON -DUSE_NCCL=ON $CMAKE_VARS"
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment