UCT/DEVICE: use CPU mem as AMO local buf#11345
Open
jeynmann wants to merge 8 commits intoopenucx:masterfrom
Open
UCT/DEVICE: use CPU mem as AMO local buf#11345jeynmann wants to merge 8 commits intoopenucx:masterfrom
jeynmann wants to merge 8 commits intoopenucx:masterfrom
Conversation
ofirfarjun7
reviewed
Apr 15, 2026
| } | ||
|
|
||
| status = uct_rc_gdaki_reg_mr(&md->super, self->atomic_buff, | ||
| status = uct_rc_gdaki_reg_mr(&md->super, &self->atomic_buff, |
Contributor
There was a problem hiding this comment.
can call uct_ib_reg_mr directly without dma_buf
ofirfarjun7
reviewed
Apr 15, 2026
| } | ||
|
|
||
| if (self->ep_alloc_mode == UCT_RC_GDAKI_EP_ALLOC_MODE_POOL) { | ||
| status = uct_rc_gdaki_iface_init_channel_pool(self, config); |
Contributor
There was a problem hiding this comment.
Next PR we can probably move init channel pool to ep creation and also retain cuda ctx there.
rakhmets
previously approved these changes
Apr 16, 2026
yosefe
reviewed
Apr 16, 2026
| return dmabuf_supported; | ||
| } | ||
|
|
||
| #if HAVE_DECL_MLX5DV_UMEM_MASK_DMABUF |
Contributor
There was a problem hiding this comment.
maybe move this function completely inside uct_rc_gdaki_umem_reg?
| struct ibv_mr *atomic_mr; | ||
| CUdeviceptr atomic_raw; | ||
| uint64_t *atomic_buff; | ||
| uint64_t atomic_buff; |
Contributor
There was a problem hiding this comment.
i'd consider allocating separate atomic buffer with posix_memalign(size=8 align=UCS_SYS_CACHE_LINE_SIZE)
Contributor
|
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.
What?
Use CPU memory as the AMO swap local buffer.
Why?
By using CPU memory as the AMO local buffer, we're able to prevent CUDA context retain during iface init.
Amo local buf on cpu:
Amo local buf on gpu: