From 80359a4362592c2836f1358c1ee8fd60b188dad8 Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Wed, 27 Aug 2025 14:42:17 +0000 Subject: [PATCH] feature: store info related to indirect calls within kernel Related-To: NEO-15211 Signed-off-by: Mateusz Jablonski --- .../device_binary_format/zebin/zeinfo_decoder.cpp | 1 + shared/source/kernel/kernel_descriptor.h | 2 +- .../device_binary_format/zebin_decoder_tests.cpp | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/shared/source/device_binary_format/zebin/zeinfo_decoder.cpp b/shared/source/device_binary_format/zebin/zeinfo_decoder.cpp index 5ea52d92fb..93018881d9 100644 --- a/shared/source/device_binary_format/zebin/zeinfo_decoder.cpp +++ b/shared/source/device_binary_format/zebin/zeinfo_decoder.cpp @@ -726,6 +726,7 @@ void populateKernelExecutionEnvironment(KernelDescriptor &dst, const KernelExecu dst.kernelAttributes.flags.usesStatelessWrites = (false == execEnv.hasNoStatelessWrite); dst.kernelAttributes.flags.hasSample = execEnv.hasSample; dst.kernelAttributes.flags.requiresImplicitArgs = execEnv.requireImplicitArgBuffer; + dst.kernelAttributes.flags.hasIndirectCalls = execEnv.hasIndirectCalls; dst.kernelAttributes.barrierCount = execEnv.barrierCount; dst.kernelAttributes.bufferAddressingMode = (execEnv.has4GBBuffers) ? KernelDescriptor::Stateless : KernelDescriptor::BindfulAndStateless; dst.kernelAttributes.inlineDataPayloadSize = static_cast(execEnv.inlineDataPayloadSize); diff --git a/shared/source/kernel/kernel_descriptor.h b/shared/source/kernel/kernel_descriptor.h index 4fec11dfc3..68f9861e60 100644 --- a/shared/source/kernel/kernel_descriptor.h +++ b/shared/source/kernel/kernel_descriptor.h @@ -126,7 +126,7 @@ struct KernelDescriptor : NEO::NonCopyableAndNonMovableClass { bool usesSamplers : 1; // 1 bool usesSyncBuffer : 1; - bool deprecatedDoNotUse : 1; + bool hasIndirectCalls : 1; bool usesStatelessWrites : 1; bool passInlineData : 1; bool perThreadDataHeaderIsPresent : 1; 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 546a983281..90d032635d 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 @@ -7315,6 +7315,21 @@ kernels: EXPECT_TRUE(kernelDescriptor->kernelAttributes.hasImageWriteArg); } +TEST_F(decodeZeInfoKernelEntryTest, GivenKernelWithIndirectCallsWhenPopulatingKernelDescriptorThenHasIndirectCallsIsSet) { + ConstStringRef zeinfo = R"===( +kernels: + - name : some_kernel + execution_env: + simd_size: 8 + has_indirect_calls: true +... +)==="; + auto err = decodeZeInfoKernelEntry(zeinfo); + EXPECT_EQ(NEO::DecodeError::success, err); + + EXPECT_TRUE(kernelDescriptor->kernelAttributes.flags.hasIndirectCalls); +} + TEST(PopulateInlineSamplers, GivenInvalidSamplerIndexThenPopulateInlineSamplersFails) { NEO::KernelDescriptor kd; std::string errors, warnings;