//TEST(compute):SIMPLE(filecheck=CHECK): -entry computeMain -stage compute -target spirv // This test checks that the correct SPIRV Cooperative Matrix Operands are emitted for OpCooperativeMatrixMulAddKHR operaions RWStructuredBuffer outputBuffer1; RWStructuredBuffer outputBuffer2; RWStructuredBuffer outputBuffer3; RWStructuredBuffer outputBuffer4; RWStructuredBuffer outputBuffer5; RWStructuredBuffer outputBuffer6; using namespace linalg; __generic typealias CoopMatAType = CoopMat; __generic typealias CoopMatBType = CoopMat; __generic typealias CoopMatCType = CoopMat; [numthreads(32, 1, 1)] void computeMain() { // CHECK: OpCooperativeMatrixMulAddKHR {{.*}} NoneKHR coopMatMulAdd( CoopMatAType(2), CoopMatBType(3), CoopMatCType(4) ).Store(outputBuffer1, 0, 16); // CHECK: OpCooperativeMatrixMulAddKHR {{.*}} MatrixASignedComponentsKHR|MatrixBSignedComponentsKHR coopMatMulAdd( CoopMatAType(2), CoopMatBType(3), CoopMatCType(4) ).Store(outputBuffer2, 0, 16); // CHECK: OpCooperativeMatrixMulAddKHR {{.*}} MatrixCSignedComponentsKHR coopMatMulAdd( CoopMatAType(2), CoopMatBType(3), CoopMatCType(4) ).Store(outputBuffer3, 0, 16); // CHECK: OpCooperativeMatrixMulAddKHR {{.*}} MatrixResultSignedComponentsKHR coopMatMulAdd( CoopMatAType(2), CoopMatBType(3), CoopMatCType(4) ).Store(outputBuffer4, 0, 16); // CHECK: OpCooperativeMatrixMulAddKHR {{.*}} SaturatingAccumulationKHR coopMatMulAdd( CoopMatAType(2), CoopMatBType(3), CoopMatCType(4) ).Store(outputBuffer5, 0, 16); // CHECK: OpCooperativeMatrixMulAddKHR {{.*}} MatrixASignedComponentsKHR|MatrixBSignedComponentsKHR|MatrixCSignedComponentsKHR|MatrixResultSignedComponentsKHR|SaturatingAccumulationKHR coopMatMulAdd( CoopMatAType(2), CoopMatBType(3), CoopMatCType(4) ).Store(outputBuffer6, 0, 16); }