Skip to content

Commit dc7113b

Browse files
authored
Remove split compile by default (#1722)
The split compile option has shown nondeterministic behavior. Disabling it for now. Authors: - Nicolas Blin (https://github.com/Kh4ster) Approvers: - Ramakrishna Prabhu (https://github.com/ramakrishnap-nv) - Akif ÇÖRDÜK (https://github.com/akifcorduk) URL: #1722
1 parent 08ea3b6 commit dc7113b

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

build.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ARGS=$*
1414
REPODIR=$(cd "$(dirname "$0")"; pwd)
1515
LIBCUOPT_BUILD_DIR=${LIBCUOPT_BUILD_DIR:=${REPODIR}/cpp/build}
1616

17-
VALIDARGS="clean codegen libcuopt cuopt_grpc_server cuopt cuopt_server cuopt_sh_client docs deb -a -b -g -fsanitize -tsan -msan -v -l= --verbose-pdlp --build-lp-only --no-fetch-rapids --skip-c-python-adapters --skip-tests-build --skip-routing-build --skip-grpc-build --skip-fatbin-write --host-lineinfo [--cmake-args=\\\"<args>\\\"] [--cache-tool=<tool>] --install --allgpuarch --ci-only-arch --show_depr_warn -h --help"
17+
VALIDARGS="clean codegen libcuopt cuopt_grpc_server cuopt cuopt_server cuopt_sh_client docs deb -a -b -g -fsanitize -tsan -msan -v -l= --verbose-pdlp --build-lp-only --no-fetch-rapids --skip-c-python-adapters --skip-tests-build --skip-routing-build --skip-grpc-build --skip-fatbin-write --host-lineinfo --split-compile [--cmake-args=\\\"<args>\\\"] [--cache-tool=<tool>] --install --allgpuarch --ci-only-arch --show_depr_warn -h --help"
1818
HELP="$0 [<target> ...] [<flag> ...]
1919
where <target> is:
2020
clean - remove all existing build artifacts and configuration (start over)
@@ -45,6 +45,7 @@ HELP="$0 [<target> ...] [<flag> ...]
4545
--skip-grpc-build - skip building gRPC and protobuf components (auto-enabled with -tsan)
4646
--skip-fatbin-write - skip the fatbin write
4747
--host-lineinfo - build with debug line information for host code
48+
--split-compile - opt in to nvcc split compilation; builds may be nondeterministic
4849
--cache-tool=<tool> - pass the build cache tool (eg: ccache, sccache, distcc) that will be used
4950
to speedup the build process.
5051
--cmake-args=\\\"<args>\\\" - pass arbitrary list of CMake configuration options (escape all quotes in argument)
@@ -260,6 +261,11 @@ fi
260261
if hasArg --host-lineinfo; then
261262
HOST_LINEINFO=1
262263
fi
264+
if hasArg --split-compile; then
265+
# nvcc split compilation can produce nondeterministic cuOpt builds, so keep it opt-in.
266+
echo "WARNING: nvcc split compilation may produce nondeterministic cuOpt builds."
267+
export NVCC_PREPEND_FLAGS="${NVCC_PREPEND_FLAGS:+${NVCC_PREPEND_FLAGS} }--split-compile=0"
268+
fi
263269

264270
function contains_string {
265271
local search_string="$1"

cpp/CMakeLists.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ endif ()
190190
# Add jobserver flags for parallel compilation if PARALLEL_LEVEL is set
191191
if (PARALLEL_LEVEL AND NOT "${PARALLEL_LEVEL}" STREQUAL "")
192192
message(STATUS "Enabling nvcc parallel compilation support")
193-
list(APPEND CUOPT_CUDA_FLAGS --threads=0 --split-compile=0)
193+
list(APPEND CUOPT_CUDA_FLAGS --threads=0)
194194
if (USE_NVCC_JOBSERVER AND CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0)
195195
message(STATUS "Enabling nvcc jobserver support (NVCC >= 13.0)")
196196
list(APPEND CUOPT_CUDA_FLAGS --jobserver)
@@ -495,12 +495,6 @@ set(CUOPT_SRC_FILES)
495495
set(MPS_FAST_SRC_FILES)
496496
add_subdirectory(src)
497497

498-
# nvcc 13.0.3 ICE (signal 11) compiling sliding_window.cu with 7 GPU architectures;
499-
# --split-compile breaks the codegen into per-arch sub-jobs to avoid the crash
500-
set_source_files_properties(
501-
${CMAKE_CURRENT_SOURCE_DIR}/src/routing/local_search/sliding_window.cu
502-
PROPERTIES COMPILE_OPTIONS "--split-compile=0")
503-
504498
if (HOST_LINEINFO)
505499
set_source_files_properties(${CUOPT_SRC_FILES} DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTIES COMPILE_OPTIONS "-g1")
506500
endif ()

0 commit comments

Comments
 (0)