Tracking memory resources#3
Open
achirkin wants to merge 13 commits intofea-unify-memory-resourcesfrom
Open
Conversation
This option allows generating dependencies without `libucx` in the dependencies list, which is something we have to do for NVAIE/DLFW builds. Authors: - Paul Taylor (https://github.com/trxcllnt) Approvers: - James Lamb (https://github.com/jameslamb) URL: rapidsai#2975
…apidsai#2974) The per-row offset `l_offset = (offset + batch_id) * len` was stored as `IdxT`, which silently overflows when the total matrix size exceeds the range of a 32-bit index type. Both `offset` and `batch_id` are already `size_t`, so the multiplication naturally produces a `size_t`, but truncating it back to `IdxT` caused incorrect pointer arithmetic in the kernels. Introduced a layout-policy abstraction (`dense_layout` / `csr_layout`) in a new header `select_k_layout.cuh`. This replaced the `len_or_indptr` boolean template parameter, to improve the API and push the related computations to compile-time for all select-k kernels. Authors: - Yan Zaretskiy (https://github.com/yan-zaretskiy) Approvers: - Artem M. Chirkin (https://github.com/achirkin) URL: rapidsai#2974
This reverts commit e9901c6.
This PR updates the repository to version 26.06. This is part of the 26.04 release burndown process.
Fixes these `pre-commit` errors ```text In file RAPIDS_BRANCH:1:9: release/26.04 warning: do not hard-code version, read from VERSION file instead In file RAPIDS_BRANCH:1:9: release/26.04 verify-hardcoded-version-ucxx............................................Failed - hook id: verify-hardcoded-version - exit code: 1 In file UCXX_BRANCH:1:9: release/0.49 warning: do not hard-code version, read from UCXX_VERSION file instead In file UCXX_BRANCH:1:9: release/0.49 ``` See rapidsai/pre-commit-hooks#121 for details Authors: - James Lamb (https://github.com/jameslamb) Approvers: - Kyle Edwards (https://github.com/KyleFromNVIDIA) URL: rapidsai#2980
Forward-merge release/26.04 into main
Use `cuda::mr::any_synchronous_resource` for host, pinned, and managed resource types and give the user explicit control for host, pinned, and managed resources.
#### New
- `raft::resource::managed_memory_resource` and `raft::resource::pinned_memory_resource` are passed to managed and pinned mdarrays during construction via corresponding container policies. This allows the user to replace/modify these resources, for example, to add logging or memory pooling.
- `raft::mr::get_default_host_resource` and `raft::mr::set_default_host_resource` can be used by the user to alter the default host resource the same way. It is not stored in `raft::resources` handle like the other two for two reasons:
1. To mirror rmm default device resource getter/setter
2. To avoid breaking the `raft::make_host_mdarray` overloads that do not take `raft::resources` as an argument (many instances across raft and cuvs).
#### Changed
- Use `raft::mr::host_resource_ref` and `raft::mr::host_device_resource_ref` for the non-owning semantics (defined as `cuda::mr::synchronous_resource_ref` with appropriate access attributes)
- Use `raft::host_resource` and `raft::host_device_resource` for owning semantics (defined as `cuda::mr::any_synchronous_resource` with appropriate access attributes)
With these changes, raft fully switches to `cuda::mr` types for host and host-device resources, while still using `rmm` types for device async resources. Changing the latter would break a lot of cuVS and is not needed - `rmm` will eventually fully converge to `cuda::mr` anyway.
#### Breaking changes
- Rename container policies
- Reuse of a single `host_container` for the three types of resources.
- Switch to using `cuda::mr::any_synchronous_resource` from `std::pmr::memory_resource`
The effect of this changes should be limited, because the policies are hidden behind the mdarray templates and synonyms and the `std::pmr::memory_resource` was introduced recently and haven't been used much.
Authors:
- Artem M. Chirkin (https://github.com/achirkin)
Approvers:
- Bradley Dice (https://github.com/bdice)
- Tamas Bela Feher (https://github.com/tfeher)
URL: rapidsai#2968
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.
This PR is to show an isolated set of changes for rapidsai#2973