-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[Offload][SYCL] Refactor OffloadKind implementation #135809
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,10 +32,12 @@ namespace object { | |
/// The producer of the associated offloading image. | ||
enum OffloadKind : uint16_t { | ||
OFK_None = 0, | ||
OFK_OpenMP, | ||
OFK_Cuda, | ||
OFK_HIP, | ||
OFK_LAST, | ||
OFK_OpenMP = (1 << 1), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is 2, not 1. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed in c0bc689 Thanks |
||
OFK_FIRST = OFK_OpenMP, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch. I will update. Thanks There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed in c0bc689 Thanks |
||
OFK_Cuda = (1 << 2), | ||
OFK_HIP = (1 << 3), | ||
OFK_SYCL = (1 << 4), | ||
OFK_LAST = (1 << 5), | ||
}; | ||
|
||
/// The type of contents the offloading image contains. | ||
|
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.
This code doesn't need to be modified, but I guess we could if we wanted to get rid of the set. I don't think it's necessary now though.
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 it is a good optimization to have (16-bit mask instead of a Set). Also, it will be easier to pass the mask to callee function when introducing support for SYCL in my original PR.
Thanks