"docs/vscode:/vscode.git/clone" did not exist on "83ca21f539e583df9c6f6845ec00f6a8e0a8e237"
Unverified Commit 34641092 authored by Hongzhi (Steve), Chen's avatar Hongzhi (Steve), Chen Committed by GitHub
Browse files

[Misc] Cleanup old flags, and rely on BUILD_TYPE for all features. (#6154)


Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-28-63.ap-northeast-1.compute.internal>
parent 71194229
......@@ -13,106 +13,100 @@ include(cmake/util/Util.cmake)
include(cmake/util/MshadowUtil.cmake)
include(cmake/util/FindCUDA.cmake)
# TODO(#5475): Clean up the old flags after CI and regression framework adopt to the new setup.
if (NOT DEFINED BUILD_TYPE)
dgl_option(USE_CUDA "Build with CUDA" OFF)
dgl_option(USE_OPENMP "Build with OpenMP" ON)
dgl_option(USE_LIBXSMM "Build with LIBXSMM library optimization" ON)
dgl_option(BUILD_CPP_TEST "Build cpp unittest executables" OFF)
dgl_option(LIBCXX_ENABLE_PARALLEL_ALGORITHMS "Enable the parallel algorithms library. This requires the PSTL to be available." OFF)
dgl_option(USE_S3 "Build with S3 support" OFF)
dgl_option(USE_HDFS "Build with HDFS support" OFF) # Set env HADOOP_HDFS_HOME if needed
dgl_option(REBUILD_LIBXSMM "Clean LIBXSMM build cache at every build" OFF) # Set env HADOOP_HDFS_HOME if needed
dgl_option(USE_EPOLL "Build with epoll for socket communicator" ON)
dgl_option(BUILD_TORCH "Build the PyTorch plugin" OFF)
dgl_option(BUILD_SPARSE "Build DGL sparse library" ON)
dgl_option(BUILD_GRAPHBOLT "Build Graphbolt library" OFF)
dgl_option(TORCH_PYTHON_INTERPS "Python interpreter used to build tensoradapter and DGL sparse library" python3)
else()
# Options for building DGL.
# NOTE: do not modify this file to change option values.
# Use bash script/build_dgl.sh -e '-DOPTION=VALUE' through command-line.
dgl_option(
BUILD_TYPE
"Type of the build: dev, test or release"
"dev"
)
message(STATUS "Build for ${BUILD_TYPE}")
# Options for building DGL.
# NOTE: Please avoid editing this file to change build type. Instead, using
# bash script/build_dgl.sh -e -t release to overwrite the value.
dgl_option(
BUILD_TYPE
"Type of the build: dev, dogfood or release"
"dev"
)
message(STATUS "Build for ${BUILD_TYPE}")
dgl_option(
USE_CUDA
"Build with CUDA"
OFF
)
dgl_option(
TORCH_PYTHON_INTERPS
"Python interpreter used to build tensoradapter and DGL sparse library"
python3
)
dgl_option(
USE_CUDA
"Build with CUDA"
OFF
)
dgl_option(
TORCH_PYTHON_INTERPS
"Python interpreter used to build tensoradapter and DGL sparse library"
python3
)
# Options for building DGL features, supported: "none", "dev", "test", "release", "all".
# NOTE: do not modify this file to change option values.
# Use bash script/build_dgl.sh -e '-DFEATURE_NAME=ON/OFF' through command-line.
dgl_feature_option(
BUILD_SPARSE
"Build DGL sparse library"
"all"
)
dgl_feature_option(
BUILD_TORCH
"Build the PyTorch plugin"
"all"
)
dgl_feature_option(
USE_EPOLL
"Build with epoll for socket communicator"
"all"
)
dgl_feature_option(
USE_LIBXSMM
"Build with LIBXSMM library optimization"
"all"
)
dgl_feature_option(
USE_OPENMP
"Build with OpenMP"
"all"
)
# Options for building DGL features: "none," "dev," "dogfood," "release," and
# "all."
# "none" - The feature is OFF for all build types. This is used when
# disabling a feature.
# "dev" - The feature is ON for dev build. The default build from source
# and the build for unit tests are using this build type.
# "dogfood" - The major function of this feature is done. The regression and
# benchmark framework are using this build type.
# "release" - The feature will be build for release.
# "all" - The feature is ON for all build types. Equivalent to set ["dev"
# "dogfood" "release"].
# NOTE: Please avoid editing this file to change feature options for a local
# build. Instead, using bash script/build_dgl.sh -e '-DFEATURE_NAME=ON/OFF' to
# overwrite the value.
dgl_feature_option(
BUILD_SPARSE
"Build DGL sparse library"
"all"
)
dgl_feature_option(
BUILD_TORCH
"Build the PyTorch plugin"
"all"
)
dgl_feature_option(
USE_EPOLL
"Build with epoll for socket communicator"
"all"
)
dgl_feature_option(
USE_LIBXSMM
"Build with LIBXSMM library optimization"
"all"
)
dgl_feature_option(
USE_OPENMP
"Build with OpenMP"
"all"
)
dgl_feature_option(
BUILD_GRAPHBOLT
"Build Graphbolt library"
"dev" "test"
)
dgl_feature_option(
BUILD_GRAPHBOLT
"Build Graphbolt library"
"dev" "dogfood"
)
dgl_feature_option(
LIBCXX_ENABLE_PARALLEL_ALGORITHMS
"Enable the parallel algorithms library. This requires the PSTL to be available."
"none"
)
dgl_feature_option(
REBUILD_LIBXSMM
"Clean LIBXSMM build cache at every build"
"none"
)
dgl_feature_option(
USE_HDFS
"Build with HDFS support"
"none"
) # Set env HADOOP_HDFS_HOME if needed
dgl_feature_option(
USE_S3
"Build with S3 support"
"none"
)
dgl_feature_option(
LIBCXX_ENABLE_PARALLEL_ALGORITHMS
"Enable the parallel algorithms library. This requires the PSTL to be available."
"none"
)
dgl_feature_option(
REBUILD_LIBXSMM
"Clean LIBXSMM build cache at every build"
"none"
)
dgl_feature_option(
USE_HDFS
"Build with HDFS support"
"none"
) # Set env HADOOP_HDFS_HOME if needed
dgl_feature_option(
USE_S3
"Build with S3 support"
"none"
)
# Build cpp test only in test build.
dgl_feature_option(
BUILD_CPP_TEST
"Build cpp unittest executables"
"test"
)
endif()
# Only build C++ tests for unit testing purposes in dev build.
dgl_feature_option(
BUILD_CPP_TEST
"Build cpp unittest executables"
"dev"
)
# Set debug compile option for gdb, only happens when -DCMAKE_BUILD_TYPE=DEBUG
if (NOT MSVC)
......
......@@ -14,7 +14,7 @@ macro(dgl_feature_option variable description)
foreach(arg ${ARGN})
if(arg STREQUAL "all")
__dgl_option(${variable} "${description}" ON)
elseif(arg STREQUAL "dev" OR arg STREQUAL "test" OR arg STREQUAL "release")
elseif(arg STREQUAL "dev" OR arg STREQUAL "dogfood" OR arg STREQUAL "release")
list(APPEND __value ${arg})
endif()
endforeach()
......
......@@ -20,7 +20,7 @@ OPTIONS:
-e Extra arguments of cmake.
-g Restart CUDA build.
-r Remove all intermediate output.
-t Type of the build: dev, test or release (default: dev).
-t Type of the build: dev, dogfood or release (default: dev).
EOF
}
......
......@@ -21,6 +21,6 @@ The code organization goes as follows:
Compile with unittest by executing the command below
```
# Assume current directory is the root directory of dgl, and googletest submodule is initialized
bash script/build_dgl.sh -c -r -e '-DBUILD_TYPE=test'
bash script/build_dgl.sh -c -r
./runUnitTests
```
......@@ -13,7 +13,7 @@ SET TEMP=%WORKSPACE%\tmp
SET TMPDIR=%WORKSPACE%\tmp
PUSHD build
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
cmake -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
COPY /Y Release\runUnitTests.exe .
POPD
......
......@@ -7,9 +7,6 @@ if [ $# -ne 1 ]; then
exit -1
fi
# Build for testing.
CMAKE_VARS="-DBUILD_TYPE=test"
if [[ $1 != "cpu" ]]; then
CMAKE_VARS="$CMAKE_VARS -DUSE_CUDA=ON"
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