Skip to content

Commit 27fbdde

Browse files
refactor: correct naming of unified memory enums
Signed-off-by: Mateusz Jablonski <[email protected]>
1 parent 2eba5b3 commit 27fbdde

File tree

55 files changed

+386
-388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+386
-388
lines changed

level_zero/core/source/cmdlist/cmdlist_hw.inl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1882,8 +1882,8 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryFill(void *ptr,
18821882
NEO::SvmAllocationData *allocData = nullptr;
18831883
bool dstAllocFound = device->getDriverHandle()->findAllocationDataForRange(ptr, size, allocData);
18841884
if (dstAllocFound) {
1885-
if (allocData->memoryType == InternalMemoryType::HOST_UNIFIED_MEMORY ||
1886-
allocData->memoryType == InternalMemoryType::SHARED_UNIFIED_MEMORY) {
1885+
if (allocData->memoryType == InternalMemoryType::hostUnifiedMemory ||
1886+
allocData->memoryType == InternalMemoryType::sharedUnifiedMemory) {
18871887
hostPointerNeedsFlush = true;
18881888
}
18891889
} else {
@@ -2274,15 +2274,15 @@ inline AlignedAllocationData CommandListCoreFamily<gfxCoreFamily>::getAlignedAll
22742274
alloc = driverHandle->getPeerAllocation(device, allocData, reinterpret_cast<void *>(pbase), &alignedPtr, nullptr);
22752275
alignedPtr += offset;
22762276

2277-
if (allocData->memoryType == InternalMemoryType::SHARED_UNIFIED_MEMORY) {
2277+
if (allocData->memoryType == InternalMemoryType::sharedUnifiedMemory) {
22782278
commandContainer.addToResidencyContainer(allocData->gpuAllocations.getDefaultGraphicsAllocation());
22792279
}
22802280
} else {
22812281
alignedPtr = sourcePtr;
22822282
}
22832283

2284-
if (allocData->memoryType == InternalMemoryType::HOST_UNIFIED_MEMORY ||
2285-
allocData->memoryType == InternalMemoryType::SHARED_UNIFIED_MEMORY) {
2284+
if (allocData->memoryType == InternalMemoryType::hostUnifiedMemory ||
2285+
allocData->memoryType == InternalMemoryType::sharedUnifiedMemory) {
22862286
hostPointerNeedsFlush = true;
22872287
}
22882288
if (allocData->virtualReservationData) {

level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -974,8 +974,8 @@ bool CommandListCoreFamilyImmediate<gfxCoreFamily>::preferCopyThroughLockedPtr(C
974974
bool cpuMemCopyEnabled = false;
975975

976976
switch (transferType) {
977-
case HOST_USM_TO_DEVICE_USM:
978-
case DEVICE_USM_TO_HOST_USM: {
977+
case TransferType::hostUsmToDeviceUsm:
978+
case TransferType::deviceUsmToHostUsm: {
979979
if (this->dependenciesPresent) {
980980
cpuMemCopyEnabled = false;
981981
break;
@@ -990,8 +990,8 @@ bool CommandListCoreFamilyImmediate<gfxCoreFamily>::preferCopyThroughLockedPtr(C
990990
cpuMemCopyEnabled = allEventsCompleted;
991991
break;
992992
}
993-
case HOST_NON_USM_TO_DEVICE_USM:
994-
case DEVICE_USM_TO_HOST_NON_USM:
993+
case TransferType::hostNonUsmToDeviceUsm:
994+
case TransferType::deviceUsmToHostNonUsm:
995995
cpuMemCopyEnabled = true;
996996
break;
997997
default:
@@ -1004,19 +1004,19 @@ bool CommandListCoreFamilyImmediate<gfxCoreFamily>::preferCopyThroughLockedPtr(C
10041004

10051005
template <GFXCORE_FAMILY gfxCoreFamily>
10061006
bool CommandListCoreFamilyImmediate<gfxCoreFamily>::isSuitableUSMHostAlloc(NEO::SvmAllocationData *alloc) {
1007-
return alloc && (alloc->memoryType == InternalMemoryType::HOST_UNIFIED_MEMORY);
1007+
return alloc && (alloc->memoryType == InternalMemoryType::hostUnifiedMemory);
10081008
}
10091009

10101010
template <GFXCORE_FAMILY gfxCoreFamily>
10111011
bool CommandListCoreFamilyImmediate<gfxCoreFamily>::isSuitableUSMDeviceAlloc(NEO::SvmAllocationData *alloc) {
1012-
return alloc && (alloc->memoryType == InternalMemoryType::DEVICE_UNIFIED_MEMORY) &&
1012+
return alloc && (alloc->memoryType == InternalMemoryType::deviceUnifiedMemory) &&
10131013
alloc->gpuAllocations.getGraphicsAllocation(this->device->getRootDeviceIndex()) &&
10141014
alloc->gpuAllocations.getGraphicsAllocation(this->device->getRootDeviceIndex())->storageInfo.getNumBanks() == 1;
10151015
}
10161016

10171017
template <GFXCORE_FAMILY gfxCoreFamily>
10181018
bool CommandListCoreFamilyImmediate<gfxCoreFamily>::isSuitableUSMSharedAlloc(NEO::SvmAllocationData *alloc) {
1019-
return alloc && (alloc->memoryType == InternalMemoryType::SHARED_UNIFIED_MEMORY);
1019+
return alloc && (alloc->memoryType == InternalMemoryType::sharedUnifiedMemory);
10201020
}
10211021

10221022
template <GFXCORE_FAMILY gfxCoreFamily>
@@ -1138,111 +1138,111 @@ TransferType CommandListCoreFamilyImmediate<gfxCoreFamily>::getTransferType(cons
11381138
const bool dstHostNonUSM = (cpuMemCopyInfo.dstAllocData == nullptr) && !cpuMemCopyInfo.dstIsImportedHostPtr;
11391139

11401140
if (srcHostNonUSM && dstHostUSM) {
1141-
return HOST_NON_USM_TO_HOST_USM;
1141+
return TransferType::hostNonUsmToHostUsm;
11421142
}
11431143
if (srcHostNonUSM && dstDeviceUSM) {
1144-
return HOST_NON_USM_TO_DEVICE_USM;
1144+
return TransferType::hostNonUsmToDeviceUsm;
11451145
}
11461146
if (srcHostNonUSM && dstSharedUSM) {
1147-
return HOST_NON_USM_TO_SHARED_USM;
1147+
return TransferType::hostNonUsmToSharedUsm;
11481148
}
11491149
if (srcHostNonUSM && dstHostNonUSM) {
1150-
return HOST_NON_USM_TO_HOST_NON_USM;
1150+
return TransferType::hostNonUsmToHostNonUsm;
11511151
}
11521152

11531153
if (srcHostUSM && dstHostUSM) {
1154-
return HOST_USM_TO_HOST_USM;
1154+
return TransferType::hostUsmToHostUsm;
11551155
}
11561156
if (srcHostUSM && dstDeviceUSM) {
1157-
return HOST_USM_TO_DEVICE_USM;
1157+
return TransferType::hostUsmToDeviceUsm;
11581158
}
11591159
if (srcHostUSM && dstSharedUSM) {
1160-
return HOST_USM_TO_SHARED_USM;
1160+
return TransferType::hostUsmToSharedUsm;
11611161
}
11621162
if (srcHostUSM && dstHostNonUSM) {
1163-
return HOST_USM_TO_HOST_NON_USM;
1163+
return TransferType::hostUsmToHostNonUsm;
11641164
}
11651165

11661166
if (srcDeviceUSM && dstHostUSM) {
1167-
return DEVICE_USM_TO_HOST_USM;
1167+
return TransferType::deviceUsmToHostUsm;
11681168
}
11691169
if (srcDeviceUSM && dstDeviceUSM) {
1170-
return DEVICE_USM_TO_DEVICE_USM;
1170+
return TransferType::deviceUsmToDeviceUsm;
11711171
}
11721172
if (srcDeviceUSM && dstSharedUSM) {
1173-
return DEVICE_USM_TO_SHARED_USM;
1173+
return TransferType::deviceUsmToSharedUsm;
11741174
}
11751175
if (srcDeviceUSM && dstHostNonUSM) {
1176-
return DEVICE_USM_TO_HOST_NON_USM;
1176+
return TransferType::deviceUsmToHostNonUsm;
11771177
}
11781178

11791179
if (srcSharedUSM && dstHostUSM) {
1180-
return SHARED_USM_TO_HOST_USM;
1180+
return TransferType::sharedUsmToHostUsm;
11811181
}
11821182
if (srcSharedUSM && dstDeviceUSM) {
1183-
return SHARED_USM_TO_DEVICE_USM;
1183+
return TransferType::sharedUsmToDeviceUsm;
11841184
}
11851185
if (srcSharedUSM && dstSharedUSM) {
1186-
return SHARED_USM_TO_SHARED_USM;
1186+
return TransferType::sharedUsmToSharedUsm;
11871187
}
11881188
if (srcSharedUSM && dstHostNonUSM) {
1189-
return SHARED_USM_TO_HOST_NON_USM;
1189+
return TransferType::sharedUsmToHostNonUsm;
11901190
}
11911191

1192-
return TRANSFER_TYPE_UNKNOWN;
1192+
return TransferType::unknown;
11931193
}
11941194

11951195
template <GFXCORE_FAMILY gfxCoreFamily>
11961196
size_t CommandListCoreFamilyImmediate<gfxCoreFamily>::getTransferThreshold(TransferType transferType) {
11971197
size_t retVal = 0u;
11981198

11991199
switch (transferType) {
1200-
case HOST_NON_USM_TO_HOST_USM:
1200+
case TransferType::hostNonUsmToHostUsm:
12011201
retVal = 1 * MemoryConstants::megaByte;
12021202
break;
1203-
case HOST_NON_USM_TO_DEVICE_USM:
1203+
case TransferType::hostNonUsmToDeviceUsm:
12041204
retVal = 4 * MemoryConstants::megaByte;
12051205
if (NEO::debugManager.flags.ExperimentalH2DCpuCopyThreshold.get() != -1) {
12061206
retVal = NEO::debugManager.flags.ExperimentalH2DCpuCopyThreshold.get();
12071207
}
12081208
break;
1209-
case HOST_NON_USM_TO_SHARED_USM:
1209+
case TransferType::hostNonUsmToSharedUsm:
12101210
retVal = 0u;
12111211
break;
1212-
case HOST_NON_USM_TO_HOST_NON_USM:
1212+
case TransferType::hostNonUsmToHostNonUsm:
12131213
retVal = 1 * MemoryConstants::megaByte;
12141214
break;
1215-
case HOST_USM_TO_HOST_USM:
1215+
case TransferType::hostUsmToHostUsm:
12161216
retVal = 200 * MemoryConstants::kiloByte;
12171217
break;
1218-
case HOST_USM_TO_DEVICE_USM:
1218+
case TransferType::hostUsmToDeviceUsm:
12191219
retVal = 50 * MemoryConstants::kiloByte;
12201220
break;
1221-
case HOST_USM_TO_SHARED_USM:
1221+
case TransferType::hostUsmToSharedUsm:
12221222
retVal = 0u;
12231223
break;
1224-
case HOST_USM_TO_HOST_NON_USM:
1224+
case TransferType::hostUsmToHostNonUsm:
12251225
retVal = 500 * MemoryConstants::kiloByte;
12261226
break;
1227-
case DEVICE_USM_TO_DEVICE_USM:
1227+
case TransferType::deviceUsmToDeviceUsm:
12281228
retVal = 0u;
12291229
break;
1230-
case DEVICE_USM_TO_SHARED_USM:
1230+
case TransferType::deviceUsmToSharedUsm:
12311231
retVal = 0u;
12321232
break;
1233-
case DEVICE_USM_TO_HOST_USM:
1233+
case TransferType::deviceUsmToHostUsm:
12341234
retVal = 128u;
12351235
break;
1236-
case DEVICE_USM_TO_HOST_NON_USM:
1236+
case TransferType::deviceUsmToHostNonUsm:
12371237
retVal = 1 * MemoryConstants::kiloByte;
12381238
if (NEO::debugManager.flags.ExperimentalD2HCpuCopyThreshold.get() != -1) {
12391239
retVal = NEO::debugManager.flags.ExperimentalD2HCpuCopyThreshold.get();
12401240
}
12411241
break;
1242-
case SHARED_USM_TO_HOST_USM:
1243-
case SHARED_USM_TO_DEVICE_USM:
1244-
case SHARED_USM_TO_SHARED_USM:
1245-
case SHARED_USM_TO_HOST_NON_USM:
1242+
case TransferType::sharedUsmToHostUsm:
1243+
case TransferType::sharedUsmToDeviceUsm:
1244+
case TransferType::sharedUsmToSharedUsm:
1245+
case TransferType::sharedUsmToHostNonUsm:
12461246
retVal = 0u;
12471247
break;
12481248
default:

level_zero/core/source/context/context.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ struct Image;
2828
struct Context : _ze_context_handle_t {
2929
inline static ze_memory_type_t parseUSMType(InternalMemoryType memoryType) {
3030
switch (memoryType) {
31-
case InternalMemoryType::SHARED_UNIFIED_MEMORY:
31+
case InternalMemoryType::sharedUnifiedMemory:
3232
return ZE_MEMORY_TYPE_SHARED;
33-
case InternalMemoryType::DEVICE_UNIFIED_MEMORY:
33+
case InternalMemoryType::deviceUnifiedMemory:
3434
return ZE_MEMORY_TYPE_DEVICE;
35-
case InternalMemoryType::HOST_UNIFIED_MEMORY:
35+
case InternalMemoryType::hostUnifiedMemory:
3636
return ZE_MEMORY_TYPE_HOST;
3737
default:
3838
return ZE_MEMORY_TYPE_UNKNOWN;

level_zero/core/source/context/context_imp.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ ze_result_t ContextImp::allocHostMem(const ze_host_mem_alloc_desc_t *hostDesc,
119119
return ZE_RESULT_SUCCESS;
120120
}
121121

122-
NEO::SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::HOST_UNIFIED_MEMORY,
122+
NEO::SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::hostUnifiedMemory,
123123
alignment,
124124
this->rootDeviceIndices,
125125
this->deviceBitfields);
@@ -246,7 +246,7 @@ ze_result_t ContextImp::allocDeviceMem(ze_device_handle_t hDevice,
246246
}
247247

248248
deviceBitfields[rootDeviceIndex] = neoDevice->getDeviceBitfield();
249-
NEO::SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::DEVICE_UNIFIED_MEMORY, alignment, this->driverHandle->rootDeviceIndices, deviceBitfields);
249+
NEO::SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::deviceUnifiedMemory, alignment, this->driverHandle->rootDeviceIndices, deviceBitfields);
250250
unifiedMemoryProperties.allocationFlags.flags.shareable = isShareableMemory(deviceDesc->pNext, static_cast<uint32_t>(lookupTable.exportMemory), neoDevice);
251251
unifiedMemoryProperties.device = neoDevice;
252252
unifiedMemoryProperties.allocationFlags.flags.compressedHint = isAllocationSuitableForCompression(lookupTable, *device, size);
@@ -323,7 +323,7 @@ ze_result_t ContextImp::allocSharedMem(ze_device_handle_t hDevice,
323323
deviceBitfields[rootDeviceIndex] = neoDevice->getDeviceBitfield();
324324
}
325325

326-
NEO::SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::SHARED_UNIFIED_MEMORY,
326+
NEO::SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::sharedUnifiedMemory,
327327
alignment,
328328
this->rootDeviceIndices,
329329
deviceBitfields);
@@ -478,7 +478,7 @@ ze_result_t ContextImp::makeMemoryResident(ze_device_handle_t hDevice, void *ptr
478478

479479
if (ZE_RESULT_SUCCESS == res) {
480480
auto allocData = device->getDriverHandle()->getSvmAllocsManager()->getSVMAlloc(ptr);
481-
if (allocData && allocData->memoryType == InternalMemoryType::SHARED_UNIFIED_MEMORY) {
481+
if (allocData && allocData->memoryType == InternalMemoryType::sharedUnifiedMemory) {
482482
DriverHandleImp *driverHandleImp = static_cast<DriverHandleImp *>(device->getDriverHandle());
483483
std::lock_guard<std::mutex> lock(driverHandleImp->sharedMakeResidentAllocationsLock);
484484
driverHandleImp->sharedMakeResidentAllocations.insert({ptr, allocation});
@@ -609,8 +609,8 @@ ze_result_t ContextImp::getIpcMemHandle(const void *ptr,
609609
IpcMemoryData &ipcData = *reinterpret_cast<IpcMemoryData *>(pIpcHandle->data);
610610
auto type = allocData->memoryType;
611611
uint8_t ipcType = 0;
612-
if (type == HOST_UNIFIED_MEMORY) {
613-
ipcType = static_cast<uint8_t>(InternalIpcMemoryType::IPC_HOST_UNIFIED_MEMORY);
612+
if (type == InternalMemoryType::hostUnifiedMemory) {
613+
ipcType = static_cast<uint8_t>(InternalIpcMemoryType::hostUnifiedMemory);
614614
}
615615
setIPCHandleData(graphicsAllocation, handle, ipcData, reinterpret_cast<uint64_t>(ptr), ipcType);
616616

@@ -663,9 +663,9 @@ ze_result_t ContextImp::getIpcMemHandles(const void *ptr,
663663
}
664664

665665
auto type = allocData->memoryType;
666-
auto ipcType = InternalIpcMemoryType::IPC_DEVICE_UNIFIED_MEMORY;
667-
if (type == HOST_UNIFIED_MEMORY) {
668-
ipcType = InternalIpcMemoryType::IPC_HOST_UNIFIED_MEMORY;
666+
auto ipcType = InternalIpcMemoryType::deviceUnifiedMemory;
667+
if (type == InternalMemoryType::hostUnifiedMemory) {
668+
ipcType = InternalIpcMemoryType::hostUnifiedMemory;
669669
}
670670

671671
for (uint32_t i = 0; i < *numIpcHandles; i++) {
@@ -694,9 +694,9 @@ ze_result_t ContextImp::openIpcMemHandle(ze_device_handle_t hDevice,
694694
uint8_t type = ipcData.type;
695695

696696
NEO::AllocationType allocationType = NEO::AllocationType::unknown;
697-
if (type == static_cast<uint8_t>(InternalIpcMemoryType::IPC_DEVICE_UNIFIED_MEMORY)) {
697+
if (type == static_cast<uint8_t>(InternalIpcMemoryType::deviceUnifiedMemory)) {
698698
allocationType = NEO::AllocationType::buffer;
699-
} else if (type == static_cast<uint8_t>(InternalIpcMemoryType::IPC_HOST_UNIFIED_MEMORY)) {
699+
} else if (type == static_cast<uint8_t>(InternalIpcMemoryType::hostUnifiedMemory)) {
700700
allocationType = NEO::AllocationType::bufferHostMemory;
701701
} else {
702702
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
@@ -725,7 +725,7 @@ ze_result_t ContextImp::openIpcMemHandles(ze_device_handle_t hDevice,
725725
const IpcMemoryData &ipcData = *reinterpret_cast<const IpcMemoryData *>(pIpcHandles[i].data);
726726
uint64_t handle = ipcData.handle;
727727

728-
if (ipcData.type != static_cast<uint8_t>(InternalIpcMemoryType::IPC_DEVICE_UNIFIED_MEMORY)) {
728+
if (ipcData.type != static_cast<uint8_t>(InternalIpcMemoryType::deviceUnifiedMemory)) {
729729
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
730730
}
731731

@@ -1178,7 +1178,7 @@ ze_result_t ContextImp::mapVirtualMem(const void *ptr,
11781178
allocData.size = size;
11791179
allocData.pageSizeForAlignment = MemoryConstants::pageSize64k;
11801180
allocData.setAllocId(this->driverHandle->svmAllocsManager->allocationsCounter++);
1181-
allocData.memoryType = InternalMemoryType::RESERVED_DEVICE_MEMORY;
1181+
allocData.memoryType = InternalMemoryType::reservedDeviceMemory;
11821182
allocData.virtualReservationData = virtualMemoryReservation;
11831183
NEO::MemoryMappedRange *mappedRange = new NEO::MemoryMappedRange;
11841184
mappedRange->ptr = ptr;

level_zero/core/source/device/device_imp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1476,7 +1476,7 @@ NEO::GraphicsAllocation *DeviceImp::allocateManagedMemoryFromHostPtr(void *buffe
14761476
allocData.gpuAllocations.addAllocation(allocation);
14771477
allocData.cpuAllocation = nullptr;
14781478
allocData.size = size;
1479-
allocData.memoryType = InternalMemoryType::NOT_SPECIFIED;
1479+
allocData.memoryType = InternalMemoryType::notSpecified;
14801480
allocData.device = nullptr;
14811481
driverHandle->getSvmAllocsManager()->insertSVMAlloc(allocData);
14821482

level_zero/core/source/driver/driver_handle_imp.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ void *DriverHandleImp::importFdHandle(NEO::Device *neoDevice,
621621
allocDataTmp->cpuAllocation = nullptr;
622622
allocDataTmp->size = alloc->getUnderlyingBufferSize();
623623
allocDataTmp->memoryType =
624-
isHostIpcAllocation ? InternalMemoryType::HOST_UNIFIED_MEMORY : InternalMemoryType::DEVICE_UNIFIED_MEMORY;
624+
isHostIpcAllocation ? InternalMemoryType::hostUnifiedMemory : InternalMemoryType::deviceUnifiedMemory;
625625
allocDataTmp->device = neoDevice;
626626
allocDataTmp->isImportedAllocation = true;
627627
allocDataTmp->setAllocId(this->getSvmAllocsManager()->allocationsCounter++);
@@ -675,7 +675,7 @@ void *DriverHandleImp::importFdHandles(NEO::Device *neoDevice, ze_ipc_memory_fla
675675
allocDataTmp->gpuAllocations.addAllocation(alloc);
676676
allocDataTmp->cpuAllocation = nullptr;
677677
allocDataTmp->size = alloc->getUnderlyingBufferSize();
678-
allocDataTmp->memoryType = InternalMemoryType::DEVICE_UNIFIED_MEMORY;
678+
allocDataTmp->memoryType = InternalMemoryType::deviceUnifiedMemory;
679679
allocDataTmp->device = neoDevice;
680680
allocDataTmp->isImportedAllocation = true;
681681
allocDataTmp->setAllocId(this->getSvmAllocsManager()->allocationsCounter++);
@@ -767,7 +767,7 @@ NEO::GraphicsAllocation *DriverHandleImp::getPeerAllocation(Device *device,
767767
uint32_t numHandles = alloc->getNumHandles();
768768

769769
// Don't attempt to use the peerMapAddress for reserved memory due to the limitations in the address reserved.
770-
if (allocData->memoryType == InternalMemoryType::RESERVED_DEVICE_MEMORY) {
770+
if (allocData->memoryType == InternalMemoryType::reservedDeviceMemory) {
771771
peerMapAddress = nullptr;
772772
}
773773

@@ -847,7 +847,7 @@ void *DriverHandleImp::importNTHandle(ze_device_handle_t hDevice, void *handle,
847847
allocData.cpuAllocation = nullptr;
848848
allocData.size = alloc->getUnderlyingBufferSize();
849849
allocData.memoryType =
850-
isHostIpcAllocation ? InternalMemoryType::HOST_UNIFIED_MEMORY : InternalMemoryType::DEVICE_UNIFIED_MEMORY;
850+
isHostIpcAllocation ? InternalMemoryType::hostUnifiedMemory : InternalMemoryType::deviceUnifiedMemory;
851851
allocData.device = neoDevice;
852852
allocData.isImportedAllocation = true;
853853
allocData.setAllocId(this->getSvmAllocsManager()->allocationsCounter++);
@@ -863,8 +863,8 @@ ze_result_t DriverHandleImp::checkMemoryAccessFromDevice(Device *device, const v
863863
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
864864
}
865865

866-
if (allocation->memoryType == InternalMemoryType::HOST_UNIFIED_MEMORY ||
867-
allocation->memoryType == InternalMemoryType::SHARED_UNIFIED_MEMORY)
866+
if (allocation->memoryType == InternalMemoryType::hostUnifiedMemory ||
867+
allocation->memoryType == InternalMemoryType::sharedUnifiedMemory)
868868
return ZE_RESULT_SUCCESS;
869869

870870
if (allocation->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex()) != nullptr) {

level_zero/core/test/aub_tests/aub_hello_world_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ TEST_F(AUBHelloWorldL0, whenAppendMemoryCopyIsCalledThenMemoryIsProperlyCopied)
2323
uint8_t size = 8;
2424
uint8_t val = 255;
2525

26-
NEO::SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::HOST_UNIFIED_MEMORY,
26+
NEO::SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::hostUnifiedMemory,
2727
1,
2828
context->rootDeviceIndices,
2929
context->deviceBitfields);

0 commit comments

Comments
 (0)