From d1dd088ede78769d786fa56e52d030aaa7fc133c Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Fri, 28 Mar 2025 16:36:45 -0700 Subject: [PATCH] brw: Allow DPAS with BF on Gfx125 MTL doesn't support, but both ACM and ARL-H do. Fixes: e384ccde282 ("brw: Expand EU validation for DPAS") Reviewed-by: Rohan Garg Reviewed-by: Ian Romanick Part-of: --- src/intel/compiler/brw_eu_validate.c | 21 +++++++++------------ src/intel/compiler/test_eu_validate.cpp | 2 +- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/intel/compiler/brw_eu_validate.c b/src/intel/compiler/brw_eu_validate.c index 7d07875e92b..2012e611d42 100644 --- a/src/intel/compiler/brw_eu_validate.c +++ b/src/intel/compiler/brw_eu_validate.c @@ -2195,24 +2195,21 @@ instruction_restrictions(const struct brw_isa_info *isa, if (brw_eu_inst_dpas_3src_exec_type(devinfo, inst->raw) == BRW_ALIGN1_3SRC_EXEC_TYPE_FLOAT) { + ERROR_IF(src1_type != BRW_TYPE_HF && + src1_type != BRW_TYPE_BF, + "DPAS src1 type must be HF or BF."); + ERROR_IF(src2_type != BRW_TYPE_HF && + src2_type != BRW_TYPE_BF, + "DPAS src2 type must be HF or BF."); + ERROR_IF(src1_type != src2_type, + "DPAS src1 and src2 with types must match when using float types."); + if (devinfo->ver < 20) { - ERROR_IF(src1_type != BRW_TYPE_HF, - "DPAS src1 type must be HF in Gfx12."); - ERROR_IF(src2_type != BRW_TYPE_HF, - "DPAS src2 type must be HF in Gfx12."); ERROR_IF(dst_type != BRW_TYPE_F, "DPAS destination type must be F in Gfx12."); ERROR_IF(src0_type != BRW_TYPE_F, "DPAS src0 type must be F in Gfx12."); } else { - ERROR_IF(src1_type != BRW_TYPE_HF && - src1_type != BRW_TYPE_BF, - "DPAS src1 type must be HF or BF in Gfx20+."); - ERROR_IF(src2_type != BRW_TYPE_HF && - src2_type != BRW_TYPE_BF, - "DPAS src2 type must be HF or BF in Gfx20+."); - ERROR_IF(src1_type != src2_type, - "DPAS src1 and src2 with types must match when using float types."); ERROR_IF(dst_type != BRW_TYPE_F && dst_type != src1_type, "DPAS destination type must be F or match Src1/Src2 in Gfx20+."); diff --git a/src/intel/compiler/test_eu_validate.cpp b/src/intel/compiler/test_eu_validate.cpp index a946b84a589..0c8724fcbe6 100644 --- a/src/intel/compiler/test_eu_validate.cpp +++ b/src/intel/compiler/test_eu_validate.cpp @@ -3206,7 +3206,7 @@ TEST_P(validation_test, dpas_types) TV( F, F, F, HF, false), TV( F, F, HF, F, false), - TV( F, F, BF, BF, devinfo.ver >= 20), + TV( F, F, BF, BF, true), TV(BF, BF, BF, BF, devinfo.ver >= 20), TV(BF, F, BF, BF, devinfo.ver >= 20), TV( F, BF, BF, BF, devinfo.ver >= 20),