Skip to content

perftest: change to not initialize ROCm GPU buffer - #411

Merged
sshaulnv merged 1 commit into
linux-rdma:masterfrom
paklui:rocm-gpu-init
Oct 13, 2026
Merged

sshaulnv merged 1 commit into
linux-rdma:masterfrom
paklui:rocm-gpu-init

Conversation

@paklui

@paklui paklui commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

The ROCm memory backend reported can_init = true for buffers allocated with hipMalloc(). When can_init = true is set, then in initialize_buffer_content(), it would fill the GPU buffer with host CPU stores.

The other accelerator memory backends use can_init = false for device memory in their memory allocate buffer routine and leave the buffer content uninitialized, so we want to also be consistent and leave the buffer content uninitialized. To be consistent, this change sets can_init = false in rocm_memory_allocate_buffer(), matching the other accelerator backends so to have the same behavior.

This 1-liner change is limited to the ROCm memory backend. Verified with --enable-rocm --enable-rocm_dmabuf in build, and ran various perftests, like ib_write_bw and ib_write_lat with --use_rocm and --use_rocm_dmabuf between 2 nodes with AMD Instinct GPUs, runs complete, and bandwidth reaches line rate and latency unchanged.

Please review and thanks in advance.

Co-authored-by: Vijay Sampath <Vijay.Sampath@amd.com>
Signed-off-by: Pak Lui <pak.lui@amd.com>

@vijaysampath vijaysampath left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@paklui

paklui commented Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

hi @sshaulnv would you be able to review this PR for this 1-line change in the ROCm backend so it matches the other backends, thanks in advance!

@sshaulnv
sshaulnv merged commit 05200c2 into linux-rdma:master Oct 13, 2026
2 checks passed
@sshaulnv

Copy link
Copy Markdown
Contributor

@paklui , thanks for the contribution, merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants