clc: add support for cl_khr_subgroup_shuffle and shuffle_relative
Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26504>
This commit is contained in:
@@ -64,6 +64,8 @@ struct clc_optional_features {
|
||||
* progress
|
||||
*/
|
||||
bool subgroups_ifp;
|
||||
bool subgroups_shuffle;
|
||||
bool subgroups_shuffle_relative;
|
||||
};
|
||||
|
||||
struct clc_compile_args {
|
||||
|
||||
@@ -812,6 +812,14 @@ clc_compile_to_llvm_module(LLVMContext &llvm_ctx,
|
||||
clang_opts.push_back("-D__opencl_c_integer_dot_product_input_4x8bit_packed=1");
|
||||
clang_opts.push_back("-D__opencl_c_integer_dot_product_input_4x8bit=1");
|
||||
}
|
||||
if (args->features.subgroups) {
|
||||
if (args->features.subgroups_shuffle) {
|
||||
clang_opts.push_back("-Dcl_khr_subgroup_shuffle=1");
|
||||
}
|
||||
if (args->features.subgroups_shuffle_relative) {
|
||||
clang_opts.push_back("-Dcl_khr_subgroup_shuffle_relative=1");
|
||||
}
|
||||
}
|
||||
|
||||
// We assume there's appropriate defines for __OPENCL_VERSION__ and __IMAGE_SUPPORT__
|
||||
// being provided by the caller here.
|
||||
|
||||
@@ -1029,9 +1029,8 @@ impl Device {
|
||||
images_read_write: self.image_read_write_supported(),
|
||||
images_write_3d: self.image_3d_write_supported(),
|
||||
integer_dot_product: true,
|
||||
intel_subgroups: false,
|
||||
subgroups: self.subgroups_supported(),
|
||||
subgroups_ifp: false,
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user