From 2ca07f26094c2b5b1b6a0a8f139b6fae15a2ab86 Mon Sep 17 00:00:00 2001 From: Max Buckley Date: Thu, 23 Jul 2026 10:46:57 +0200 Subject: [PATCH] fix(build): use rmm's device_uvector declaration, not a hand-rolled forward decl As of rmm 26.10, rmm::device_uvector is defined inside the ABI inline namespace rmm::RMM_ABI_NAMESPACE (rmm/detail/export.hpp). cuOpt's manual namespace rmm { template class device_uvector; } forward declaration in problem_checking.cuh injects a *second*, distinct rmm::device_uvector into the plain rmm namespace, so every use becomes ambiguous ('rmm::device_uvector is ambiguous'), which fails the build against rmm 26.10. Replace the hand-rolled forward declaration with #include so the correctly ABI-namespaced declaration is used. (cuOpt already disables the analogous thrust/cub ABI namespaces via -DTHRUST_DISABLE_ABI_NAMESPACE / -DCUB_DISABLE_NAMESPACE_MAGIC; rmm's ABI namespace is newer and has no such opt-out.) Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: Max Buckley --- cpp/src/pdlp/utilities/problem_checking.cuh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cpp/src/pdlp/utilities/problem_checking.cuh b/cpp/src/pdlp/utilities/problem_checking.cuh index 217080356c..5dc74808a2 100644 --- a/cpp/src/pdlp/utilities/problem_checking.cuh +++ b/cpp/src/pdlp/utilities/problem_checking.cuh @@ -10,10 +10,7 @@ #include #include -namespace rmm { -template -class device_uvector; -} // namespace rmm +#include namespace cuopt::mathematical_optimization {