-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[Offload] Add ol_dimensions_t and convert ranges from size_t -> uint32_t
#143901
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 |
|---|---|---|
|
|
@@ -499,12 +499,12 @@ Error olLaunchKernel_impl(ol_queue_handle_t Queue, ol_device_handle_t Device, | |
| auto *QueueImpl = Queue ? Queue->AsyncInfo : nullptr; | ||
| AsyncInfoWrapperTy AsyncInfoWrapper(*DeviceImpl, QueueImpl); | ||
| KernelArgsTy LaunchArgs{}; | ||
| LaunchArgs.NumTeams[0] = LaunchSizeArgs->NumGroupsX; | ||
| LaunchArgs.NumTeams[1] = LaunchSizeArgs->NumGroupsY; | ||
| LaunchArgs.NumTeams[2] = LaunchSizeArgs->NumGroupsZ; | ||
| LaunchArgs.ThreadLimit[0] = LaunchSizeArgs->GroupSizeX; | ||
| LaunchArgs.ThreadLimit[1] = LaunchSizeArgs->GroupSizeY; | ||
| LaunchArgs.ThreadLimit[2] = LaunchSizeArgs->GroupSizeZ; | ||
| LaunchArgs.NumTeams[0] = LaunchSizeArgs->NumGroups.x; | ||
|
Contributor
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. I'm surprised this isn't giving a warning of narrowing from u64 -> u32
Contributor
Author
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. https://godbolt.org/z/8Enn4z8o8 C++ doesn't care, I guess.
Contributor
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. I thought that was an LLVM default on warning? Maybe liboffload isn't using the right flags to build. |
||
| LaunchArgs.NumTeams[1] = LaunchSizeArgs->NumGroups.y; | ||
| LaunchArgs.NumTeams[2] = LaunchSizeArgs->NumGroups.z; | ||
| LaunchArgs.ThreadLimit[0] = LaunchSizeArgs->GroupSize.x; | ||
| LaunchArgs.ThreadLimit[1] = LaunchSizeArgs->GroupSize.y; | ||
| LaunchArgs.ThreadLimit[2] = LaunchSizeArgs->GroupSize.z; | ||
| LaunchArgs.DynCGroupMem = LaunchSizeArgs->DynSharedMemory; | ||
|
|
||
| KernelLaunchParamsTy Params; | ||
|
|
||
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.
These should probably be u32, that's how it is in the launch args and the CUDA structs.
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.
SYCL/UR and OpenCL use u32 for their ranges, while Level Zero seems to use
uint32_t... I guess it makes sense for Offload to useuint32_tas the most widely supported; I'll change it.