rusticl: implement cl_khr_subgroup_shuffle and shuffle_relative
Signed-off-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26504>
This commit is contained in:
@@ -944,8 +944,8 @@ Rusticl extensions that are not part of any OpenCL version:
|
|||||||
cl_khr_subgroup_non_uniform_arithmetic not started
|
cl_khr_subgroup_non_uniform_arithmetic not started
|
||||||
cl_khr_subgroup_non_uniform_vote not started
|
cl_khr_subgroup_non_uniform_vote not started
|
||||||
cl_khr_subgroup_rotate not started
|
cl_khr_subgroup_rotate not started
|
||||||
cl_khr_subgroup_shuffle not started
|
cl_khr_subgroup_shuffle DONE (iris, llvmpipe, radeonsi)
|
||||||
cl_khr_subgroup_shuffle_relative not started
|
cl_khr_subgroup_shuffle_relative DONE (iris, llvmpipe, radeonsi)
|
||||||
cl_khr_suggested_local_work_size not started
|
cl_khr_suggested_local_work_size not started
|
||||||
cl_khr_terminate_context not started
|
cl_khr_terminate_context not started
|
||||||
cl_khr_throttle_hints not started
|
cl_khr_throttle_hints not started
|
||||||
|
@@ -643,6 +643,10 @@ impl Device {
|
|||||||
// requires CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS
|
// requires CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS
|
||||||
//add_ext(1, 0, 0, "cl_khr_subgroups");
|
//add_ext(1, 0, 0, "cl_khr_subgroups");
|
||||||
add_feat(1, 0, 0, "__opencl_c_subgroups");
|
add_feat(1, 0, 0, "__opencl_c_subgroups");
|
||||||
|
|
||||||
|
// we have lowering in `nir_lower_subgroups`, drivers can just use that
|
||||||
|
add_ext(1, 0, 0, "cl_khr_subgroup_shuffle");
|
||||||
|
add_ext(1, 0, 0, "cl_khr_subgroup_shuffle_relative");
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.svm_supported() {
|
if self.svm_supported() {
|
||||||
@@ -1021,6 +1025,7 @@ impl Device {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn cl_features(&self) -> clc_optional_features {
|
pub fn cl_features(&self) -> clc_optional_features {
|
||||||
|
let subgroups_supported = self.subgroups_supported();
|
||||||
clc_optional_features {
|
clc_optional_features {
|
||||||
fp16: self.fp16_supported(),
|
fp16: self.fp16_supported(),
|
||||||
fp64: self.fp64_supported(),
|
fp64: self.fp64_supported(),
|
||||||
@@ -1029,7 +1034,9 @@ impl Device {
|
|||||||
images_read_write: self.image_read_write_supported(),
|
images_read_write: self.image_read_write_supported(),
|
||||||
images_write_3d: self.image_3d_write_supported(),
|
images_write_3d: self.image_3d_write_supported(),
|
||||||
integer_dot_product: true,
|
integer_dot_product: true,
|
||||||
subgroups: self.subgroups_supported(),
|
subgroups: subgroups_supported,
|
||||||
|
subgroups_shuffle: subgroups_supported,
|
||||||
|
subgroups_shuffle_relative: subgroups_supported,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -334,6 +334,7 @@ impl SPIRVBin {
|
|||||||
float64: true,
|
float64: true,
|
||||||
generic_pointers: true,
|
generic_pointers: true,
|
||||||
groups: true,
|
groups: true,
|
||||||
|
subgroup_shuffle: true,
|
||||||
int8: true,
|
int8: true,
|
||||||
int16: true,
|
int16: true,
|
||||||
int64: true,
|
int64: true,
|
||||||
|
Reference in New Issue
Block a user