diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 8225d93655..1946012ca4 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -109,8 +109,12 @@ if(BUILD_MSAN) add_link_options(-fsanitize=memory) endif(BUILD_MSAN) +# Note: -UNDEBUG is applied via CUOPT_CXX_FLAGS / CUOPT_CUDA_FLAGS (not add_definitions) +# to avoid leaking into dependencies that are built in-tree. if(DEFINE_ASSERT) add_definitions(-DASSERT_MODE) + list(APPEND CUOPT_CXX_FLAGS -UNDEBUG) + list(APPEND CUOPT_CUDA_FLAGS -UNDEBUG) endif(DEFINE_ASSERT) if(DEFINE_BENCHMARK) @@ -184,13 +188,6 @@ elseif(CMAKE_CUDA_LINEINFO) set(CMAKE_CUDA_FLAGS_RELEASE "${CMAKE_CUDA_FLAGS_RELEASE} -lineinfo") endif(CMAKE_BUILD_TYPE MATCHES Debug) -# Undefine NDEBUG if assert mode is on -if(DEFINE_ASSERT) - message(STATUS "Undefining NDEBUG with assert mode enabled") - add_definitions(-UNDEBUG) -endif() - - # ################################################################################################## # - find CPM based dependencies ------------------------------------------------------------------ rapids_cpm_init() diff --git a/cpp/tests/linear_programming/c_api_tests/c_api_tests.cpp b/cpp/tests/linear_programming/c_api_tests/c_api_tests.cpp index 995b2194c4..d39a970763 100644 --- a/cpp/tests/linear_programming/c_api_tests/c_api_tests.cpp +++ b/cpp/tests/linear_programming/c_api_tests/c_api_tests.cpp @@ -382,7 +382,7 @@ class CPUOnlyTestEnvironment { // TODO: Add numerical assertions once gRPC remote solver replaces the stub implementation. // Currently validates that the CPU-only C API path completes without errors. -TEST(c_api_cpu_only, DISABLED_lp_solve) +TEST(c_api_cpu_only, lp_solve) { CPUOnlyTestEnvironment env; const std::string& rapidsDatasetRootDir = cuopt::test::get_rapids_dataset_root_dir(); @@ -391,7 +391,7 @@ TEST(c_api_cpu_only, DISABLED_lp_solve) } // TODO: Add numerical assertions once gRPC remote solver replaces the stub implementation. -TEST(c_api_cpu_only, DISABLED_mip_solve) +TEST(c_api_cpu_only, mip_solve) { CPUOnlyTestEnvironment env; const std::string& rapidsDatasetRootDir = cuopt::test::get_rapids_dataset_root_dir(); diff --git a/python/cuopt/cuopt/tests/linear_programming/test_cpu_only_execution.py b/python/cuopt/cuopt/tests/linear_programming/test_cpu_only_execution.py index e8dd179e05..792942aae9 100644 --- a/python/cuopt/cuopt/tests/linear_programming/test_cpu_only_execution.py +++ b/python/cuopt/cuopt/tests/linear_programming/test_cpu_only_execution.py @@ -168,8 +168,6 @@ def _impl_warmstart_cpu_only(): class TestCPUOnlyExecution: """Tests that run with CUDA_VISIBLE_DEVICES='' to simulate CPU-only hosts.""" - pytestmark = pytest.mark.skip(reason="CPU-only tests temporarily disabled") - @pytest.fixture def env(self): return _cpu_only_env() @@ -203,8 +201,6 @@ def test_warmstart_cpu_only(self, env): class TestCuoptCliCPUOnly: """Test that cuopt_cli runs without CUDA in remote-execution mode.""" - pytestmark = pytest.mark.skip(reason="CPU-only tests temporarily disabled") - @pytest.fixture def env(self): return _cpu_only_env()