Skip to content

SPV_ARM_cooperative_matrix_layouts requires SPIR-V 1.6#6601

Open
StuartDBrady wants to merge 1 commit intoKhronosGroup:mainfrom
StuartDBrady:tighten-spv-arm-coop-mat-layouts-validation
Open

SPV_ARM_cooperative_matrix_layouts requires SPIR-V 1.6#6601
StuartDBrady wants to merge 1 commit intoKhronosGroup:mainfrom
StuartDBrady:tighten-spv-arm-coop-mat-layouts-validation

Conversation

@StuartDBrady
Copy link
Copy Markdown

Check for this when validating.

Add a test for this, and update existing tests accordingly.

Also fix CoopMatLoadArmRowBlockedInterleavedLayoutNonConstantStrideFail and CoopMatLoadArmColumnBlockedInterleavedLayoutNonConstantStrideFail to use legal memory operands. The use of invalid memory operands prevented these tests from working as intended.

Check for this when validating.

Add a test for this, and update existing tests accordingly.

Also fix CoopMatLoadArmRowBlockedInterleavedLayoutNonConstantStrideFail
and CoopMatLoadArmColumnBlockedInterleavedLayoutNonConstantStrideFail to
use legal memory operands.  The use of invalid memory operands prevented
these tests from working as intended.

Signed-off-by: Stuart Brady <stuart.brady@arm.com>
@StuartDBrady StuartDBrady requested a review from kpet March 16, 2026 11:22
Copy link
Copy Markdown
Contributor

@alan-baker alan-baker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok, but formatting needs fixed. You'll also need to follow up with glslang fixes.

Copy link
Copy Markdown
Contributor

@kpet kpet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec for SPV_ARM_cooperatrive_matrix_layouts does require SPIR-V 1.6 but that was done to align to the requirements for SPV_KHR_cooperative_matrix at the time (that we've since relaxed to SPIR-V 1.3 overall and 1.3+extensions or 1.5 for Vulkan). There's nothing that really requires 1.6 in this extension and I think we should probably change the specification to require 1.0 or 1.3 instead.

std::string spirv = GenCoopMatLoadStoreShaderKHR(
"MakePointerAvailableKHR|NonPrivatePointerKHR",
"MakePointerAvailableKHR|NonPrivatePointerKHR",
"MakePointerVisibleKHR|NonPrivatePointerKHR",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was copy/pasted from other tests that probably need fixing as well. Out of curiosity: how did you spot this / how were previous authors able to miss it?

return _.diag(SPV_ERROR_WRONG_VERSION, inst)
<< extension << " extension requires SPIR-V version 1.6 or later.";
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems we don't have such a check for SPV_KHR_cooperative_matrix.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it gets caught via the vulkan memory model requiring 1.3

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

Successfully merging this pull request may close these issues.

3 participants