KhronosGroup / SPIRV-Registry

SPIR-V specs
109 stars 72 forks source link

Op*Div operations are allowed for cooperative matrices, which is probably invalid #261

Closed MrSidims closed 1 month ago

MrSidims commented 1 month ago

SPV_KHR_cooperative_matrix states:

Allow cooperative matrix types for the following arithmetic instructions: OpSNegate and OpFNegate

OpIAdd, OpFAdd, OpISub, OpFSub, OpFMul, OpIMul, OpFDiv, OpSDiv, and OpUDiv.

while add, sub and mul operations are defined for the matrices, div is undefined in linear algebra. We still could define it as matrix A multiply by inverse of a matrix B, but this at least requires some specification clarification, especially given, that inverse might not exist.

alan-baker commented 1 month ago

Those regular binary ops perform per-element ops not matrix ops.

Binary arithmetic instructions operate on the individual elements of a pair of cooperative matrices whose type must match.

MrSidims commented 1 month ago

@alan-baker thanks! Closing as not an issue