Skip to content

Conversation

frasercrmck
Copy link
Contributor

We can only call hipMemAdvise on managed pointers allocated via hipMallocManaged, so can only support the UR entry point on pointers allocated via urUSMSharedAlloc.

When faced with other pointers, we're supposed to ignore them and result "success", but instead this PR continues the tradition of returning UR_RESULT_ERROR_ADAPTER_SPECIFIC with a warning message providing the user more information. This should all be fixed up later when there's a better warning mechanism.

@frasercrmck frasercrmck requested a review from GeorgeWeb June 19, 2024 09:58
@frasercrmck frasercrmck requested review from a team as code owners June 19, 2024 09:58
@github-actions github-actions bot added conformance Conformance test suite issues. hip HIP adapter specific issues labels Jun 19, 2024
Copy link
Contributor

@GeorgeWeb GeorgeWeb left a comment

Choose a reason for hiding this comment

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

Thank you! LGTM

@frasercrmck frasercrmck added the ready to merge Added to PR's which are ready to merge label Jun 19, 2024
We can only call hipMemAdvise on managed pointers allocated via
hipMallocManaged, so can only support the UR entry point on pointers
allocated via urUSMSharedAlloc.

When faced with other pointers, we're supposed to ignore them and result
"success", but instead this PR continues the tradition of returning
UR_RESULT_ERROR_ADAPTER_SPECIFIC with a warning message providing the
user more information. This should all be fixed up later when there's a
better warning mechanism.
@frasercrmck frasercrmck force-pushed the hip-fix-unmanaged-usm-advise branch from 61c89ee to 53fee64 Compare June 19, 2024 16:14
@hdelan hdelan mentioned this pull request Jun 28, 2024
@callumfare
Copy link
Contributor

This was included in #1804 which has now merged

@callumfare callumfare closed this Jun 28, 2024
@frasercrmck frasercrmck deleted the hip-fix-unmanaged-usm-advise branch July 1, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conformance Conformance test suite issues. hip HIP adapter specific issues ready to merge Added to PR's which are ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants