[SM??] Wave Matrix clarifications #72
Labels
active proposal
Issues relating to active proposals
Requires Shader Model
Feature requests that require DXIL and Shader Model updates
Milestone
Which proposal does this relate to?
#61 - Wave Matrix
Describe the issue or outstanding question.
The proposal describes WaveMatrixLeft and WaveMatrixRight as being parameterized using M and N which would be the same values for WaveMatrixAccumulator. The proposal indicates
WaveMatrixLeft<float16_t, 16, 16>
creates a16xWaveMatrixLeft<float16_t, 16, 16>::MatrixDepth()
matrix. It would be good to call that out more explicitly. Since the depth is not known at compile time, should authors always overestimate how much groupshared memory is required for loading and storing? The example in the proposal uses 32 as some safe constant, but would authors be expected to check all hardware they want to run on to set such a value? More specifics on sizing groupshared memory would be helpful.The SPIR-V extension specifies the K dimension in OpTypeCooperativeMatrixKHR (with an appropriate usage) (see SPV_KHR_cooperative_matrix). This creates some friction for translation. The types are can only be cross-compiled by examining which accumulators they are used with. Can you give some context as to why these parameterizations were chosen? Specifically, why K was chosen to be implicit. Real use cases would be translatable with work, but trivial shaders (good for unit testing) would be problematic. For example
WaveMatrixLeft<float16_t, 16, 16>
does not have a direct SPIR-V translation. The SPIR-V could use a spec constant and some shader reflection to do this at pipeline compilation time, but that requires modifications on the API side too. Is there an opportunity to reduce the translation friction here?Additional context
Add any other context or screenshots about the feature request here.
CC @jeffbolznv @kpet
The text was updated successfully, but these errors were encountered: