Move sharedSystemMemCapabilities to hwInfo

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-6075
This commit is contained in:
Kamil Kopryk
2021-11-17 11:26:26 +00:00
committed by Compute-Runtime-Automation
parent 8130727232
commit 7bbb43a563
29 changed files with 62 additions and 22 deletions

View File

@@ -858,7 +858,7 @@ TEST_F(DeviceTest, givenCallToDevicePropertiesThenMaximumMemoryToBeAllocatedIsCo
auto &hwHelper = HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily);
auto expectedSize = this->neoDevice->getDeviceInfo().globalMemSize;
if (!this->neoDevice->getDeviceInfo().sharedSystemAllocationsSupport) {
if (!this->neoDevice->areSharedSystemAllocationsAllowed()) {
expectedSize = std::min(expectedSize, hwHelper.getMaxMemAllocSize());
}
EXPECT_EQ(deviceProperties.maxMemAllocSize, expectedSize);

View File

@@ -467,7 +467,7 @@ TEST_F(MemoryRelaxedSizeTests,
TEST_F(MemoryRelaxedSizeTests,
givenCallToDeviceAllocWithLargerThanAllowedSizeAndRelaxedFlagThenAllocationIsMade) {
if (device->getDeviceInfo().sharedSystemAllocationsSupport) {
if (device->getNEODevice()->areSharedSystemAllocationsAllowed()) {
GTEST_SKIP();
}
size_t size = device->getNEODevice()->getDeviceInfo().maxMemAllocSize + 1;
@@ -492,7 +492,7 @@ TEST_F(MemoryRelaxedSizeTests,
TEST_F(MemoryRelaxedSizeTests,
givenCallToDeviceAllocWithLargerThanAllowedSizeAndDebugFlagThenAllocationIsMade) {
if (device->getDeviceInfo().sharedSystemAllocationsSupport) {
if (device->getNEODevice()->areSharedSystemAllocationsAllowed()) {
GTEST_SKIP();
}
DebugManagerStateRestore restorer;
@@ -607,7 +607,7 @@ TEST_F(MemoryRelaxedSizeTests,
TEST_F(MemoryRelaxedSizeTests,
givenCallToSharedAllocWithLargerThanAllowedSizeAndRelaxedFlagThenAllocationIsMade) {
if (device->getDeviceInfo().sharedSystemAllocationsSupport) {
if (device->getNEODevice()->areSharedSystemAllocationsAllowed()) {
GTEST_SKIP();
}
size_t size = device->getNEODevice()->getDeviceInfo().maxMemAllocSize + 1;
@@ -634,7 +634,7 @@ TEST_F(MemoryRelaxedSizeTests,
TEST_F(MemoryRelaxedSizeTests,
givenCallToSharedAllocWithLargerThanAllowedSizeAndDebugFlagThenAllocationIsMade) {
if (device->getDeviceInfo().sharedSystemAllocationsSupport) {
if (device->getNEODevice()->areSharedSystemAllocationsAllowed()) {
GTEST_SKIP();
}
DebugManagerStateRestore restorer;

View File

@@ -1651,7 +1651,7 @@ HWTEST_F(ModuleTranslationUnitTest, givenSystemSharedAllocationAllowedWhenBuildi
rootDeviceEnvironment->compilerInterface.reset(mockCompilerInterface);
{
neoDevice->deviceInfo.sharedSystemAllocationsSupport = true;
neoDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->capabilityTable.sharedSystemMemCapabilities = 1;
MockModuleTranslationUnit moduleTu(device);
auto ret = moduleTu.buildFromSpirV("", 0U, nullptr, "", nullptr);
@@ -1661,7 +1661,7 @@ HWTEST_F(ModuleTranslationUnitTest, givenSystemSharedAllocationAllowedWhenBuildi
}
{
neoDevice->deviceInfo.sharedSystemAllocationsSupport = false;
neoDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->capabilityTable.sharedSystemMemCapabilities = 0;
MockModuleTranslationUnit moduleTu(device);
auto ret = moduleTu.buildFromSpirV("", 0U, nullptr, "", nullptr);