From ea12b38602c29ce2e4fae95cbfafeb4d074c7855 Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Tue, 13 Feb 2024 13:17:05 -0800 Subject: [PATCH] intel/elk: Remove uses of intel_device_info_is_9lp() Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/compiler/elk/elk_eu_emit.c | 3 +-- src/intel/compiler/elk/elk_eu_validate.c | 20 ++++--------------- src/intel/compiler/elk/elk_fs_generator.cpp | 1 - src/intel/compiler/elk/elk_fs_nir.cpp | 3 +-- .../compiler/elk/elk_test_eu_validate.cpp | 13 ++++-------- 5 files changed, 10 insertions(+), 30 deletions(-) diff --git a/src/intel/compiler/elk/elk_eu_emit.c b/src/intel/compiler/elk/elk_eu_emit.c index 7ec98c45cff..aeca1c246f5 100644 --- a/src/intel/compiler/elk/elk_eu_emit.c +++ b/src/intel/compiler/elk/elk_eu_emit.c @@ -3064,8 +3064,7 @@ elk_broadcast(struct elk_codegen *p, /* Use indirect addressing to fetch the specified component. */ if (type_sz(src.type) > 4 && - (devinfo->platform == INTEL_PLATFORM_CHV || intel_device_info_is_9lp(devinfo) || - !devinfo->has_64bit_int)) { + (devinfo->platform == INTEL_PLATFORM_CHV || !devinfo->has_64bit_int)) { /* From the Cherryview PRM Vol 7. "Register Region Restrictions": * * "When source or destination datatype is 64b or operation is diff --git a/src/intel/compiler/elk/elk_eu_validate.c b/src/intel/compiler/elk/elk_eu_validate.c index 4ef394f9c33..8a53fc4e91b 100644 --- a/src/intel/compiler/elk/elk_eu_validate.c +++ b/src/intel/compiler/elk/elk_eu_validate.c @@ -1744,12 +1744,10 @@ special_requirements_for_handling_double_precision_data_types( * 2. Regioning must ensure Src.Vstride = Src.Width * Src.Hstride. * 3. Source and Destination offset must be the same, except the case * of scalar source. - * - * We assume that the restriction applies to GLK as well. */ if (is_double_precision && elk_inst_access_mode(devinfo, inst) == ELK_ALIGN_1 && - (devinfo->platform == INTEL_PLATFORM_CHV || intel_device_info_is_9lp(devinfo))) { + devinfo->platform == INTEL_PLATFORM_CHV) { ERROR_IF(!is_scalar_region && (src_stride % 8 != 0 || dst_stride % 8 != 0 || @@ -1770,11 +1768,8 @@ special_requirements_for_handling_double_precision_data_types( * * When source or destination datatype is 64b or operation is integer * DWord multiply, indirect addressing must not be used. - * - * We assume that the restriction applies to GLK as well. */ - if (is_double_precision && - (devinfo->platform == INTEL_PLATFORM_CHV || intel_device_info_is_9lp(devinfo))) { + if (is_double_precision && devinfo->platform == INTEL_PLATFORM_CHV) { ERROR_IF(ELK_ADDRESS_REGISTER_INDIRECT_REGISTER == address_mode || ELK_ADDRESS_REGISTER_INDIRECT_REGISTER == dst_address_mode, "Indirect addressing is not allowed when the execution type " @@ -1786,13 +1781,9 @@ special_requirements_for_handling_double_precision_data_types( * ARF registers must never be used with 64b datatype or when * operation is integer DWord multiply. * - * We assume that the restriction applies to GLK as well. - * * We assume that the restriction does not apply to the null register. */ - if (is_double_precision && - (devinfo->platform == INTEL_PLATFORM_CHV || - intel_device_info_is_9lp(devinfo))) { + if (is_double_precision && devinfo->platform == INTEL_PLATFORM_CHV) { ERROR_IF(elk_inst_opcode(isa, inst) == ELK_OPCODE_MAC || elk_inst_acc_wr_control(devinfo, inst) || (ELK_ARCHITECTURE_REGISTER_FILE == file && @@ -1830,11 +1821,8 @@ special_requirements_for_handling_double_precision_data_types( * * When source or destination datatype is 64b or operation is integer * DWord multiply, DepCtrl must not be used. - * - * We assume that the restriction applies to GLK as well. */ - if (is_double_precision && - (devinfo->platform == INTEL_PLATFORM_CHV || intel_device_info_is_9lp(devinfo))) { + if (is_double_precision && devinfo->platform == INTEL_PLATFORM_CHV) { ERROR_IF(elk_inst_no_dd_check(devinfo, inst) || elk_inst_no_dd_clear(devinfo, inst), "DepCtrl is not allowed when the execution type is 64-bit"); diff --git a/src/intel/compiler/elk/elk_fs_generator.cpp b/src/intel/compiler/elk/elk_fs_generator.cpp index 5d1b62674e4..1b2e94d4900 100644 --- a/src/intel/compiler/elk/elk_fs_generator.cpp +++ b/src/intel/compiler/elk/elk_fs_generator.cpp @@ -2076,7 +2076,6 @@ elk_fs_generator::generate_code(const elk_cfg_t *cfg, int dispatch_width, case ELK_SHADER_OPCODE_CLUSTER_BROADCAST: { assert((devinfo->platform != INTEL_PLATFORM_CHV && - !intel_device_info_is_9lp(devinfo) && devinfo->has_64bit_float) || type_sz(src[0].type) <= 4); assert(!src[0].negate && !src[0].abs); assert(src[1].file == ELK_IMMEDIATE_VALUE); diff --git a/src/intel/compiler/elk/elk_fs_nir.cpp b/src/intel/compiler/elk/elk_fs_nir.cpp index c1f5182289d..9261f12be93 100644 --- a/src/intel/compiler/elk/elk_fs_nir.cpp +++ b/src/intel/compiler/elk/elk_fs_nir.cpp @@ -5026,8 +5026,7 @@ fs_nir_emit_intrinsic(nir_to_elk_state &ntb, unsigned read_size = nir_intrinsic_range(instr) - (instr->num_components - 1) * type_sz(dest.type); - bool supports_64bit_indirects = - devinfo->platform != INTEL_PLATFORM_CHV && !intel_device_info_is_9lp(devinfo); + bool supports_64bit_indirects = devinfo->platform != INTEL_PLATFORM_CHV; if (type_sz(dest.type) != 8 || supports_64bit_indirects) { for (unsigned j = 0; j < instr->num_components; j++) { diff --git a/src/intel/compiler/elk/elk_test_eu_validate.cpp b/src/intel/compiler/elk/elk_test_eu_validate.cpp index 55481cef6f6..404a02608fa 100644 --- a/src/intel/compiler/elk/elk_test_eu_validate.cpp +++ b/src/intel/compiler/elk/elk_test_eu_validate.cpp @@ -2228,8 +2228,7 @@ TEST_P(validation_test, qword_low_power_align1_regioning_restrictions) elk_inst_set_src0_width(&devinfo, last_inst, inst[i].src_width); elk_inst_set_src0_hstride(&devinfo, last_inst, inst[i].src_hstride); - if (devinfo.platform == INTEL_PLATFORM_CHV || - intel_device_info_is_9lp(&devinfo)) { + if (devinfo.platform == INTEL_PLATFORM_CHV) { EXPECT_EQ(inst[i].expected_result, validate(p)); } else { EXPECT_TRUE(validate(p)); @@ -2361,8 +2360,7 @@ TEST_P(validation_test, qword_low_power_no_indirect_addressing) elk_inst_set_src0_width(&devinfo, last_inst, inst[i].src_width); elk_inst_set_src0_hstride(&devinfo, last_inst, inst[i].src_hstride); - if (devinfo.platform == INTEL_PLATFORM_CHV || - intel_device_info_is_9lp(&devinfo)) { + if (devinfo.platform == INTEL_PLATFORM_CHV) { EXPECT_EQ(inst[i].expected_result, validate(p)); } else { EXPECT_TRUE(validate(p)); @@ -2513,7 +2511,6 @@ TEST_P(validation_test, qword_low_power_no_64bit_arf) * of DWord multiplication cannot be the accumulator. */ if (devinfo.platform == INTEL_PLATFORM_CHV || - intel_device_info_is_9lp(&devinfo) || (devinfo.ver == 8 && inst[i].opcode == ELK_OPCODE_MUL && elk_inst_dst_reg_file(&devinfo, last_inst) == ELK_ARCHITECTURE_REGISTER_FILE && @@ -2533,8 +2530,7 @@ TEST_P(validation_test, qword_low_power_no_64bit_arf) elk_MAC(p, retype(g0, ELK_REGISTER_TYPE_DF), retype(stride(g0, 4, 4, 1), ELK_REGISTER_TYPE_DF), retype(stride(g0, 4, 4, 1), ELK_REGISTER_TYPE_DF)); - if (devinfo.platform == INTEL_PLATFORM_CHV || - intel_device_info_is_9lp(&devinfo)) { + if (devinfo.platform == INTEL_PLATFORM_CHV) { EXPECT_FALSE(validate(p)); } else { EXPECT_TRUE(validate(p)); @@ -2736,8 +2732,7 @@ TEST_P(validation_test, qword_low_power_no_depctrl) elk_inst_set_no_dd_check(&devinfo, last_inst, inst[i].no_dd_check); elk_inst_set_no_dd_clear(&devinfo, last_inst, inst[i].no_dd_clear); - if (devinfo.platform == INTEL_PLATFORM_CHV || - intel_device_info_is_9lp(&devinfo)) { + if (devinfo.platform == INTEL_PLATFORM_CHV) { EXPECT_EQ(inst[i].expected_result, validate(p)); } else { EXPECT_TRUE(validate(p));