-
Notifications
You must be signed in to change notification settings - Fork 116
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
[HIP] Explicitly specify copy direction for USM 2D async memory copies #1194
[HIP] Explicitly specify copy direction for USM 2D async memory copies #1194
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1194 +/- ##
=======================================
Coverage 15.73% 15.73%
=======================================
Files 223 223
Lines 31477 31478 +1
Branches 3558 3558
=======================================
+ Hits 4953 4954 +1
Misses 26473 26473
Partials 51 51 ☔ View full report in Codecov by Sentry. |
An |
e84debd
to
3daeb25
Compare
Updated this now, changes applicable to using ROCm HIP version 5.6.0 and above only. |
4c5c755
to
f01cf61
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
A minor issue might be using empty curly braces on declrations, which seems inconsistent with the rest of the file.
Why did you close this @GeorgeWeb ? We could still use this fix |
Didn't mean to actually. Re-opening now. |
f01cf61
to
05e9682
Compare
e13e89d
to
64b99d2
Compare
Pinging @npmiller @hdelan @mmoadeli for final thoughts. Thanks! Based on discussion in the original issue raised in ROCm/clr it seems this workaround will be needed as the fix is not going to be cherry-picked into older releases. Also it is unclear which of the next releases will have the fix, when that is clear this patch can be ifdef'd for the range of releases starting from ROCm 5.6.0 until ROCm 6.x that has their fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I might just add a comment to say TODO: Add HIP max version when bug has been fixed
just at the ifdef
Yeah makes sense. Easy to lose track of these. |
45627fc
to
22244fa
Compare
22244fa
to
dbff2e8
Compare
That reasoning makes sense to me |
There is an issue with
hipMemcpy2D*
whenhipMemcpyDefault
is used, which makes the HIP runtime not correctly derive the copy kind (direction) for the copies introduced since ROCm 5.6.0. See: ROCm/clr#40.This PR aims to provide a work-around in the meantime even though having to introduce the overhead of
hipPointerGetAttributes
in the memcpy2D. It patches it to work for the all possible copy kind directions (host / device / os-allocated host pageable memory) explicitly. Ideally, ROCm will fix the API when using justhipMemcpyDefault
going forward.Testing: intel/llvm/pull/12200