performance(ocl): enable usm pool allocator

Enable on xe hpg and lpg platforms

Related-To: NEO-9700

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2024-01-05 14:00:04 +00:00
committed by Compute-Runtime-Automation
parent af1620a308
commit 9b52d52062
11 changed files with 57 additions and 27 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -161,6 +161,7 @@ class ProductHelper {
virtual bool isResolveDependenciesByPipeControlsSupported(const HardwareInfo &hwInfo, bool isOOQ, TaskCountType queueTaskCount, const CommandStreamReceiver &queueCsr) const = 0;
virtual bool isMidThreadPreemptionDisallowedForRayTracingKernels() const = 0;
virtual bool isBufferPoolAllocatorSupported() const = 0;
virtual bool isUsmPoolAllocatorSupported() const = 0;
virtual bool isTlbFlushRequired() const = 0;
virtual bool isDummyBlitWaRequired() const = 0;
virtual bool isDetectIndirectAccessInKernelSupported(const KernelDescriptor &kernelDescriptor, const bool isPrecompiled) const = 0;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -584,6 +584,11 @@ bool ProductHelperHw<gfxProduct>::isBufferPoolAllocatorSupported() const {
return false;
}
template <PRODUCT_FAMILY gfxProduct>
bool ProductHelperHw<gfxProduct>::isUsmPoolAllocatorSupported() const {
return false;
}
template <PRODUCT_FAMILY gfxProduct>
void ProductHelperHw<gfxProduct>::fillScmPropertiesSupportStructureBase(StateComputeModePropertiesSupport &propertiesSupport) const {
propertiesSupport.coherencyRequired = getScmPropertyCoherencyRequiredSupport();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023 Intel Corporation
* Copyright (C) 2023-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -112,6 +112,7 @@ class ProductHelperHw : public ProductHelper {
bool isResolveDependenciesByPipeControlsSupported(const HardwareInfo &hwInfo, bool isOOQ, TaskCountType queueTaskCount, const CommandStreamReceiver &queueCsr) const override;
bool isMidThreadPreemptionDisallowedForRayTracingKernels() const override;
bool isBufferPoolAllocatorSupported() const override;
bool isUsmPoolAllocatorSupported() const override;
bool isTlbFlushRequired() const override;
bool isDummyBlitWaRequired() const override;
bool isDetectIndirectAccessInKernelSupported(const KernelDescriptor &kernelDescriptor, const bool isPrecompiled) const override;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -213,6 +213,11 @@ bool ProductHelperHw<gfxProduct>::isBufferPoolAllocatorSupported() const {
return true;
}
template <>
bool ProductHelperHw<gfxProduct>::isUsmPoolAllocatorSupported() const {
return true;
}
template <>
std::optional<aub_stream::ProductFamily> ProductHelperHw<gfxProduct>::getAubStreamProductFamily() const {
return aub_stream::ProductFamily::Dg2;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Intel Corporation
* Copyright (C) 2022-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -73,6 +73,11 @@ bool ProductHelperHw<gfxProduct>::isBufferPoolAllocatorSupported() const {
return true;
}
template <>
bool ProductHelperHw<gfxProduct>::isUsmPoolAllocatorSupported() const {
return true;
}
template <>
uint64_t ProductHelperHw<gfxProduct>::overridePatIndex(bool isUncachedType, uint64_t patIndex) const {
if (isUncachedType) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Intel Corporation
* Copyright (C) 2022-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -772,6 +772,14 @@ HWTEST2_F(ProductHelperTest, givenProductHelperWhenCheckingIsBufferPoolAllocator
EXPECT_TRUE(productHelper->isBufferPoolAllocatorSupported());
}
HWTEST2_F(ProductHelperTest, givenProductHelperWhenCheckingIsUsmPoolAllocatorSupportedThenCorrectValueIsReturned, IsNotXeHpgCore) {
EXPECT_FALSE(productHelper->isUsmPoolAllocatorSupported());
}
HWTEST2_F(ProductHelperTest, givenProductHelperWhenCheckingIsUsmPoolAllocatorSupportedThenCorrectValueIsReturned, IsXeHpgCore) {
EXPECT_TRUE(productHelper->isUsmPoolAllocatorSupported());
}
HWTEST_F(ProductHelperTest, givenProductHelperWhenCheckingIsUnlockingLockedPtrNecessaryThenReturnFalse) {
EXPECT_FALSE(productHelper->isUnlockingLockedPtrNecessary(pInHwInfo));
}