Skip to content

[Matrix] Confusing encoding of RowMajor / ColMajor layout #7928

@masahi

Description

@masahi

Hi, SPV_INTEL_joint_matrix.asciidoc#matrix-layout defines the numerical encoding of RowMajor / ColMajor matrix layout. But in

RowMajor = 0,
ColumnMajor = 1,
, these values are swapped. So if I use matrix_layout::row_major in my sycl program, I get 0 as the encoding of the layout.

On the IGC side, there are two conflicting definitions of this encoding:
https://github.com/intel/intel-graphics-compiler/blob/4eb6e950f5a617dadf1055253e4120afa57b7433/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVType.h#L717-L718
https://github.com/intel/intel-graphics-compiler/blob/a8afe42bd544defeacb0ef88f79c40432b5f82b4/IGC/Compiler/Optimizer/OpenCLPasses/JointMatrixFuncsResolutionPass.cpp#L82-L83

So can I get a clarification of this situation?

Off topic, but I'd also like to know when SPV_INTEL_joint_matrix will become available in the official SPIRV tool chain. I've been updating a home-grown SPIRV code generator (in TVM) to support this extension, and not being able to use the validator has been painful.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions