diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000..b667ce6860 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,8 @@ +* @oneapi-src/unified-runtime-maintain + +# Level Zero adapter +source/adapters/level_zero @oneapi-src/unified-runtime-level-zero-write + +# CUDA and HIP adapters +source/adapters/cuda @oneapi-src/unified-runtime-cuda-write +source/adapters/hip @oneapi-src/unified-runtime-hip-write diff --git a/source/adapters/level_zero/context.cpp b/source/adapters/level_zero/context.cpp index c9496dda2c..2bd893b043 100644 --- a/source/adapters/level_zero/context.cpp +++ b/source/adapters/level_zero/context.cpp @@ -432,14 +432,12 @@ ur_result_t ur_context_handle_t_::finalize() { for (auto &List : ZeComputeCommandListCache) { for (auto &Item : List.second) { ze_command_list_handle_t ZeCommandList = Item.first; - if (ZeCommandList) - if (ZeCommandList) { - auto ZeResult = - ZE_CALL_NOCHECK(zeCommandListDestroy, (ZeCommandList)); - // Gracefully handle the case that L0 was already unloaded. - if (ZeResult && ZeResult != ZE_RESULT_ERROR_UNINITIALIZED) - return ze2urResult(ZeResult); - } + if (ZeCommandList) { + auto ZeResult = ZE_CALL_NOCHECK(zeCommandListDestroy, (ZeCommandList)); + // Gracefully handle the case that L0 was already unloaded. + if (ZeResult && ZeResult != ZE_RESULT_ERROR_UNINITIALIZED) + return ze2urResult(ZeResult); + } } } for (auto &List : ZeCopyCommandListCache) { diff --git a/source/adapters/level_zero/event.cpp b/source/adapters/level_zero/event.cpp index 08f3131d35..b979c8ab15 100644 --- a/source/adapters/level_zero/event.cpp +++ b/source/adapters/level_zero/event.cpp @@ -423,7 +423,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urEventGetInfo( } } return ReturnValue(Result); - return UR_RESULT_SUCCESS; } case UR_EVENT_INFO_REFERENCE_COUNT: { return ReturnValue(Event->RefCount.load()); diff --git a/source/adapters/level_zero/usm.cpp b/source/adapters/level_zero/usm.cpp index d06a0353e4..d75f3872b1 100644 --- a/source/adapters/level_zero/usm.cpp +++ b/source/adapters/level_zero/usm.cpp @@ -192,9 +192,8 @@ static ur_result_t USMDeviceAllocImpl(void **ResultPtr, reinterpret_cast(*ResultPtr) % Alignment == 0, UR_RESULT_ERROR_INVALID_VALUE); - USMAllocationMakeResident(USMDeviceAllocationForceResidency, Context, Device, - *ResultPtr, Size); - return UR_RESULT_SUCCESS; + return USMAllocationMakeResident(USMDeviceAllocationForceResidency, Context, + Device, *ResultPtr, Size); } static ur_result_t USMSharedAllocImpl(void **ResultPtr, @@ -225,11 +224,9 @@ static ur_result_t USMSharedAllocImpl(void **ResultPtr, reinterpret_cast(*ResultPtr) % Alignment == 0, UR_RESULT_ERROR_INVALID_VALUE); - USMAllocationMakeResident(USMSharedAllocationForceResidency, Context, Device, - *ResultPtr, Size); - // TODO: Handle PI_MEM_ALLOC_DEVICE_READ_ONLY. - return UR_RESULT_SUCCESS; + return USMAllocationMakeResident(USMSharedAllocationForceResidency, Context, + Device, *ResultPtr, Size); } static ur_result_t USMHostAllocImpl(void **ResultPtr, @@ -247,9 +244,8 @@ static ur_result_t USMHostAllocImpl(void **ResultPtr, reinterpret_cast(*ResultPtr) % Alignment == 0, UR_RESULT_ERROR_INVALID_VALUE); - USMAllocationMakeResident(USMHostAllocationForceResidency, Context, nullptr, - *ResultPtr, Size); - return UR_RESULT_SUCCESS; + return USMAllocationMakeResident(USMHostAllocationForceResidency, Context, + nullptr, *ResultPtr, Size); } UR_APIEXPORT ur_result_t UR_APICALL urUSMHostAlloc(