Revert "Move kernel globals from SVM to USM device"

This reverts commit 706a5a7a8c.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2022-09-18 12:11:43 +02:00
committed by Compute-Runtime-Automation
parent f7a4790d84
commit 45c8124d8f
7 changed files with 50 additions and 54 deletions

View File

@ -2178,7 +2178,7 @@ kernels:
EXPECT_NE(nullptr, moduleTuValid.programInfo.linkerInput.get());
}
TEST_F(ModuleTranslationUnitTest, WhenCreatingFromZeBinaryAndGlobalsAreExportedThenTheirAllocationTypeIsUSMDevice) {
TEST_F(ModuleTranslationUnitTest, WhenCreatingFromZeBinaryAndGlobalsAreExportedThenTheirAllocationTypeIsSVM) {
std::string zeInfo = std::string("version :\'") + versionToString(zeInfoDecoderVersion) + R"===('
kernels:
- name : kernel
@ -2217,14 +2217,8 @@ kernels:
zebin.data(), zebin.size());
auto retVal = moduleTu.processUnpackedBinary();
EXPECT_TRUE(retVal);
EXPECT_EQ(AllocationType::BUFFER, moduleTu.globalConstBuffer->getAllocationType());
EXPECT_EQ(AllocationType::BUFFER, moduleTu.globalVarBuffer->getAllocationType());
auto svmAllocsManager = device->getDriverHandle()->getSvmAllocsManager();
auto globalConstBufferAllocType = svmAllocsManager->getSVMAlloc(reinterpret_cast<void *>(moduleTu.globalConstBuffer->getGpuAddress()))->memoryType;
auto globalVarBufferAllocType = svmAllocsManager->getSVMAlloc(reinterpret_cast<void *>(moduleTu.globalVarBuffer->getGpuAddress()))->memoryType;
EXPECT_EQ(DEVICE_UNIFIED_MEMORY, globalConstBufferAllocType);
EXPECT_EQ(DEVICE_UNIFIED_MEMORY, globalVarBufferAllocType);
EXPECT_EQ(AllocationType::SVM_ZERO_COPY, moduleTu.globalConstBuffer->getAllocationType());
EXPECT_EQ(AllocationType::SVM_ZERO_COPY, moduleTu.globalVarBuffer->getAllocationType());
}
HWTEST_F(ModuleTranslationUnitTest, WhenBuildOptionsAreNullThenReuseExistingOptions) {