Skip to content

Commit fe469d7

Browse files
committed
Add TODO for handling other error results
Signed-off-by: Michael Aziz <[email protected]>
1 parent bc7c0f4 commit fe469d7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

source/adapters/level_zero/usm.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ static ur_result_t USMDeviceAllocImpl(void **ResultPtr,
192192
reinterpret_cast<std::uintptr_t>(*ResultPtr) % Alignment == 0,
193193
UR_RESULT_ERROR_INVALID_VALUE);
194194

195+
// TODO: Return any non-success result from USMAllocationMakeResident once
196+
// oneapi-src/level-zero-spec#240 is resolved.
195197
auto Result = USMAllocationMakeResident(USMDeviceAllocationForceResidency,
196198
Context, Device, *ResultPtr, Size);
197199
if (Result == UR_RESULT_ERROR_OUT_OF_DEVICE_MEMORY ||
@@ -229,6 +231,8 @@ static ur_result_t USMSharedAllocImpl(void **ResultPtr,
229231
reinterpret_cast<std::uintptr_t>(*ResultPtr) % Alignment == 0,
230232
UR_RESULT_ERROR_INVALID_VALUE);
231233

234+
// TODO: Return any non-success result from USMAllocationMakeResident once
235+
// oneapi-src/level-zero-spec#240 is resolved.
232236
auto Result = USMAllocationMakeResident(USMSharedAllocationForceResidency,
233237
Context, Device, *ResultPtr, Size);
234238
if (Result == UR_RESULT_ERROR_OUT_OF_DEVICE_MEMORY ||
@@ -255,6 +259,8 @@ static ur_result_t USMHostAllocImpl(void **ResultPtr,
255259
reinterpret_cast<std::uintptr_t>(*ResultPtr) % Alignment == 0,
256260
UR_RESULT_ERROR_INVALID_VALUE);
257261

262+
// TODO: Return any non-success result from USMAllocationMakeResident once
263+
// oneapi-src/level-zero-spec#240 is resolved.
258264
auto Result = USMAllocationMakeResident(USMHostAllocationForceResidency,
259265
Context, nullptr, *ResultPtr, Size);
260266
if (Result == UR_RESULT_ERROR_OUT_OF_DEVICE_MEMORY ||

0 commit comments

Comments
 (0)