From 1484e43bb7025920835076a261e24eb651539db6 Mon Sep 17 00:00:00 2001 From: "Chen, Kai" Date: Sat, 24 May 2025 01:09:01 +0000 Subject: [PATCH] feature: Add hasLscStoresWithNonDefaultL1CacheControls flag Related-to: NEO-14563 Signed-off-by: Chen, Kai --- shared/source/device_binary_format/zebin/zeinfo.h | 4 ++++ shared/source/device_binary_format/zebin/zeinfo_decoder.cpp | 2 ++ shared/source/device_binary_format/zebin/zeinfo_decoder.h | 2 +- .../unit_test/device_binary_format/zebin_decoder_tests.cpp | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/shared/source/device_binary_format/zebin/zeinfo.h b/shared/source/device_binary_format/zebin/zeinfo.h index c5baebd1ad..abbdfe6d9d 100644 --- a/shared/source/device_binary_format/zebin/zeinfo.h +++ b/shared/source/device_binary_format/zebin/zeinfo.h @@ -63,6 +63,7 @@ inline constexpr ConstStringRef threadSchedulingMode("thread_scheduling_mode"); inline constexpr ConstStringRef hasSample("has_sample"); inline constexpr ConstStringRef actualKernelStartOffset("actual_kernel_start_offset"); inline constexpr ConstStringRef requireImplicitArgBuffer("require_iab"); +inline constexpr ConstStringRef hasLscStoresWithNonDefaultL1CacheControls("has_lsc_stores_with_non_default_l1_cache_controls"); namespace ThreadSchedulingMode { inline constexpr ConstStringRef ageBased("age_based"); @@ -360,6 +361,7 @@ using LocalRegionSizeT = int32_t; using WalkOrderT = int32_t; using PartitionDimT = int32_t; using RequireImplicitArgBufferT = bool; +using HasLscStoresWithNonDefaultL1CacheControlsT = bool; namespace Defaults { inline constexpr BarrierCountT barrierCount = 0; @@ -395,6 +397,7 @@ inline constexpr LocalRegionSizeT localRegionSize = -1; inline constexpr WalkOrderT dispatchWalkOrder = -1; inline constexpr PartitionDimT partitionDim = -1; inline constexpr RequireImplicitArgBufferT requireImplicitArgBuffer = false; +inline constexpr HasLscStoresWithNonDefaultL1CacheControlsT hasLscStoresWithNonDefaultL1CacheControls = false; } // namespace Defaults inline constexpr ConstStringRef required[] = { @@ -446,6 +449,7 @@ struct ExecutionEnvBaseT final : NEO::NonCopyableAndNonMovableClass { WalkOrderT dispatchWalkOrder = Defaults::dispatchWalkOrder; PartitionDimT partitionDim = Defaults::partitionDim; RequireImplicitArgBufferT requireImplicitArgBuffer = Defaults::requireImplicitArgBuffer; + HasLscStoresWithNonDefaultL1CacheControlsT hasLscStoresWithNonDefaultL1CacheControls = Defaults::hasLscStoresWithNonDefaultL1CacheControls; }; static_assert(NEO::NonCopyableAndNonMovable); diff --git a/shared/source/device_binary_format/zebin/zeinfo_decoder.cpp b/shared/source/device_binary_format/zebin/zeinfo_decoder.cpp index 75d24fc972..e443ee558a 100644 --- a/shared/source/device_binary_format/zebin/zeinfo_decoder.cpp +++ b/shared/source/device_binary_format/zebin/zeinfo_decoder.cpp @@ -690,6 +690,8 @@ DecodeError readZeInfoExecutionEnvironment(const Yaml::YamlParser &parser, const validExecEnv &= readZeInfoValueChecked(parser, execEnvMetadataNd, outExecEnv.requireImplicitArgBuffer, context, outErrReason); } else if (Tags::Kernel::ExecutionEnv::actualKernelStartOffset == key) { // ignore intentionally - deprecated and redundant key + } else if (Tags::Kernel::ExecutionEnv::hasLscStoresWithNonDefaultL1CacheControls == key) { + validExecEnv &= readZeInfoValueChecked(parser, execEnvMetadataNd, outExecEnv.hasLscStoresWithNonDefaultL1CacheControls, context, outErrReason); } else { readZeInfoValueCheckedExtra(parser, execEnvMetadataNd, outExecEnv, context, key, outErrReason, outWarning, validExecEnv, err); } diff --git a/shared/source/device_binary_format/zebin/zeinfo_decoder.h b/shared/source/device_binary_format/zebin/zeinfo_decoder.h index 9a06d75759..842907dd1a 100644 --- a/shared/source/device_binary_format/zebin/zeinfo_decoder.h +++ b/shared/source/device_binary_format/zebin/zeinfo_decoder.h @@ -19,7 +19,7 @@ struct KernelInfo; struct ProgramInfo; namespace Zebin::ZeInfo { -inline constexpr NEO::Zebin::ZeInfo::Types::Version zeInfoDecoderVersion{1, 51}; +inline constexpr NEO::Zebin::ZeInfo::Types::Version zeInfoDecoderVersion{1, 53}; using KernelExecutionEnvBaseT = Types::Kernel::ExecutionEnv::ExecutionEnvBaseT; diff --git a/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp b/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp index 23dede5709..722c541e03 100644 --- a/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp +++ b/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp @@ -1934,6 +1934,7 @@ kernels: work_group_walk_order_dimensions: [0, 1, 2] thread_scheduling_mode: age_based indirect_stateless_count: 2 + has_lsc_stores_with_non_default_l1_cache_controls: true ... )==="; @@ -1981,6 +1982,7 @@ kernels: using ThreadSchedulingMode = NEO::Zebin::ZeInfo::Types::Kernel::ExecutionEnv::ThreadSchedulingMode; EXPECT_EQ(ThreadSchedulingMode::ThreadSchedulingModeAgeBased, execEnv.threadSchedulingMode); EXPECT_EQ(2, execEnv.indirectStatelessCount); + EXPECT_TRUE(execEnv.hasLscStoresWithNonDefaultL1CacheControls); } TEST(ReadZeInfoExecutionEnvironment, GivenUnknownEntryThenEmitsError) {