-
Notifications
You must be signed in to change notification settings - Fork 194
Accommodate rmm breaking change #2114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 110
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 85
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 497
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 404
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 39
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 39
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 85
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 159
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 85
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 85
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 970
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 39
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 39
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 1193
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 81
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 39
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 1238
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 39
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 760
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 813
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 531
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 39
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 39
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 435
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 367
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 105
🌐 Web query:
RAFT library get_workspace_resource API documentation resource_ref💡 Result:
In the NVIDIA RAFT library, get_workspace_resource and get_workspace_resource_ref are related C++ APIs used to manage temporary workspace memory [1][2]. The get_workspace_resource API is defined in the raft::resource namespace [1][3]. It returns a pointer to an rmm::mr::limiting_resource_adaptor, which is used for temporary workspace allocations [1][2]. The function signature is: inline rmm::mr::limiting_resource_adaptor *get_workspace_resource(resources const &res) The documentation explicitly recommends using get_workspace_resource_ref for performing allocations instead of raw pointer access [1]. This function returns an rmm::device_async_resource_ref, which provides a safer, more modern interface for managing device memory resources within the RAFT framework [1]. Key points regarding these APIs: - Purpose: They allow RAFT algorithms and primitives to access a temporary workspace resource, which is managed via the raft::resources object [1][2][3]. - Resource Management: If the workspace resource has not been initialized on the provided resources object, calling these functions will attempt to load or populate it [1][2]. - Related Functions: RAFT also provides functions for workspace accounting, such as get_workspace_total_bytes, get_workspace_used_bytes, and get_workspace_free_bytes [1][2]. - Configuration: You can configure the workspace resource using set_workspace_resource, set_workspace_to_pool_resource, or set_workspace_to_global_resource [1][2][3]. For the most up-to-date information, you should refer to the official RAFT documentation for the version you are using, as these APIs are part of the core resources management layer [1][4].
Citations:
🌐 Web query:
rmm device_async_resource_ref RAFT workspace resource getter💡 Result:
In RAFT, the “workspace resource getter” returns an RMM non-owning async device memory resource reference: - get_workspace_resource_ref(resources const &res) returns rmm::device_async_resource_ref, described as “Get the workspace as a non-owning device_async_resource_ref.” [1] What rmm::device_async_resource_ref is (RMM/CCCL terminology): - rmm::device_async_resource_ref is an alias for a cuda::mr::async_resource_ref with the cuda::mr::device_accessible property. [2] So, for your query: - rmm::device_async_resource_ref + RAFT workspace resource getter refers to raft::core::resources “get_workspace_resource_ref”, which yields a non-owning workspace device async memory resource reference of type rmm::device_async_resource_ref. [1]
Citations:
🌐 Web query:
RAFT github rapidsai resource management get_workspace_resource_ref💡 Result:
In the RAPIDS RAFT library, get_workspace_resource_ref is a C++ function used to retrieve the workspace as a non-owning device_async_resource_ref [1][2]. It is defined within the raft::resource namespace and is designed for memory resource management in CUDA-accelerated applications [1][2]. Key details regarding this function: Functionality: It provides a non-owning reference to the workspace device memory resource managed by the raft::resources object [1][2]. Usage: It is the preferred method for allocations, as opposed to older pointer-based APIs like get_workspace_resource, which are being phased out in favor of reference-based alternatives to align with modern RMM (RAPIDS Memory Manager) and CCCL memory resource patterns [1][3][4][2]. Related APIs: For accounting queries, users should utilize get_workspace_total_bytes, get_workspace_used_bytes, and get_workspace_free_bytes [1][2]. Similarly, get_large_workspace_resource_ref exists for managing larger workspace resources [1][2]. This shift to reference-based APIs is part of a broader migration within the RAFT codebase to improve memory resource safety and consistency [3][4].
Citations:
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 218
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 98
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 98
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 298
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 234
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 1810
🏁 Script executed:
Repository: rapidsai/cuvs
Length of output: 77
Fix API mismatch in workspace resource accessor calls.
The code assigns results from
get_workspace_resource()andget_large_workspace_resource()(non-_refversions) to variables typed asrmm::device_async_resource_ref. These non-_refgetters return raw pointers (rmm::mr::limiting_resource_adaptor*), not reference types. The modern RAFT API providesget_workspace_resource_ref()andget_large_workspace_resource_ref()which correctly returnrmm::device_async_resource_refand are the intended accessors for resource management.Update the following locations:
cpp/src/neighbors/detail/cagra/cagra_build.cuhline 1703cpp/src/neighbors/detail/cagra/search_plan.cuhlines 61, 83cpp/src/neighbors/detail/cagra/utils.hppline 193🔧 Proposed fix example
📝 Committable suggestion
🤖 Prompt for AI Agents