Skip to content

Commit

Permalink
[L0 v2] check if device is valid in queueCreate
Browse files Browse the repository at this point in the history
to match specification
  • Loading branch information
igchor committed Oct 3, 2024
1 parent 9f6adb3 commit 9b66804
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/adapters/level_zero/v2/queue_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ ur_result_t urQueueCreate(ur_context_handle_t hContext,
ur_device_handle_t hDevice,
const ur_queue_properties_t *pProperties,
ur_queue_handle_t *phQueue) {
if (!hContext->isValidDevice(hDevice)) {
return UR_RESULT_ERROR_INVALID_DEVICE;
}

// TODO: For now, always use immediate, in-order
*phQueue =
new v2::ur_queue_immediate_in_order_t(hContext, hDevice, pProperties);
Expand Down

0 comments on commit 9b66804

Please sign in to comment.