-
Notifications
You must be signed in to change notification settings - Fork 111
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
[OPENCL] Add UR handles to OPENCL adapter #1176
base: main
Are you sure you want to change the base?
[OPENCL] Add UR handles to OPENCL adapter #1176
Conversation
528ca1a
to
26bd60a
Compare
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 #1176 +/- ##
==========================================
- Coverage 14.82% 12.43% -2.40%
==========================================
Files 250 241 -9
Lines 36220 36242 +22
Branches 4094 4111 +17
==========================================
- Hits 5369 4506 -863
- Misses 30800 31732 +932
+ Partials 51 4 -47 ☔ View full report in Codecov by Sentry. |
ceb8b8e
to
ff5ebc1
Compare
f7b0de5
to
66d5282
Compare
adb6b3d
to
4777b93
Compare
11b092b
to
ff193b2
Compare
ff193b2
to
2821682
Compare
ab61e80
to
61ba805
Compare
Used Address sanitizer to check for memory leaks, fixed some in the UR layer here. Some are generated from OpenCL sources so left that, others are generated from UR CTS tests that will be fixed in this PR |
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 pending open discussions. This is an important change and I bet it wasn't fun to implement, thanks @omarahmed1111
bbf75b5
to
1c06a2b
Compare
ccbba77
to
9e6e28f
Compare
b95c58c
to
d9e1eee
Compare
99291e1
to
68b70b9
Compare
97dbfd0
to
820779f
Compare
820779f
to
78e362b
Compare
78e362b
to
70f7575
Compare
source/adapters/opencl/context.hpp
Outdated
auto URContext = | ||
std::make_unique<ur_context_handle_t_>(Ctx, DevCount, phDevices); | ||
Context = URContext.release(); | ||
CL_RETURN_ON_FAILURE(clRetainContext(Ctx)); |
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.
I think for native handles we should mirror l0's behaviour, that's where isNativeHandleOwned
was first implemented so we can assume it reflects the original intention. The UR handles don't retain the native handle, and isNativeHandleOwned
decides whether UR will release the native handle when the UR handle is released.
So for example l0 context tracks whether it owns its native handle (the param gets passed from here to here) and only uses that information when it comes to releasing the context here
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.
here's a draft for the new spec around native handles #2193
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.
That make sense, I changed it to mimic l0 behaviour.
ad7061f
to
50121a6
Compare
Redesign Opencl adapter by adding UR handles and get rid of the casting of the UR handles to OPENCL handles.
Intel/llvm testing