From 6d63f688eb559ff303b3c95df11574306419d24a Mon Sep 17 00:00:00 2001 From: "Naklicki, Mateusz" Date: Fri, 31 Jan 2025 12:06:45 +0000 Subject: [PATCH] fix(ocloc): add 'asm' and 'disasm' support for missing opensourced platforms This change addresses the lack of translation in the specified file, which resulted in non-functional 'disasm' and 'asm' ocloc commands for the following platforms: Meteor Lake (MTL), Arrow Lake (ARL), Battle Mage (BMG), and Lunar Lake (LNL). Signed-off-by: Naklicki, Mateusz --- .../offline_compiler/decoder/decoder_tests.cpp | 9 ++++++++- .../source/decoder/translate_platform_base.h | 10 +++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/opencl/test/unit_test/offline_compiler/decoder/decoder_tests.cpp b/opencl/test/unit_test/offline_compiler/decoder/decoder_tests.cpp index a4dd6ba764..961633a762 100644 --- a/opencl/test/unit_test/offline_compiler/decoder/decoder_tests.cpp +++ b/opencl/test/unit_test/offline_compiler/decoder/decoder_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -784,6 +784,8 @@ TEST(DecoderHelperTest, GivenGfxCoreFamilyWhenTranslatingToIgaGenBaseThenExpecte std::pair{IGFX_XE_HP_CORE, IGA_XE_HP}, std::pair{IGFX_XE_HPG_CORE, IGA_XE_HPG}, std::pair{IGFX_XE_HPC_CORE, IGA_XE_HPC}, + std::pair{IGFX_XE2_HPG_CORE, IGA_XE2}, + std::pair{IGFX_UNKNOWN_CORE, IGA_GEN_INVALID}}; for (const auto &[input, expectedOutput] : translations) { @@ -801,6 +803,11 @@ TEST(DecoderHelperTest, GivenProductFamilyWhenTranslatingToIgaGenBaseThenExpecte std::pair{IGFX_DG1, IGA_XE}, std::pair{IGFX_DG2, IGA_XE_HPG}, std::pair{IGFX_PVC, IGA_XE_HPC}, + std::pair{IGFX_METEORLAKE, IGA_XE_HPG}, + std::pair{IGFX_ARROWLAKE, IGA_XE_HPG}, + std::pair{IGFX_BMG, IGA_XE2}, + std::pair{IGFX_LUNARLAKE, IGA_XE2}, + std::pair{IGFX_UNKNOWN, IGA_GEN_INVALID}}; for (const auto &[input, expectedOutput] : translations) { diff --git a/shared/offline_compiler/source/decoder/translate_platform_base.h b/shared/offline_compiler/source/decoder/translate_platform_base.h index cd378b5ff2..769fc3fec5 100644 --- a/shared/offline_compiler/source/decoder/translate_platform_base.h +++ b/shared/offline_compiler/source/decoder/translate_platform_base.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2024 Intel Corporation + * Copyright (C) 2019-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -25,6 +25,12 @@ inline iga_gen_t translateToIgaGenBase(PRODUCT_FAMILY productFamily) { return IGA_XE_HPG; case IGFX_PVC: return IGA_XE_HPC; + case IGFX_METEORLAKE: + case IGFX_ARROWLAKE: + return IGA_XE_HPG; + case IGFX_BMG: + case IGFX_LUNARLAKE: + return IGA_XE2; } } @@ -40,6 +46,8 @@ inline iga_gen_t translateToIgaGenBase(GFXCORE_FAMILY coreFamily) { return IGA_XE_HPG; case IGFX_XE_HPC_CORE: return IGA_XE_HPC; + case IGFX_XE2_HPG_CORE: + return IGA_XE2; } }