Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear requirements on Stride operand to OpCooperativeMatrix{Load,Store}KHR #279

Open
kpet opened this issue Aug 28, 2024 · 0 comments
Open
Assignees

Comments

@kpet
Copy link
Contributor

kpet commented Aug 28, 2024

For the RowMajorKHR and ColumnMajorKHR memory layouts the SPV_KHR_cooperative_matrix specification currently states

Stride must be greater than 0 when passed to OpCooperativeMatrixStoreKHR and must be greater than or equal to 0 when passed to OpCooperativeMatrixLoadKHR.

@alan-baker observed in KhronosGroup/SPIRV-Tools#5777 (review) that the specification does not explicitly document the signedness of the Stride operand.

This was discussed in the 2024/08/28 SPIR teleconference and the consensus seemed to be that Stride is meant to always be interpreted as unsigned. If that's the case we should state it in the specification and remove the requirement that it be "greater than or equal to 0 when passed to OpCooperativeMatrixLoadKHR".

Also, we observed in the teleconference that the requirement for Stride to be "greater than 0 when passed to OpCooperativeMatrixStoreKHR" was necessary for correctness but not sufficient. Should we strengthen the rule and require that the stride be greater than the total size of the data being stored to avoid write collisions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant