Skip to content

Adding in needed hipunregister in Unit_hipFreeNegativeHost#15

Merged
colleeneb merged 1 commit into
chipStar-hip-7from
chipStar-hip-7-add-free
Jun 4, 2026
Merged

Adding in needed hipunregister in Unit_hipFreeNegativeHost#15
colleeneb merged 1 commit into
chipStar-hip-7from
chipStar-hip-7-add-free

Conversation

@colleeneb
Copy link
Copy Markdown

This is to resolve #14 .

This test

HIP/tests/catch/unit/memory/hipFree.cc

is wrong. It should hipHostUnregister the memory, since it is called for each flag in GENERATE. In unfortunate cases, the hostPtr will be the same address, and it will fail since it's trying to re-register a pointer it already registered. By the spec it should fail with hipErrorHostMemoryAlreadyRegistered.

The newer version of hip-tests has this fixed: https://github.com/ROCm/hip-tests/blob/d01e1f96059edc25600eb13434d7e2b71c09af01/catch/unit/memory/hipFree.cc#L163

@colleeneb colleeneb merged commit 609b312 into chipStar-hip-7 Jun 4, 2026
@colleeneb colleeneb deleted the chipStar-hip-7-add-free branch June 4, 2026 15:39
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