Skip to content

docs(hip): update host memory document examples#3904

Open
coderxkk wants to merge 2 commits into
ROCm:developfrom
coderxkk:doc/update-host-memory-example
Open

docs(hip): update host memory document examples#3904
coderxkk wants to merge 2 commits into
ROCm:developfrom
coderxkk:doc/update-host-memory-example

Conversation

@coderxkk

Copy link
Copy Markdown

Associated JIRA ticket number/Github issue number

None

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Continuous Integration

What were the changes?

Revised the code sample in the Host memory documentation: removed the confusing redundant copy of host_input after kernel execution, and added the standard memory copy operation from device_output back to host_output to retrieve kernel calculation results.

Why are these changes needed?

The original example mistakenly re - copied host_input to device_input after kernel execution, which can be confusing for beginners.

Updated CHANGELOG?

  • Yes
  • No, Does not apply to this PR.

Added/Updated documentation?

  • Yes
  • No, Does not apply to this PR.

Additional Checks

  • I have added tests relevant to the introduced functionality, and the unit tests are passing locally.
  • Any dependent changes have been merged.

zekun.wang added 2 commits July 12, 2026 09:52
The original example mistakenly re - copied `host_input` to `device_input` after kernel execution, which can be confusing for beginners.

After the kernel call, users usually copy the computed results from `device_output` back to `host_output` for result return or verification.
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.

1 participant