mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 00:24:58 +08:00
fix: stop using LocalOnly flag on Xe2+ platforms
Related-To: NEO-11391 Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
1cca55624b
commit
32cfa3d497
@@ -451,6 +451,7 @@ TEST_F(GmmLocalMemoryTests, givenUseCompressionAndLocalMemoryInImageInfoTrueWhen
|
||||
StorageInfo storageInfo = {};
|
||||
storageInfo.memoryBanks.set(1);
|
||||
storageInfo.systemMemoryPlacement = false;
|
||||
storageInfo.localOnlyRequired = true;
|
||||
|
||||
auto gmm = std::make_unique<Gmm>(getGmmHelper(), imgInfo, storageInfo, true);
|
||||
EXPECT_TRUE(gmm->isCompressionEnabled());
|
||||
|
||||
@@ -373,7 +373,7 @@ void Gmm::applyMemoryFlags(const StorageInfo &storageInfo) {
|
||||
if (extraMemoryFlagsRequired()) {
|
||||
applyExtraMemoryFlags(storageInfo);
|
||||
} else if (!storageInfo.isLockable) {
|
||||
if (isCompressionEnabled() || storageInfo.localOnlyRequired) {
|
||||
if (storageInfo.localOnlyRequired) {
|
||||
resourceParams.Flags.Info.LocalOnly = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "shared/source/memory_manager/allocation_properties.h"
|
||||
#include "shared/source/memory_manager/local_memory_usage.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
|
||||
#include <bitset>
|
||||
|
||||
@@ -49,6 +50,7 @@ StorageInfo MemoryManager::createStorageInfoFromProperties(const AllocationPrope
|
||||
AppResourceHelper::copyResourceTagStr(storageInfo.resourceTag, properties.allocationType,
|
||||
sizeof(storageInfo.resourceTag));
|
||||
|
||||
auto releaseHelper = executionEnvironment.rootDeviceEnvironments[properties.rootDeviceIndex]->getReleaseHelper();
|
||||
switch (properties.allocationType) {
|
||||
case AllocationType::constantSurface:
|
||||
case AllocationType::kernelIsa:
|
||||
@@ -130,7 +132,9 @@ StorageInfo MemoryManager::createStorageInfoFromProperties(const AllocationPrope
|
||||
storageInfo.cloningOfPageTables = false;
|
||||
storageInfo.tileInstanced = true;
|
||||
}
|
||||
if (!releaseHelper || releaseHelper->isLocalOnlyAllowed()) {
|
||||
storageInfo.localOnlyRequired = true;
|
||||
}
|
||||
|
||||
if (properties.flags.shareable) {
|
||||
storageInfo.isLockable = false;
|
||||
@@ -140,7 +144,9 @@ StorageInfo MemoryManager::createStorageInfoFromProperties(const AllocationPrope
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (properties.flags.preferCompressed && (!releaseHelper || releaseHelper->isLocalOnlyAllowed())) {
|
||||
storageInfo.localOnlyRequired = true;
|
||||
}
|
||||
if (debugManager.flags.ForceMultiTileAllocPlacement.get()) {
|
||||
UNRECOVERABLE_IF(properties.allocationType == AllocationType::unknown);
|
||||
if ((1llu << (static_cast<int64_t>(properties.allocationType) - 1)) & debugManager.flags.ForceMultiTileAllocPlacement.get()) {
|
||||
|
||||
@@ -593,7 +593,9 @@ bool MemoryManager::getAllocationData(AllocationData &allocationData, const Allo
|
||||
case AllocationType::svmGpu:
|
||||
case AllocationType::image:
|
||||
if (false == allocationData.flags.uncacheable && useLocalPreferredForCacheableBuffers) {
|
||||
if (!allocationData.flags.preferCompressed) {
|
||||
allocationData.storageInfo.localOnlyRequired = false;
|
||||
}
|
||||
allocationData.storageInfo.systemMemoryPlacement = false;
|
||||
}
|
||||
default:
|
||||
|
||||
@@ -57,6 +57,7 @@ class ReleaseHelper {
|
||||
virtual uint64_t getL3CacheBankSizeInKb() const = 0;
|
||||
virtual uint32_t getAdditionalFp16Caps() const = 0;
|
||||
virtual uint32_t getAdditionalExtraCaps() const = 0;
|
||||
virtual bool isLocalOnlyAllowed() const = 0;
|
||||
|
||||
protected:
|
||||
ReleaseHelper(HardwareIpVersion hardwareIpVersion) : hardwareIpVersion(hardwareIpVersion) {}
|
||||
@@ -96,6 +97,7 @@ class ReleaseHelperHw : public ReleaseHelper {
|
||||
uint64_t getL3CacheBankSizeInKb() const override;
|
||||
uint32_t getAdditionalFp16Caps() const override;
|
||||
uint32_t getAdditionalExtraCaps() const override;
|
||||
bool isLocalOnlyAllowed() const override;
|
||||
|
||||
protected:
|
||||
ReleaseHelperHw(HardwareIpVersion hardwareIpVersion) : ReleaseHelper(hardwareIpVersion) {}
|
||||
|
||||
@@ -23,6 +23,11 @@ inline bool ReleaseHelperHw<release>::isAuxSurfaceModeOverrideRequired() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ReleaseHelperHw<release>::isLocalOnlyAllowed() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
#include "shared/source/release_helper/release_helper_common_xe2_hpg.inl"
|
||||
|
||||
@@ -32,6 +32,11 @@ int ReleaseHelperHw<release>::getProductMaxPreferredSlmSize(int preferredEnumVal
|
||||
using PREFERRED_SLM_ALLOCATION_SIZE = typename Xe2HpgCoreFamily::INTERFACE_DESCRIPTOR_DATA::PREFERRED_SLM_ALLOCATION_SIZE;
|
||||
return std::min(preferredEnumValue, static_cast<int>(PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_128K));
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ReleaseHelperHw<release>::isLocalOnlyAllowed() const {
|
||||
return false;
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
#include "shared/source/release_helper/release_helper_common_xe2_hpg.inl"
|
||||
|
||||
@@ -147,4 +147,8 @@ uint32_t ReleaseHelperHw<releaseType>::getAdditionalExtraCaps() const {
|
||||
return 0u;
|
||||
}
|
||||
|
||||
template <ReleaseType releaseType>
|
||||
bool ReleaseHelperHw<releaseType>::isLocalOnlyAllowed() const {
|
||||
return true;
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
@@ -40,5 +40,6 @@ class MockReleaseHelper : public ReleaseHelper {
|
||||
ADDMETHOD_CONST_NOBASE(getL3CacheBankSizeInKb, uint64_t, {}, ());
|
||||
ADDMETHOD_CONST_NOBASE(getAdditionalFp16Caps, uint32_t, {}, ());
|
||||
ADDMETHOD_CONST_NOBASE(getAdditionalExtraCaps, uint32_t, {}, ());
|
||||
ADDMETHOD_CONST_NOBASE(isLocalOnlyAllowed, bool, {}, ());
|
||||
};
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -36,6 +36,7 @@ class MockWddmMemoryManager : public MemoryManagerCreate<WddmMemoryManager> {
|
||||
using BaseClass::supportsMultiStorageResources;
|
||||
using BaseClass::unMapPhysicalToVirtualMemory;
|
||||
using MemoryManagerCreate<WddmMemoryManager>::MemoryManagerCreate;
|
||||
using BaseClass::executionEnvironment;
|
||||
using BaseClass::getHugeGfxMemoryChunkSize;
|
||||
using BaseClass::getPreferredAllocationMethod;
|
||||
using BaseClass::isStatelessAccessRequired;
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "shared/test/common/mocks/mock_internal_allocation_storage.h"
|
||||
#include "shared/test/common/mocks/mock_memory_manager.h"
|
||||
#include "shared/test/common/mocks/mock_os_context.h"
|
||||
#include "shared/test/common/mocks/mock_release_helper.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
@@ -3011,15 +3012,18 @@ TEST(MemoryManagerTest, givenStorageInfoWithParamsWhenGettingAllocDataForLocalMe
|
||||
EXPECT_FALSE(allocData.storageInfo.systemMemoryPlacement);
|
||||
}
|
||||
|
||||
TEST(MemoryManagerTest, givenUseLocalPreferredForCacheableBuffersWhenGettingAllocDataForLocalMemoryThenLocalPreferredSetCorrectly) {
|
||||
HWTEST_F(MemoryAllocatorTest, givenUseLocalPreferredForCacheableBuffersAndCompressionNotPreferredWhenGettingAllocDataForLocalMemoryThenLocalPreferredSetCorrectly) {
|
||||
// localPreferred is implicit with gmm flags LocalOnly=0 and NonLocalOnly=0
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.UseLocalPreferredForCacheableBuffers.set(0);
|
||||
AllocationData allocData;
|
||||
allocData.flags.useSystemMemory = true;
|
||||
allocData.flags.preferCompressed = false;
|
||||
AllocationProperties properties(mockRootDeviceIndex, 1, AllocationType::buffer, mockDeviceBitfield);
|
||||
MockMemoryManager mockMemoryManager;
|
||||
|
||||
auto releaseHelper = std::make_unique<MockReleaseHelper>();
|
||||
releaseHelper->isLocalOnlyAllowedResult = true;
|
||||
mockMemoryManager.executionEnvironment.rootDeviceEnvironments[properties.rootDeviceIndex]->releaseHelper.reset(releaseHelper.release());
|
||||
AllocationType shouldUseLocalPreferredAllocationTypes[] = {
|
||||
AllocationType::buffer,
|
||||
AllocationType::svmGpu,
|
||||
@@ -3040,7 +3044,6 @@ TEST(MemoryManagerTest, givenUseLocalPreferredForCacheableBuffersWhenGettingAllo
|
||||
for (auto allocationType : shouldUseLocalPreferredAllocationTypes) {
|
||||
properties.allocationType = allocationType;
|
||||
auto storageInfo = mockMemoryManager.createStorageInfoFromProperties(properties);
|
||||
|
||||
mockMemoryManager.getAllocationData(allocData, properties, nullptr, storageInfo);
|
||||
EXPECT_EQ(false, allocData.storageInfo.localOnlyRequired);
|
||||
EXPECT_EQ(false, allocData.storageInfo.systemMemoryPlacement);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
||||
#include "shared/test/common/mocks/mock_memory_manager.h"
|
||||
#include "shared/test/common/mocks/mock_release_helper.h"
|
||||
#include "shared/test/common/mocks/ult_device_factory.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
@@ -346,31 +347,82 @@ TEST_F(MultiDeviceStorageInfoTest, givenNonMultiStorageResourceWhenCreatingStora
|
||||
|
||||
TEST_F(MultiDeviceStorageInfoTest, whenCreatingStorageInfoForBufferThenLocalOnlyFlagIsRequired) {
|
||||
AllocationProperties properties{mockRootDeviceIndex, false, numDevices * MemoryConstants::pageSize64k, AllocationType::buffer, false, singleTileMask};
|
||||
auto releaseHelper = std::make_unique<MockReleaseHelper>();
|
||||
releaseHelper->isLocalOnlyAllowedResult = true;
|
||||
memoryManager->executionEnvironment.rootDeviceEnvironments[properties.rootDeviceIndex]->releaseHelper.reset(releaseHelper.release());
|
||||
auto storageInfo = memoryManager->createStorageInfoFromProperties(properties);
|
||||
EXPECT_TRUE(storageInfo.localOnlyRequired);
|
||||
}
|
||||
|
||||
TEST_F(MultiDeviceStorageInfoTest, givenReleaseWhichDoesNotAllowLocalOnlyWhenCreatingStorageInfoForBufferThenLocalOnlyFlagIsNotRequired) {
|
||||
AllocationProperties properties{mockRootDeviceIndex, false, numDevices * MemoryConstants::pageSize64k, AllocationType::buffer, false, singleTileMask};
|
||||
auto releaseHelper = std::make_unique<MockReleaseHelper>();
|
||||
releaseHelper->isLocalOnlyAllowedResult = false;
|
||||
memoryManager->executionEnvironment.rootDeviceEnvironments[properties.rootDeviceIndex]->releaseHelper.reset(releaseHelper.release());
|
||||
auto storageInfo = memoryManager->createStorageInfoFromProperties(properties);
|
||||
EXPECT_FALSE(storageInfo.localOnlyRequired);
|
||||
}
|
||||
|
||||
TEST_F(MultiDeviceStorageInfoTest, whenCreatingStorageInfoForBufferCompressedThenLocalOnlyFlagIsRequired) {
|
||||
AllocationProperties properties{mockRootDeviceIndex, false, numDevices * MemoryConstants::pageSize64k, AllocationType::buffer, false, singleTileMask};
|
||||
properties.flags.preferCompressed = true;
|
||||
auto releaseHelper = std::make_unique<MockReleaseHelper>();
|
||||
releaseHelper->isLocalOnlyAllowedResult = true;
|
||||
memoryManager->executionEnvironment.rootDeviceEnvironments[properties.rootDeviceIndex]->releaseHelper.reset(releaseHelper.release());
|
||||
auto storageInfo = memoryManager->createStorageInfoFromProperties(properties);
|
||||
EXPECT_TRUE(storageInfo.localOnlyRequired);
|
||||
}
|
||||
|
||||
TEST_F(MultiDeviceStorageInfoTest, givenReleaseWhichDoesNotAllowLocalOnlyWhenCreatingStorageInfoForBufferCompressedThenLocalOnlyFlagIsNotRequired) {
|
||||
AllocationProperties properties{mockRootDeviceIndex, false, numDevices * MemoryConstants::pageSize64k, AllocationType::buffer, false, singleTileMask};
|
||||
properties.flags.preferCompressed = true;
|
||||
auto releaseHelper = std::make_unique<MockReleaseHelper>();
|
||||
releaseHelper->isLocalOnlyAllowedResult = false;
|
||||
memoryManager->executionEnvironment.rootDeviceEnvironments[properties.rootDeviceIndex]->releaseHelper.reset(releaseHelper.release());
|
||||
auto storageInfo = memoryManager->createStorageInfoFromProperties(properties);
|
||||
EXPECT_FALSE(storageInfo.localOnlyRequired);
|
||||
}
|
||||
|
||||
TEST_F(MultiDeviceStorageInfoTest, whenCreatingStorageInfoForSvmGpuThenLocalOnlyFlagIsRequired) {
|
||||
AllocationProperties properties{mockRootDeviceIndex, false, numDevices * MemoryConstants::pageSize64k, AllocationType::svmGpu, false, singleTileMask};
|
||||
auto releaseHelper = std::make_unique<MockReleaseHelper>();
|
||||
releaseHelper->isLocalOnlyAllowedResult = true;
|
||||
memoryManager->executionEnvironment.rootDeviceEnvironments[properties.rootDeviceIndex]->releaseHelper.reset(releaseHelper.release());
|
||||
auto storageInfo = memoryManager->createStorageInfoFromProperties(properties);
|
||||
EXPECT_TRUE(storageInfo.localOnlyRequired);
|
||||
}
|
||||
|
||||
TEST_F(MultiDeviceStorageInfoTest, givenReleaseWhichDoesNotAllowLocalOnlyWhenCreatingStorageInfoForSvmGpuThenLocalOnlyFlagIsNotRequired) {
|
||||
AllocationProperties properties{mockRootDeviceIndex, false, numDevices * MemoryConstants::pageSize64k, AllocationType::svmGpu, false, singleTileMask};
|
||||
auto releaseHelper = std::make_unique<MockReleaseHelper>();
|
||||
releaseHelper->isLocalOnlyAllowedResult = false;
|
||||
memoryManager->executionEnvironment.rootDeviceEnvironments[properties.rootDeviceIndex]->releaseHelper.reset(releaseHelper.release());
|
||||
auto storageInfo = memoryManager->createStorageInfoFromProperties(properties);
|
||||
EXPECT_FALSE(storageInfo.localOnlyRequired);
|
||||
}
|
||||
|
||||
TEST_F(MultiDeviceStorageInfoTest, whenCreatingStorageInfoForShareableSvmGpuThenLocalOnlyFlagIsRequiredAndIsNotLocable) {
|
||||
AllocationProperties properties{mockRootDeviceIndex, false, numDevices * MemoryConstants::pageSize64k, AllocationType::svmGpu, false, singleTileMask};
|
||||
properties.flags.shareable = 1u;
|
||||
auto releaseHelper = std::make_unique<MockReleaseHelper>();
|
||||
releaseHelper->isLocalOnlyAllowedResult = true;
|
||||
memoryManager->executionEnvironment.rootDeviceEnvironments[properties.rootDeviceIndex]->releaseHelper.reset(releaseHelper.release());
|
||||
auto storageInfo = memoryManager->createStorageInfoFromProperties(properties);
|
||||
EXPECT_TRUE(storageInfo.localOnlyRequired);
|
||||
EXPECT_FALSE(storageInfo.isLockable);
|
||||
}
|
||||
|
||||
TEST_F(MultiDeviceStorageInfoTest, givenReleaseWhichDoesNotAllowLocalOnlyWhenCreatingStorageInfoForShareableSvmGpuThenLocalOnlyFlagIsNotRequiredAndIsNotLocable) {
|
||||
AllocationProperties properties{mockRootDeviceIndex, false, numDevices * MemoryConstants::pageSize64k, AllocationType::svmGpu, false, singleTileMask};
|
||||
properties.flags.shareable = 1u;
|
||||
auto releaseHelper = std::make_unique<MockReleaseHelper>();
|
||||
releaseHelper->isLocalOnlyAllowedResult = false;
|
||||
memoryManager->executionEnvironment.rootDeviceEnvironments[properties.rootDeviceIndex]->releaseHelper.reset(releaseHelper.release());
|
||||
auto storageInfo = memoryManager->createStorageInfoFromProperties(properties);
|
||||
EXPECT_FALSE(storageInfo.localOnlyRequired);
|
||||
EXPECT_FALSE(storageInfo.isLockable);
|
||||
}
|
||||
|
||||
TEST_F(MultiDeviceStorageInfoTest, givenReadOnlyBufferToBeCopiedAcrossTilesWhenCreatingStorageInfoThenCorrectValuesAreSet) {
|
||||
AllocationProperties properties{mockRootDeviceIndex, false, 1u, AllocationType::buffer, false, singleTileMask};
|
||||
properties.flags.readOnlyMultiStorage = true;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/execution_environment/execution_environment.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/gmm_helper/resource_info.h"
|
||||
#include "shared/source/helpers/array_count.h"
|
||||
@@ -29,6 +30,7 @@
|
||||
#include "shared/test/common/mocks/mock_memory_manager.h"
|
||||
#include "shared/test/common/mocks/mock_os_context.h"
|
||||
#include "shared/test/common/mocks/mock_product_helper.h"
|
||||
#include "shared/test/common/mocks/mock_release_helper.h"
|
||||
#include "shared/test/common/mocks/windows/mock_wddm_allocation.h"
|
||||
#include "shared/test/common/os_interface/windows/mock_wddm_memory_manager.h"
|
||||
#include "shared/test/common/os_interface/windows/wddm_fixture.h"
|
||||
@@ -1905,6 +1907,9 @@ TEST_F(WddmMemoryManagerSimpleTest, givenShareableAllocationWhenAllocateGraphics
|
||||
auto &productHelper = executionEnvironment.rootDeviceEnvironments[0]->getProductHelper();
|
||||
|
||||
memoryManager = std::make_unique<MockWddmMemoryManager>(false, localMemoryEnabled, executionEnvironment);
|
||||
auto releaseHelper = std::make_unique<MockReleaseHelper>();
|
||||
releaseHelper->isLocalOnlyAllowedResult = true;
|
||||
memoryManager->executionEnvironment.rootDeviceEnvironments[mockRootDeviceIndex]->releaseHelper.reset(releaseHelper.release());
|
||||
AllocationProperties properties{mockRootDeviceIndex, MemoryConstants::pageSize, AllocationType::svmGpu, mockDeviceBitfield};
|
||||
properties.allFlags = 0;
|
||||
properties.size = MemoryConstants::pageSize;
|
||||
|
||||
@@ -69,3 +69,6 @@ TEST_F(ReleaseHelper1255Tests, whenGettingAdditionalFp16AtomicCapabilitiesThenRe
|
||||
TEST_F(ReleaseHelper1255Tests, whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities) {
|
||||
whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities();
|
||||
}
|
||||
TEST_F(ReleaseHelper1255Tests, whenIsLocalOnlyAllowedCalledThenTrueReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenTrueReturned();
|
||||
}
|
||||
|
||||
@@ -69,3 +69,6 @@ TEST_F(ReleaseHelper1256Tests, whenGettingAdditionalFp16AtomicCapabilitiesThenRe
|
||||
TEST_F(ReleaseHelper1256Tests, whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities) {
|
||||
whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities();
|
||||
}
|
||||
TEST_F(ReleaseHelper1256Tests, whenIsLocalOnlyAllowedCalledThenTrueReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenTrueReturned();
|
||||
}
|
||||
@@ -69,3 +69,6 @@ TEST_F(ReleaseHelper1257Tests, whenGettingAdditionalFp16AtomicCapabilitiesThenRe
|
||||
TEST_F(ReleaseHelper1257Tests, whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities) {
|
||||
whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities();
|
||||
}
|
||||
TEST_F(ReleaseHelper1257Tests, whenIsLocalOnlyAllowedCalledThenTrueReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenTrueReturned();
|
||||
}
|
||||
@@ -51,3 +51,7 @@ TEST_F(ReleaseHelper1260Tests, whenGettingAdditionalFp16AtomicCapabilitiesThenRe
|
||||
TEST_F(ReleaseHelper1260Tests, whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities) {
|
||||
whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1260Tests, whenIsLocalOnlyAllowedCalledThenTrueReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenTrueReturned();
|
||||
}
|
||||
@@ -50,3 +50,7 @@ TEST_F(ReleaseHelper1261Tests, whenGettingAdditionalFp16AtomicCapabilitiesThenRe
|
||||
TEST_F(ReleaseHelper1261Tests, whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities) {
|
||||
whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper1261Tests, whenIsLocalOnlyAllowedCalledThenTrueReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenTrueReturned();
|
||||
}
|
||||
@@ -84,3 +84,6 @@ TEST_F(ReleaseHelper1270Tests, whenGettingAdditionalFp16AtomicCapabilitiesThenRe
|
||||
TEST_F(ReleaseHelper1270Tests, whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities) {
|
||||
whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities();
|
||||
}
|
||||
TEST_F(ReleaseHelper1270Tests, whenIsLocalOnlyAllowedCalledThenTrueReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenTrueReturned();
|
||||
}
|
||||
@@ -85,3 +85,6 @@ TEST_F(ReleaseHelper1271Tests, whenGettingAdditionalFp16AtomicCapabilitiesThenRe
|
||||
TEST_F(ReleaseHelper1271Tests, whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities) {
|
||||
whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities();
|
||||
}
|
||||
TEST_F(ReleaseHelper1271Tests, whenIsLocalOnlyAllowedCalledThenTrueReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenTrueReturned();
|
||||
}
|
||||
@@ -69,3 +69,6 @@ TEST_F(ReleaseHelper1274Tests, whenGettingAdditionalFp16AtomicCapabilitiesThenRe
|
||||
TEST_F(ReleaseHelper1274Tests, whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities) {
|
||||
whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities();
|
||||
}
|
||||
TEST_F(ReleaseHelper1274Tests, whenIsLocalOnlyAllowedCalledThenTrueReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenTrueReturned();
|
||||
}
|
||||
@@ -69,3 +69,7 @@ TEST_F(ReleaseHelper2001Tests, whenGettingAdditionalFp16AtomicCapabilitiesThenRe
|
||||
TEST_F(ReleaseHelper2001Tests, whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities) {
|
||||
whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities();
|
||||
}
|
||||
|
||||
TEST_F(ReleaseHelper2001Tests, whenIsLocalOnlyAllowedCalledThenFalseReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenFalseReturned();
|
||||
}
|
||||
|
||||
@@ -90,3 +90,6 @@ TEST_F(ReleaseHelper2004Tests, whenGettingAdditionalFp16AtomicCapabilitiesThenRe
|
||||
TEST_F(ReleaseHelper2004Tests, whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities) {
|
||||
whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities();
|
||||
}
|
||||
TEST_F(ReleaseHelper2004Tests, whenIsLocalOnlyAllowedCalledThenFalseReturned) {
|
||||
whenIsLocalOnlyAllowedCalledThenFalseReturned();
|
||||
}
|
||||
@@ -101,3 +101,23 @@ void ReleaseHelperTestsBase::whenGettingAdditionalExtraKernelCapabilitiesThenRet
|
||||
EXPECT_EQ(0u, releaseHelper->getAdditionalExtraCaps());
|
||||
}
|
||||
}
|
||||
|
||||
void ReleaseHelperTestsBase::whenIsLocalOnlyAllowedCalledThenTrueReturned() {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
releaseHelper = ReleaseHelper::create(ipVersion);
|
||||
ASSERT_NE(nullptr, releaseHelper);
|
||||
|
||||
EXPECT_TRUE(releaseHelper->isLocalOnlyAllowed());
|
||||
}
|
||||
}
|
||||
|
||||
void ReleaseHelperTestsBase::whenIsLocalOnlyAllowedCalledThenFalseReturned() {
|
||||
for (auto &revision : getRevisions()) {
|
||||
ipVersion.revision = revision;
|
||||
releaseHelper = ReleaseHelper::create(ipVersion);
|
||||
ASSERT_NE(nullptr, releaseHelper);
|
||||
|
||||
EXPECT_FALSE(releaseHelper->isLocalOnlyAllowed());
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,8 @@ struct ReleaseHelperTestsBase : public ::testing::Test {
|
||||
void whenGettingTotalMemBankSizeThenReturn32GB();
|
||||
void whenGettingAdditionalFp16AtomicCapabilitiesThenReturnNoCapabilities();
|
||||
void whenGettingAdditionalExtraKernelCapabilitiesThenReturnNoCapabilities();
|
||||
void whenIsLocalOnlyAllowedCalledThenTrueReturned();
|
||||
void whenIsLocalOnlyAllowedCalledThenFalseReturned();
|
||||
|
||||
virtual std::vector<uint32_t> getRevisions() = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user