Skip to content
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

[Documentation]: hipHostAllocWriteCombined apparently ignored #114

Open
ldrumm opened this issue Dec 12, 2024 · 3 comments
Open

[Documentation]: hipHostAllocWriteCombined apparently ignored #114

ldrumm opened this issue Dec 12, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@ldrumm
Copy link

ldrumm commented Dec 12, 2024

https://rocm.docs.amd.com/projects/HIP/en/docs-develop/reference/hip_runtime_api/global_defines_enums_structs_files/global_enum_and_defines.html#c.hipHostMallocWriteCombined suggests that the hipHostMallocWriteCombined flag

Allocates the memory as write-combined. On some system configurations, write-combined allocation may be transferred faster across the PCI Express bus, however, could have low read efficiency by most CPUs. It’s a good option for data transfer from host to device via mapped pinned memory.

However, it looks like it's not ever used by the rocm runtime. Its value is stored for later query with hipPointerGetAttributes, but I see no other uses of this value.

I'd like to see a clarification of this in the documentation. If I'm correct and it is indeed unused by the runtime, perhaps we could have some wording along the lines of "for CUDA compatibility; ignored"

@ppanchad-amd ppanchad-amd added the documentation Improvements or additions to documentation label Dec 12, 2024
@ppanchad-amd
Copy link

Hi @ldrumm. Internal ticket has been created to fix documentation. Thanks!

@harkgill-amd
Copy link
Contributor

Hi @ldrumm, the following changes have been made to the documentation ROCm/HIP@82d37bb. The updated documentation, including the new note, can be found at hipHostMallocWriteCombine API. Please let me know if you have any further questions, thanks!

@ldrumm
Copy link
Author

ldrumm commented Feb 12, 2025

As I mentioned above, the flag is ignored by the rocm runtime, so while the added sentence in ROCm/HIP@82d37bb is a helpful note on provenance, it's still not clear that this doesn't actually do anything in HIP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants