diff --git a/opencl/test/unit_test/aub_tests/command_queue/large_grf_aub_tests_xehp_and_later.cpp b/opencl/test/unit_test/aub_tests/command_queue/large_grf_aub_tests_xehp_and_later.cpp index 172c3627b8..2a02a80622 100644 --- a/opencl/test/unit_test/aub_tests/command_queue/large_grf_aub_tests_xehp_and_later.cpp +++ b/opencl/test/unit_test/aub_tests/command_queue/large_grf_aub_tests_xehp_and_later.cpp @@ -464,9 +464,8 @@ HWTEST2_P(LargeGrfTest, givenMixedLargeGrfAndSmallGrfKernelsWhenExecutedThenResu EXPECT_FALSE(largeGrfValues[0]); } else { EXPECT_EQ(0u, largeGrfValues.size()); - largeGrfValues = NEO::UnitTestHelper::getProgrammedLargeGrfValues(*this->csr, - this->csr->getCS(0)); - ASSERT_NE(0u, largeGrfValues.size()); + largeGrfValues = NEO::UnitTestHelper::getProgrammedLargeGrfValues(this->csr->getCS(0)); + ASSERT_EQ(1u, largeGrfValues.size()); EXPECT_FALSE(largeGrfValues[0]); } } diff --git a/shared/test/common/gen12lp/unit_test_helper_gen12lp.cpp b/shared/test/common/gen12lp/unit_test_helper_gen12lp.cpp index 28404b74bd..046f270016 100644 --- a/shared/test/common/gen12lp/unit_test_helper_gen12lp.cpp +++ b/shared/test/common/gen12lp/unit_test_helper_gen12lp.cpp @@ -126,6 +126,11 @@ std::vector UnitTestHelper::getProgrammedLargeGrfValues(Command return {}; } +template +std::vector UnitTestHelper::getProgrammedLargeGrfValues(LinearStream &linearStream) { + return {}; +} + template inline bool UnitTestHelper::getWorkloadPartitionForStoreRegisterMemCmd(typename GfxFamily::MI_STORE_REGISTER_MEM &storeRegisterMem) { return false; diff --git a/shared/test/common/helpers/unit_test_helper.h b/shared/test/common/helpers/unit_test_helper.h index 0fe845545f..db0a266f86 100644 --- a/shared/test/common/helpers/unit_test_helper.h +++ b/shared/test/common/helpers/unit_test_helper.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -93,6 +93,8 @@ struct UnitTestHelper { static std::vector getProgrammedLargeGrfValues(CommandStreamReceiver &csr, LinearStream &linearStream); + static std::vector getProgrammedLargeGrfValues(LinearStream &linearStream); + static uint32_t getProgrammedGrfValue(CommandStreamReceiver &csr, LinearStream &linearStream); static bool getWorkloadPartitionForStoreRegisterMemCmd(typename GfxFamily::MI_STORE_REGISTER_MEM &storeRegisterMem); diff --git a/shared/test/common/helpers/unit_test_helper_xehp_and_later.inl b/shared/test/common/helpers/unit_test_helper_xehp_and_later.inl index 262f5d4779..fdcf7330d3 100644 --- a/shared/test/common/helpers/unit_test_helper_xehp_and_later.inl +++ b/shared/test/common/helpers/unit_test_helper_xehp_and_later.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -111,6 +111,20 @@ std::vector UnitTestHelper::getProgrammedLargeGrfValues(Command return largeGrfValues; } +template +std::vector UnitTestHelper::getProgrammedLargeGrfValues(LinearStream &linearStream) { + using STATE_COMPUTE_MODE = typename GfxFamily::STATE_COMPUTE_MODE; + + std::vector largeGrfValues; + HardwareParse hwParser; + hwParser.parseCommands(linearStream); + auto commands = hwParser.getCommandsList(); + for (auto &cmd : commands) { + largeGrfValues.push_back(reinterpret_cast(cmd)->getLargeGrfMode()); + } + return largeGrfValues; +} + template inline bool UnitTestHelper::getWorkloadPartitionForStoreRegisterMemCmd(typename GfxFamily::MI_STORE_REGISTER_MEM &storeRegisterMem) { return storeRegisterMem.getWorkloadPartitionIdOffsetEnable();