KhronosGroup / SPIRV-Registry

SPIR-V specs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SPV_KHR_cooperative_matrix and optional operands

kuhar opened this issue · comments

OpCooperativeMatrixLoadKHR and OpCooperativeMatrixStoreKHR allow for 2 optional operands: stride and 'memory operand'.

When reading these two from a spir-v binary, how am I supposed to tell which of the two possible optional operands is provided? Should I assume that both are (always) either omitted or present at the same time?

Stride must be provided for Memory Operand to be provided. The following combinations are valid:

  1. None of the optional operands are present.
  2. Stride alone is present.
  3. Stride and Memory Operand are both present.

We will document this explicitly in the next revision of the specification.

This makes sense, thanks Kevin!