Skip to content

[SYCL] Reverse max work-group size order #1177

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

Merged
merged 1 commit into from
Mar 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions sycl/source/detail/device_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,19 @@ struct get_device_info<bool, info::device::kernel_kernel_pipe_support> {
}
};

// Specialization for max_work_item_sizes.
// Due to the flipping of work group dimensions before kernel launch, the max
// sizes should also be reversed.
template <> struct get_device_info<id<3>, info::device::max_work_item_sizes> {
static id<3> get(RT::PiDevice dev, const plugin &Plugin) {
size_t result[3];
Plugin.call<PiApiKind::piDeviceGetInfo>(
dev, pi::cast<RT::PiDeviceInfo>(info::device::max_work_item_sizes),
sizeof(result), &result, nullptr);
return id<3>(result[2], result[1], result[0]);
}
};

// SYCL host device information

// Default template is disabled, all possible instantiations are
Expand Down