Unverified Commit 33974963 authored by Hongzhi (Steve), Chen's avatar Hongzhi (Steve), Chen Committed by GitHub
Browse files

[Misc] Clean up build option for testing. (#6090)


Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-28-63.ap-northeast-1.compute.internal>
parent bdbc0178
...@@ -55,6 +55,11 @@ else() ...@@ -55,6 +55,11 @@ else()
"Build DGL sparse library" "Build DGL sparse library"
"dev" "test" "release" "dev" "test" "release"
) )
dgl_feature_option(
BUILD_TORCH
"Build the PyTorch plugin"
"dev" "test" "release"
)
dgl_feature_option( dgl_feature_option(
USE_EPOLL USE_EPOLL
"Build with epoll for socket communicator" "Build with epoll for socket communicator"
...@@ -77,11 +82,6 @@ else() ...@@ -77,11 +82,6 @@ else()
"dev" "test" "dev" "test"
) )
dgl_feature_option(
BUILD_TORCH
"Build the PyTorch plugin"
"none"
)
dgl_feature_option( dgl_feature_option(
LIBCXX_ENABLE_PARALLEL_ALGORITHMS LIBCXX_ENABLE_PARALLEL_ALGORITHMS
"Enable the parallel algorithms library. This requires the PSTL to be available." "Enable the parallel algorithms library. This requires the PSTL to be available."
......
...@@ -69,7 +69,7 @@ if [[ -z ${cuda} ]]; then ...@@ -69,7 +69,7 @@ if [[ -z ${cuda} ]]; then
else else
mkdir -p build mkdir -p build
cd build cd build
cmake -DUSE_CUDA=${cuda} ${extra_args} .. cmake -DBUILD_TYPE=dev -DUSE_CUDA=${cuda} ${extra_args} ..
fi fi
if [[ ${PWD} == "${DGL_HOME}/build" ]]; then if [[ ${PWD} == "${DGL_HOME}/build" ]]; then
......
...@@ -21,9 +21,6 @@ The code organization goes as follows: ...@@ -21,9 +21,6 @@ The code organization goes as follows:
Compile with unittest by executing the command below Compile with unittest by executing the command below
``` ```
# Assume current directory is the root directory of dgl, and googletest submodule is initialized # Assume current directory is the root directory of dgl, and googletest submodule is initialized
mkdir build bash script/build_dgl.sh -c -r -e '-DBUILD_TYPE=test'
cd build
cmake .. -DBUILD_CPP_TEST=1
make -j${nproc}
./runUnitTests ./runUnitTests
``` ```
...@@ -13,7 +13,7 @@ SET TEMP=%WORKSPACE%\tmp ...@@ -13,7 +13,7 @@ SET TEMP=%WORKSPACE%\tmp
SET TMPDIR=%WORKSPACE%\tmp SET TMPDIR=%WORKSPACE%\tmp
PUSHD build PUSHD build
cmake -DCMAKE_CXX_FLAGS="/DDGL_EXPORTS" -DUSE_OPENMP=ON -DBUILD_TORCH=ON -DBUILD_GRAPHBOLT=ON -Dgtest_force_shared_crt=ON -DDMLC_FORCE_SHARED_CRT=ON -DBUILD_CPP_TEST=1 -DCMAKE_CONFIGURATION_TYPES="Release" -DTORCH_PYTHON_INTERPS=python -DBUILD_SPARSE=ON .. -G "Visual Studio 16 2019" || EXIT /B 1 cmake -DBUILD_TYPE=test -DCMAKE_CXX_FLAGS="/DDGL_EXPORTS" -Dgtest_force_shared_crt=ON -DDMLC_FORCE_SHARED_CRT=ON -DCMAKE_CONFIGURATION_TYPES="Release" -DTORCH_PYTHON_INTERPS=python .. -G "Visual Studio 16 2019" || EXIT /B 1
msbuild dgl.sln /m /nr:false || EXIT /B 1 msbuild dgl.sln /m /nr:false || EXIT /B 1
COPY /Y Release\runUnitTests.exe . COPY /Y Release\runUnitTests.exe .
POPD POPD
......
...@@ -7,7 +7,13 @@ if [ $# -ne 1 ]; then ...@@ -7,7 +7,13 @@ if [ $# -ne 1 ]; then
exit -1 exit -1
fi fi
CMAKE_VARS="-DBUILD_CPP_TEST=ON -DUSE_OPENMP=ON -DBUILD_GRAPHBOLT=ON" # Build for testing.
CMAKE_VARS="-DBUILD_TYPE=test"
if [[ $1 != "cpu" ]]; then
CMAKE_VARS="$CMAKE_VARS -DUSE_CUDA=ON"
fi
# This is a semicolon-separated list of Python interpreters containing PyTorch. # This is a semicolon-separated list of Python interpreters containing PyTorch.
# The value here is for CI. Replace it with your own or comment this whole # The value here is for CI. Replace it with your own or comment this whole
# statement for default Python interpreter. # statement for default Python interpreter.
...@@ -15,16 +21,12 @@ if [ "$1" != "cugraph" ]; then ...@@ -15,16 +21,12 @@ if [ "$1" != "cugraph" ]; then
# We do not build pytorch for cugraph because currently building # We do not build pytorch for cugraph because currently building
# pytorch against all the supported cugraph versions is not supported # pytorch against all the supported cugraph versions is not supported
# See issue: https://github.com/rapidsai/cudf/issues/8510 # See issue: https://github.com/rapidsai/cudf/issues/8510
CMAKE_VARS="$CMAKE_VARS -DBUILD_TORCH=ON -DTORCH_PYTHON_INTERPS=/opt/conda/envs/pytorch-ci/bin/python" CMAKE_VARS="$CMAKE_VARS -DTORCH_PYTHON_INTERPS=/opt/conda/envs/pytorch-ci/bin/python"
else else
# Disable sparse build as cugraph docker image lacks cuDNN. # Disable sparse build as cugraph docker image lacks cuDNN.
CMAKE_VARS="$CMAKE_VARS -DBUILD_TORCH=OFF -DBUILD_SPARSE=OFF" CMAKE_VARS="$CMAKE_VARS -DBUILD_TORCH=OFF -DBUILD_SPARSE=OFF"
fi fi
if [[ $1 != "cpu" ]]; then
CMAKE_VARS="-DUSE_CUDA=ON $CMAKE_VARS"
fi
if [ -d build ]; then if [ -d build ]; then
rm -rf build rm -rf build
fi 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