Commit b6f2951
committed
[compiler] Support cl_intel_required_subgroup_size
Note: this commit does not yet enable the extension by default! See
below.
This commit adds support for the cl_intel_required_subgroup_size OpenCL
extension.
* It supports device-specific lists of sub-group sizes by adding two new
fields to the Mux device info available to targets: a pointer to a
list of sub-group sizes, and a size for the list. The pointer should
point to static/managed data.
* It supports the kernel data necessary for the extension by extending
`compiler::KernelInfo` with the (optional) required sub-group size
and the 'spill mem size'. The required sub-group size is
encoded/decoded through the binary header. The spill size is not, but
that's in keeping with the private mem size - this might indicate an
oversight for offline-compiled binaries.
The rest of the work is plumbing that data into the extension's queries,
and adding testing coverage.
Two new compiler passes have been added to force the compiler into
failing if the required sub-group size is not supported by the device,
or if the requirement has not been satisfied by the compiler. Both of
these are always true as none of our targets advertise any sub-group
sizes, and never force the vectorizer into vectorizing to that size.
The `muxc` compiler tool can be given supported sub-group sizes via a
command-line option to ensure these compiler passes can be tested in a
device-agnostic way.
Note that this doesn't include support for this extension when the
program was compiled with SPIR-V (clCreateProgramWithILKHR). In a strict
reading of the extension spec, `CL_KERNEL_COMPILE_SUB_GROUP_SIZE_INTEL`
only reports the value of the attribute and thus has no meaning for
SPIR-V, but we can be charitable here.
It is expected that this property will manifest itself via the
`SubgroupSize` execution mode, but more work needs to be done here. For
that reason the extension is left disabled until SPIR-V support is
added.1 parent 45fb808 commit b6f2951
File tree
1 file changed
+17
-0
lines changed- llvm/lib/SYCLNativeCPUUtils/compiler_passes/compiler_pipeline/docs
1 file changed
+17
-0
lines changedLines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1067 | 1067 | | |
1068 | 1068 | | |
1069 | 1069 | | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
1070 | 1087 | | |
1071 | 1088 | | |
1072 | 1089 | | |
| |||
0 commit comments