From 923707a5093d6d10c6992867b0da73fa9599ea90 Mon Sep 17 00:00:00 2001 From: "Dunajski, Bartosz" Date: Tue, 6 Feb 2024 10:04:56 +0000 Subject: [PATCH] feature: initial support for local dispatch size query Related-To: NEO-8070 Signed-off-by: Dunajski, Bartosz --- shared/source/os_interface/product_helper.h | 1 + shared/source/os_interface/product_helper.inl | 5 +++++ shared/source/os_interface/product_helper_hw.h | 1 + shared/test/unit_test/os_interface/product_helper_tests.cpp | 4 ++++ 4 files changed, 11 insertions(+) diff --git a/shared/source/os_interface/product_helper.h b/shared/source/os_interface/product_helper.h index 09e553885c..511ffbc9a0 100644 --- a/shared/source/os_interface/product_helper.h +++ b/shared/source/os_interface/product_helper.h @@ -222,6 +222,7 @@ class ProductHelper { virtual std::optional getPreferredAllocationMethod(AllocationType allocationType) const = 0; virtual bool isCachingOnCpuAvailable() const = 0; virtual bool isNewCoherencyModelSupported() const = 0; + virtual const std::vector getSupportedLocalDispatchSizes() const = 0; virtual ~ProductHelper() = default; diff --git a/shared/source/os_interface/product_helper.inl b/shared/source/os_interface/product_helper.inl index 9a17bb8fbd..e1465cd17a 100644 --- a/shared/source/os_interface/product_helper.inl +++ b/shared/source/os_interface/product_helper.inl @@ -868,4 +868,9 @@ template bool ProductHelperHw::isNewCoherencyModelSupported() const { return false; } + +template +const std::vector ProductHelperHw::getSupportedLocalDispatchSizes() const { + return {}; +} } // namespace NEO diff --git a/shared/source/os_interface/product_helper_hw.h b/shared/source/os_interface/product_helper_hw.h index 4e76df7b05..8e972f4e02 100644 --- a/shared/source/os_interface/product_helper_hw.h +++ b/shared/source/os_interface/product_helper_hw.h @@ -169,6 +169,7 @@ class ProductHelperHw : public ProductHelper { std::optional getPreferredAllocationMethod(AllocationType allocationType) const override; bool isCachingOnCpuAvailable() const override; bool isNewCoherencyModelSupported() const override; + const std::vector getSupportedLocalDispatchSizes() const override; ~ProductHelperHw() override = default; diff --git a/shared/test/unit_test/os_interface/product_helper_tests.cpp b/shared/test/unit_test/os_interface/product_helper_tests.cpp index d5400da1d0..c0bd8c83ed 100644 --- a/shared/test/unit_test/os_interface/product_helper_tests.cpp +++ b/shared/test/unit_test/os_interface/product_helper_tests.cpp @@ -875,4 +875,8 @@ HWTEST_F(ProductHelperTest, whenGettingPreferredAllocationMethodThenNoPreference auto preferredAllocationMethod = productHelper->getPreferredAllocationMethod(allocationType); EXPECT_FALSE(preferredAllocationMethod.has_value()); } +} + +HWTEST_F(ProductHelperTest, whenAskingForLocalDispatchSizeThenReturnEmpty) { + EXPECT_EQ(0u, productHelper->getSupportedLocalDispatchSizes().size()); } \ No newline at end of file