@@ -1451,9 +1451,11 @@ void addInstrRequirements(const MachineInstr &MI,
1451
1451
const int64_t CoopOperands = MI.getOperand (MulAddMaxSize - 1 ).getImm ();
1452
1452
if (CoopOperands &
1453
1453
SPIRV::CooperativeMatrixOperands::MatrixAAndBTF32ComponentsINTEL) {
1454
- report_fatal_error (" MatrixAAndBTF32ComponentsINTEL type interpretation "
1455
- " require the following SPIR-V extension: "
1456
- " SPV_INTEL_joint_matrix" , false );
1454
+ if (!ST.canUseExtension (SPIRV::Extension::SPV_INTEL_joint_matrix))
1455
+ report_fatal_error (" MatrixAAndBTF32ComponentsINTEL type interpretation "
1456
+ " require the following SPIR-V extension: "
1457
+ " SPV_INTEL_joint_matrix" ,
1458
+ false );
1457
1459
Reqs.addExtension (SPIRV::Extension::SPV_INTEL_joint_matrix);
1458
1460
Reqs.addCapability (
1459
1461
SPIRV::Capability::CooperativeMatrixTF32ComponentTypeINTEL);
@@ -1464,9 +1466,11 @@ void addInstrRequirements(const MachineInstr &MI,
1464
1466
SPIRV::CooperativeMatrixOperands::MatrixCBFloat16ComponentsINTEL ||
1465
1467
CoopOperands & SPIRV::CooperativeMatrixOperands::
1466
1468
MatrixResultBFloat16ComponentsINTEL) {
1467
- report_fatal_error (" ***BF16ComponentsINTEL type interpretations require "
1468
- " the following SPIR-V extension: "
1469
- " SPV_INTEL_joint_matrix" , false );
1469
+ if (!ST.canUseExtension (SPIRV::Extension::SPV_INTEL_joint_matrix))
1470
+ report_fatal_error (" ***BF16ComponentsINTEL type interpretations "
1471
+ " require the following SPIR-V extension: "
1472
+ " SPV_INTEL_joint_matrix" ,
1473
+ false );
1470
1474
Reqs.addExtension (SPIRV::Extension::SPV_INTEL_joint_matrix);
1471
1475
Reqs.addCapability (
1472
1476
SPIRV::Capability::CooperativeMatrixBFloat16ComponentTypeINTEL);
@@ -1519,21 +1523,22 @@ void addInstrRequirements(const MachineInstr &MI,
1519
1523
break ;
1520
1524
1521
1525
std::string InstName;
1522
- switch (OpCode) {
1523
- case SPIRV::OpCooperativeMatrixPrefetchINTEL:
1524
- InstName = " OpCooperativeMatrixPrefetchINTEL" ;
1525
- break ;
1526
- case SPIRV::OpCooperativeMatrixLoadCheckedINTEL:
1527
- InstName = " OpCooperativeMatrixLoadCheckedINTEL" ;
1528
- break ;
1529
- case SPIRV::OpCooperativeMatrixStoreCheckedINTEL:
1530
- InstName = " OpCooperativeMatrixStoreCheckedINTEL" ;
1531
- break ;
1526
+ switch (OpCode) {
1527
+ case SPIRV::OpCooperativeMatrixPrefetchINTEL:
1528
+ InstName = " OpCooperativeMatrixPrefetchINTEL" ;
1529
+ break ;
1530
+ case SPIRV::OpCooperativeMatrixLoadCheckedINTEL:
1531
+ InstName = " OpCooperativeMatrixLoadCheckedINTEL" ;
1532
+ break ;
1533
+ case SPIRV::OpCooperativeMatrixStoreCheckedINTEL:
1534
+ InstName = " OpCooperativeMatrixStoreCheckedINTEL" ;
1535
+ break ;
1532
1536
}
1533
1537
1534
1538
if (!ST.canUseExtension (SPIRV::Extension::SPV_INTEL_joint_matrix)) {
1535
- const std::string ErrorMsg = InstName + " instruction requires the "
1536
- " following SPIR-V extension: SPV_INTEL_joint_matrix" ;
1539
+ const std::string ErrorMsg =
1540
+ InstName + " instruction requires the "
1541
+ " following SPIR-V extension: SPV_INTEL_joint_matrix" ;
1537
1542
report_fatal_error (ErrorMsg.c_str (), false );
1538
1543
}
1539
1544
Reqs.addExtension (SPIRV::Extension::SPV_INTEL_joint_matrix);
0 commit comments