@@ -423,55 +423,55 @@ class L0DeviceTy final : public GenericDeviceTy {
423423
424424 // Command queues related functions
425425 // / Create a command list with given ordinal and flags
426- ze_command_list_handle_t createCmdList (ze_context_handle_t Context,
426+ Expected< ze_command_list_handle_t > createCmdList (ze_context_handle_t Context,
427427 ze_device_handle_t Device,
428428 uint32_t Ordinal,
429429 ze_command_list_flags_t Flags,
430430 const std::string_view DeviceIdStr);
431431
432432 // / Create a command list with default flags
433- ze_command_list_handle_t createCmdList (ze_context_handle_t Context,
433+ Expected< ze_command_list_handle_t > createCmdList (ze_context_handle_t Context,
434434 ze_device_handle_t Device,
435435 uint32_t Ordinal,
436436 const std::string_view DeviceIdStr);
437437
438- ze_command_list_handle_t getCmdList ();
438+ Expected< ze_command_list_handle_t > getCmdList ();
439439
440440 // / Create a command queue with given ordinal and flags
441- ze_command_queue_handle_t createCmdQueue (ze_context_handle_t Context,
441+ Expected< ze_command_queue_handle_t > createCmdQueue (ze_context_handle_t Context,
442442 ze_device_handle_t Device,
443443 uint32_t Ordinal, uint32_t Index,
444444 ze_command_queue_flags_t Flags,
445445 const std::string_view DeviceIdStr);
446446
447447 // / Create a command queue with default flags
448- ze_command_queue_handle_t createCmdQueue (ze_context_handle_t Context,
448+ Expected< ze_command_queue_handle_t > createCmdQueue (ze_context_handle_t Context,
449449 ze_device_handle_t Device,
450450 uint32_t Ordinal, uint32_t Index,
451451 const std::string_view DeviceIdStr,
452452 bool InOrder = false );
453453
454454 // / Create a new command queue for the given OpenMP device ID
455- ze_command_queue_handle_t createCommandQueue (bool InOrder = false );
455+ Expected< ze_command_queue_handle_t > createCommandQueue (bool InOrder = false );
456456
457457 // / Create an immediate command list
458- ze_command_list_handle_t createImmCmdList (uint32_t Ordinal, uint32_t Index,
458+ Expected< ze_command_list_handle_t > createImmCmdList (uint32_t Ordinal, uint32_t Index,
459459 bool InOrder = false );
460460
461461 // / Create an immediate command list for computing
462- ze_command_list_handle_t createImmCmdList (bool InOrder = false ) {
462+ Expected< ze_command_list_handle_t > createImmCmdList (bool InOrder = false ) {
463463 return createImmCmdList (getComputeEngine (), getComputeIndex (), InOrder);
464464 }
465465
466466 // / Create an immediate command list for copying
467- ze_command_list_handle_t createImmCopyCmdList ();
468- ze_command_queue_handle_t getCmdQueue ();
469- ze_command_list_handle_t getCopyCmdList ();
470- ze_command_queue_handle_t getCopyCmdQueue ();
471- ze_command_list_handle_t getLinkCopyCmdList ();
472- ze_command_queue_handle_t getLinkCopyCmdQueue ();
473- ze_command_list_handle_t getImmCmdList ();
474- ze_command_list_handle_t getImmCopyCmdList ();
467+ Expected< ze_command_list_handle_t > createImmCopyCmdList ();
468+ Expected< ze_command_queue_handle_t > getCmdQueue ();
469+ Expected< ze_command_list_handle_t > getCopyCmdList ();
470+ Expected< ze_command_queue_handle_t > getCopyCmdQueue ();
471+ Expected< ze_command_list_handle_t > getLinkCopyCmdList ();
472+ Expected< ze_command_queue_handle_t > getLinkCopyCmdQueue ();
473+ Expected< ze_command_list_handle_t > getImmCmdList ();
474+ Expected< ze_command_list_handle_t > getImmCopyCmdList ();
475475
476476 // / Enqueue copy command
477477 Error enqueueMemCopy (void *Dst, const void *Src, size_t Size,
0 commit comments