WIP cl_khr_cooperative_matrix#1533
Conversation
Change-Id: I902b6ac47788dfb5083463e3ab02a23985e1ba52
|
This PR currently captures the working draft for the coming cl_khr_cooperative_matrix extension. The OpenCL working group is still making minor changes to the specification. We decided to continue doing this in public so we could engage with a wider set of stakeholders. Feedback welcome! |
| {clGetDeviceCooperativeMatrixInfoKHR} device query, otherwise | ||
| the behavior of the program is undefined. | ||
|
|
||
| For *OpTypeCooperativeMatrixMulAddKHR*, the operands must match a supported |
There was a problem hiding this comment.
| For *OpTypeCooperativeMatrixMulAddKHR*, the operands must match a supported | |
| For *OpCooperativeMatrixMulAddKHR*, the operands must match a supported |
| * {CL_DEVICE_COOPERATIVE_MATRIX_COMPONENT_TYPE_SINT8_KHR_anchor} corresponds to SPIR-V `OpTypeInt 8 0`. | ||
| * {CL_DEVICE_COOPERATIVE_MATRIX_COMPONENT_TYPE_SINT16_KHR_anchor} corresponds to SPIR-V `OpTypeInt 16 0`. | ||
| * {CL_DEVICE_COOPERATIVE_MATRIX_COMPONENT_TYPE_SINT32_KHR_anchor} corresponds to SPIR-V `OpTypeInt 32 0`. | ||
| * {CL_DEVICE_COOPERATIVE_MATRIX_COMPONENT_TYPE_SINT64_KHR_anchor} corresponds to SPIR-V `OpTypeInt 64 0`. |
There was a problem hiding this comment.
Should these be OpTypeInt xx 1 to indicate signedness?
There was a problem hiding this comment.
Probably not, as the OpenCL SPIR-V Environment Specification Section 4 "Validation Rules" says:
For all OpTypeInt integer type-declaration instructions:
- Signedness must be 0, indicating no signedness semantics.
| <type name="cl_device_cooperative_matrix_variant_khr"/> | ||
| <type name="cl_device_cooperative_matrix_component_type_khr"/> | ||
| <type name="cl_device_cooperative_matrix_info_khr"/> |
There was a problem hiding this comment.
...variant_khr should go after ...component_type_khr as the former (a struct type) contains elements of the latter, and the wrong order breaks the generated header. I'd suggest putting the struct type after the cl_uint types, like so:
| <type name="cl_device_cooperative_matrix_variant_khr"/> | |
| <type name="cl_device_cooperative_matrix_component_type_khr"/> | |
| <type name="cl_device_cooperative_matrix_info_khr"/> | |
| <type name="cl_device_cooperative_matrix_component_type_khr"/> | |
| <type name="cl_device_cooperative_matrix_info_khr"/> | |
| <type name="cl_device_cooperative_matrix_variant_khr"/> |
No description provided.