feature: initial support for local dispatch size query

Related-To: NEO-8070

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz 2024-02-06 10:04:56 +00:00 committed by Compute-Runtime-Automation
parent 4123854b55
commit 923707a509
4 changed files with 11 additions and 0 deletions

View File

@ -222,6 +222,7 @@ class ProductHelper {
virtual std::optional<GfxMemoryAllocationMethod> getPreferredAllocationMethod(AllocationType allocationType) const = 0;
virtual bool isCachingOnCpuAvailable() const = 0;
virtual bool isNewCoherencyModelSupported() const = 0;
virtual const std::vector<uint32_t> getSupportedLocalDispatchSizes() const = 0;
virtual ~ProductHelper() = default;

View File

@ -868,4 +868,9 @@ template <PRODUCT_FAMILY gfxProduct>
bool ProductHelperHw<gfxProduct>::isNewCoherencyModelSupported() const {
return false;
}
template <PRODUCT_FAMILY gfxProduct>
const std::vector<uint32_t> ProductHelperHw<gfxProduct>::getSupportedLocalDispatchSizes() const {
return {};
}
} // namespace NEO

View File

@ -169,6 +169,7 @@ class ProductHelperHw : public ProductHelper {
std::optional<GfxMemoryAllocationMethod> getPreferredAllocationMethod(AllocationType allocationType) const override;
bool isCachingOnCpuAvailable() const override;
bool isNewCoherencyModelSupported() const override;
const std::vector<uint32_t> getSupportedLocalDispatchSizes() const override;
~ProductHelperHw() override = default;

View File

@ -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());
}