refactor: tests for buffer pool

add support for future AIL

Related-To: NEO-11694

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2024-06-18 10:14:25 +00:00
committed by Compute-Runtime-Automation
parent f910f94ef9
commit b6d86d2648
9 changed files with 59 additions and 48 deletions

View File

@@ -26,6 +26,7 @@ struct MockProductHelperHw : NEO::ProductHelperHw<productFamily> {
bool isUnlockingLockedPtrNecessary(const HardwareInfo &hwInfo) const override;
std::vector<uint32_t> getSupportedNumGrfs(const ReleaseHelper *releaseHelper) const override;
aub_stream::EngineType getDefaultCopyEngine() const override;
bool isBufferPoolAllocatorSupported() const override;
bool use128MbEdram = false;
bool enableMidThreadPreemption = false;
@@ -34,6 +35,7 @@ struct MockProductHelperHw : NEO::ProductHelperHw<productFamily> {
bool failOnConfigureHardwareCustom = false;
bool isCooperativeEngineSupportedValue = true;
bool returnedIsUnlockingLockedPtrNecessary = false;
bool isBufferPoolAllocatorSupportedValue = true;
uint32_t returnedStepping = 0;
uint32_t returnedL1CachePolicy = 0;
uint32_t returnedL1CachePolicyIfDebugger = 0;

View File

@@ -75,6 +75,11 @@ bool MockProductHelperHw<gfxProduct>::isUnlockingLockedPtrNecessary(const Hardwa
return this->returnedIsUnlockingLockedPtrNecessary;
}
template <>
bool MockProductHelperHw<gfxProduct>::isBufferPoolAllocatorSupported() const {
return this->isBufferPoolAllocatorSupportedValue;
}
template <>
std::vector<uint32_t> MockProductHelperHw<gfxProduct>::getSupportedNumGrfs(const ReleaseHelper *releaseHelper) const {
if (releaseHelper) {

View File

@@ -27,6 +27,11 @@ class MockAILConfiguration : public AILConfiguration {
return contextSyncFlagReturn;
}
bool isBufferPoolEnabledReturn = true;
bool isBufferPoolEnabled() override {
return isBufferPoolEnabledReturn;
}
bool fallbackToLegacyValidationLogic = false;
bool useLegacyValidationLogic() override {
return fallbackToLegacyValidationLogic;