fix: build against rmm 26.10 (use rmm's device_uvector declaration)#1606
Open
maxwbuckley wants to merge 1 commit into
Open
fix: build against rmm 26.10 (use rmm's device_uvector declaration)#1606maxwbuckley wants to merge 1 commit into
maxwbuckley wants to merge 1 commit into
Conversation
…orward 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 <typename T> 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 <rmm/device_uvector.hpp>
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) <noreply@anthropic.com>
Signed-off-by: Max Buckley <maxwbuckley@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe problem-checking header now includes RMM’s official ChangesRMM declaration alignment
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
maxwbuckley
force-pushed
the
fix/rmm-abi-namespace-fwd-decl
branch
from
July 23, 2026 09:12
d47fcd6 to
2ca07f2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Building
libcuoptfrom source against rmm 26.10 fails to compile becausecpp/src/pdlp/utilities/problem_checking.cuhhand-rolls a forward declaration ofrmm::device_uvectorin the plainrmmnamespace:rmm 26.10 places
device_uvectorin an ABI inline namespace (rmm::RMM_ABI_NAMESPACE, seermm/detail/export.hpp), so this hand-rolled declaration creates a second, distinctrmm::device_uvector. Every use then becomes ambiguous:with cascading
namespace "cuopt::raft" has no member "add_op"and thrust"this pragma must immediately precede a declaration"errors in the same translation units.This is the only manual rmm forward declaration in the tree. cuOpt already opts out of thrust's and cub's ABI namespaces (
-DTHRUST_DISABLE_ABI_NAMESPACE/-DCUB_DISABLE_NAMESPACE_MAGIC); rmm's ABI inline namespace is newer and has no such opt-out, so the plain forward declaration no longer matches rmm's real declaration.Change
Replace the hand-rolled forward declaration with
#include <rmm/device_uvector.hpp>, so rmm's own (correctly ABI-namespaced) declaration is used.Testing
Built
libcuopt(LP + MIP) from source against rmm/raft 26.10 + CCCL 3.4.0 (CUDA 13.3, GCC 14,sm_120a):device_uvector is ambiguouserrors above.solve_LPreturns correct optima —afiro→-464.7531(known optimum), and a set of small LPs match HiGHS to ≤ 1e-6 relative error — and the MIP path runs.Fixes #1605.