-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL][ABI] Subgroup Extension spec update #1600
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 all commits
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 |
---|---|---|
@@ -1,10 +1,5 @@ | ||
PARAM_TRAITS_SPEC_WITH_INPUT(kernel_sub_group, max_sub_group_size_for_ndrange, | ||
size_t, cl::sycl::range<3>) | ||
PARAM_TRAITS_SPEC_WITH_INPUT(kernel_sub_group, sub_group_count_for_ndrange, | ||
size_t, cl::sycl::range<3>) | ||
PARAM_TRAITS_SPEC_WITH_INPUT(kernel_sub_group, local_size_for_sub_group_count, | ||
cl::sycl::range<3>, size_t) | ||
PARAM_TRAITS_SPEC(kernel_sub_group, max_num_sub_groups, size_t) | ||
PARAM_TRAITS_SPEC(kernel_sub_group, compile_num_sub_groups, size_t) | ||
PARAM_TRAITS_SPEC(kernel_sub_group, compile_sub_group_size, size_t) | ||
|
||
PARAM_TRAITS_SPEC_WITH_INPUT(kernel_sub_group, max_sub_group_size, | ||
uint32_t, cl::sycl::range<3>) | ||
PARAM_TRAITS_SPEC(kernel_sub_group, max_num_sub_groups, uint32_t) | ||
PARAM_TRAITS_SPEC(kernel_sub_group, compile_num_sub_groups, uint32_t) | ||
PARAM_TRAITS_SPEC(kernel_sub_group, compile_sub_group_size, uint32_t) |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -120,55 +120,30 @@ get_kernel_work_group_info_host<info::kernel_work_group::private_mem_size>( | |||
} | ||||
// The kernel sub-group methods | ||||
|
||||
template <typename TOut, info::kernel_sub_group Param> | ||||
struct get_kernel_sub_group_info { | ||||
static TOut get(RT::PiKernel Kernel, RT::PiDevice Device, | ||||
const plugin &Plugin) { | ||||
TOut Result; | ||||
template <info::kernel_sub_group Param> struct get_kernel_sub_group_info { | ||||
static uint32_t get(RT::PiKernel Kernel, RT::PiDevice Device, | ||||
const plugin &Plugin) { | ||||
uint32_t Result; | ||||
// TODO catch an exception and put it to list of asynchronous exceptions | ||||
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.
Suggested change
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. Should this comment be removed? 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. AFAIK, this comment is not valid anymore. Most of the errors now reported through synchronous exceptions. |
||||
Plugin.call<PiApiKind::piKernelGetSubGroupInfo>( | ||||
Kernel, Device, cl_kernel_sub_group_info(Param), 0, nullptr, | ||||
sizeof(TOut), &Result, nullptr); | ||||
return Result; | ||||
} | ||||
}; | ||||
Kernel, Device, pi_kernel_sub_group_info(Param), 0, nullptr, | ||||
sizeof(uint32_t), &Result, nullptr); | ||||
|
||||
template <typename TOut, info::kernel_sub_group Param, typename TIn> | ||||
struct get_kernel_sub_group_info_with_input { | ||||
static TOut get(RT::PiKernel Kernel, RT::PiDevice Device, TIn In, | ||||
const plugin &Plugin) { | ||||
TOut Result; | ||||
// TODO catch an exception and put it to list of asynchronous exceptions | ||||
Plugin.call<PiApiKind::piKernelGetSubGroupInfo>( | ||||
Kernel, Device, cl_kernel_sub_group_info(Param), sizeof(TIn), &In, | ||||
sizeof(TOut), &Result, nullptr); | ||||
return Result; | ||||
} | ||||
}; | ||||
|
||||
template <info::kernel_sub_group Param> | ||||
struct get_kernel_sub_group_info_with_input<cl::sycl::range<3>, Param, size_t> { | ||||
static cl::sycl::range<3> get(RT::PiKernel Kernel, RT::PiDevice Device, | ||||
size_t In, const plugin &Plugin) { | ||||
size_t Result[3]; | ||||
// TODO catch an exception and put it to list of asynchronous exceptions | ||||
Plugin.call<PiApiKind::piKernelGetSubGroupInfo>( | ||||
Kernel, Device, cl_kernel_sub_group_info(Param), sizeof(size_t), &In, | ||||
sizeof(size_t) * 3, Result, nullptr); | ||||
return cl::sycl::range<3>(Result[0], Result[1], Result[2]); | ||||
} | ||||
}; | ||||
|
||||
template <info::kernel_sub_group Param> | ||||
struct get_kernel_sub_group_info_with_input<size_t, Param, cl::sycl::range<3>> { | ||||
static size_t get(RT::PiKernel Kernel, RT::PiDevice Device, | ||||
cl::sycl::range<3> In, const plugin &Plugin) { | ||||
struct get_kernel_sub_group_info_with_input { | ||||
static uint32_t get(RT::PiKernel Kernel, RT::PiDevice Device, | ||||
cl::sycl::range<3> In, const plugin &Plugin) { | ||||
size_t Input[3] = {In[0], In[1], In[2]}; | ||||
size_t Result; | ||||
uint32_t Result; | ||||
// TODO catch an exception and put it to list of asynchronous exceptions | ||||
Plugin.call<PiApiKind::piKernelGetSubGroupInfo>( | ||||
Kernel, Device, cl_kernel_sub_group_info(Param), sizeof(size_t) * 3, | ||||
Input, sizeof(size_t), &Result, nullptr); | ||||
Kernel, Device, pi_kernel_sub_group_info(Param), sizeof(size_t) * 3, | ||||
Input, sizeof(uint32_t), &Result, nullptr); | ||||
|
||||
return Result; | ||||
} | ||||
}; | ||||
|
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.
@garimagu the major version is updated once per release. You only need to update DEV_ABI version.
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.
Ok.
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.
uploaded the change. please review and approve. smaslov-intel has approved the changes other than the ABI version update.
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 we should (semi-)automate SYCL version update.
It's hard to manage multiple commits requiring version update.
@alexbatashev, could you create a post-commit job, which will create a PR with the version update if it's required, please?
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.
@bader I'll take a look into it