From 37e388db628db5d0139f06286aa273cf1d965a2f Mon Sep 17 00:00:00 2001 From: Ross Brunton Date: Fri, 26 Sep 2025 14:31:13 +0100 Subject: [PATCH] [UR][Offload] Make some more tests pass Some low hanging fruit for pass rate. --- unified-runtime/source/adapters/offload/device.cpp | 2 ++ unified-runtime/source/adapters/offload/enqueue.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/unified-runtime/source/adapters/offload/device.cpp b/unified-runtime/source/adapters/offload/device.cpp index ab335b6d48e2b..33a2f550fb18f 100644 --- a/unified-runtime/source/adapters/offload/device.cpp +++ b/unified-runtime/source/adapters/offload/device.cpp @@ -223,6 +223,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice, case UR_DEVICE_INFO_ESIMD_SUPPORT: case UR_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS: case UR_DEVICE_INFO_ERROR_CORRECTION_SUPPORT: + case UR_DEVICE_INFO_USM_P2P_SUPPORT_EXP: + case UR_DEVICE_INFO_USM_CONTEXT_MEMCPY_SUPPORT_EXP: // TODO: Atomic queries in Offload case UR_DEVICE_INFO_ATOMIC_64: case UR_DEVICE_INFO_IMAGE_SRGB: diff --git a/unified-runtime/source/adapters/offload/enqueue.cpp b/unified-runtime/source/adapters/offload/enqueue.cpp index 3d419a30dc500..551822209e852 100644 --- a/unified-runtime/source/adapters/offload/enqueue.cpp +++ b/unified-runtime/source/adapters/offload/enqueue.cpp @@ -157,6 +157,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueKernelLaunch( const size_t *pLocalWorkSize, uint32_t, const ur_kernel_launch_property_t *, uint32_t numEventsInWaitList, const ur_event_handle_t *phEventWaitList, ur_event_handle_t *phEvent) { + UR_ASSERT(workDim > 0, UR_RESULT_ERROR_INVALID_WORK_DIMENSION); + UR_ASSERT(workDim < 4, UR_RESULT_ERROR_INVALID_WORK_DIMENSION); + ol_queue_handle_t Queue; OL_RETURN_ON_ERR(hQueue->nextQueue(Queue)); OL_RETURN_ON_ERR(waitOnEvents(Queue, phEventWaitList, numEventsInWaitList));