@@ -159,7 +159,7 @@ void L0DeviceTy::reportDeviceInfo() const {
159159 DP (" Device %" PRIu32 " \n " , DeviceId);
160160 DP (" -- Name : %s\n " , getNameCStr ());
161161 DP (" -- PCI ID : 0x%" PRIx32 " \n " , getPCIId ());
162- DP (" -- UUID : %s\n " , getUuid ().c_str ());
162+ DP (" -- UUID : %s\n " , getUuid ().data ());
163163 DP (" -- Number of total EUs : %" PRIu32 " \n " , getNumEUs ());
164164 DP (" -- Number of threads per EU : %" PRIu32 " \n " , getNumThreadsPerEU ());
165165 DP (" -- EU SIMD width : %" PRIu32 " \n " , getSIMDWidth ());
@@ -558,7 +558,7 @@ Expected<InfoTreeNode> L0DeviceTy::obtainInfoImpl() {
558558 Info.add (" Device Number" , getDeviceId ());
559559 Info.add (" Device Name" , getNameCStr ());
560560 Info.add (" Device PCI ID" , getPCIId ());
561- Info.add (" Device UUID" , getUuid ().c_str ());
561+ Info.add (" Device UUID" , getUuid ().data ());
562562 Info.add (" Number of total EUs" , getNumEUs ());
563563 Info.add (" Number of threads per EU" , getNumThreadsPerEU ());
564564 Info.add (" EU SIMD width" , getSIMDWidth ());
@@ -814,7 +814,7 @@ int32_t L0DeviceTy::makeMemoryResident(void *Mem, size_t Size) {
814814// / Create a command list with given ordinal and flags
815815ze_command_list_handle_t L0DeviceTy::createCmdList (
816816 ze_context_handle_t Context, ze_device_handle_t Device, uint32_t Ordinal,
817- ze_command_list_flags_t Flags, const std::string & DeviceIdStr) {
817+ ze_command_list_flags_t Flags, const std::string_view DeviceIdStr) {
818818 ze_command_list_desc_t cmdListDesc = {ZE_STRUCTURE_TYPE_COMMAND_LIST_DESC,
819819 nullptr , // extension
820820 Ordinal, Flags};
@@ -823,15 +823,15 @@ ze_command_list_handle_t L0DeviceTy::createCmdList(
823823 &cmdList);
824824 DP (" Created a command list " DPxMOD " (Ordinal: %" PRIu32
825825 " ) for device %s.\n " ,
826- DPxPTR (cmdList), Ordinal, DeviceIdStr.c_str ());
826+ DPxPTR (cmdList), Ordinal, DeviceIdStr.data ());
827827 return cmdList;
828828}
829829
830830// / Create a command list with default flags
831831ze_command_list_handle_t
832832L0DeviceTy::createCmdList (ze_context_handle_t Context,
833833 ze_device_handle_t Device, uint32_t Ordinal,
834- const std::string & DeviceIdStr) {
834+ const std::string_view DeviceIdStr) {
835835 return (Ordinal == UINT32_MAX)
836836 ? nullptr
837837 : createCmdList (Context, Device, Ordinal, 0 , DeviceIdStr);
@@ -853,7 +853,7 @@ ze_command_queue_handle_t
853853L0DeviceTy::createCmdQueue (ze_context_handle_t Context,
854854 ze_device_handle_t Device, uint32_t Ordinal,
855855 uint32_t Index, ze_command_queue_flags_t Flags,
856- const std::string & DeviceIdStr) {
856+ const std::string_view DeviceIdStr) {
857857 ze_command_queue_desc_t cmdQueueDesc = {ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC,
858858 nullptr , // extension
859859 Ordinal,
@@ -866,14 +866,14 @@ L0DeviceTy::createCmdQueue(ze_context_handle_t Context,
866866 &cmdQueue);
867867 DP (" Created a command queue " DPxMOD " (Ordinal: %" PRIu32 " , Index: %" PRIu32
868868 " , Flags: %" PRIu32 " ) for device %s.\n " ,
869- DPxPTR (cmdQueue), Ordinal, Index, Flags, DeviceIdStr.c_str ());
869+ DPxPTR (cmdQueue), Ordinal, Index, Flags, DeviceIdStr.data ());
870870 return cmdQueue;
871871}
872872
873873// / Create a command queue with default flags
874874ze_command_queue_handle_t L0DeviceTy::createCmdQueue (
875875 ze_context_handle_t Context, ze_device_handle_t Device, uint32_t Ordinal,
876- uint32_t Index, const std::string & DeviceIdStr, bool InOrder) {
876+ uint32_t Index, const std::string_view DeviceIdStr, bool InOrder) {
877877 ze_command_queue_flags_t Flags = InOrder ? ZE_COMMAND_QUEUE_FLAG_IN_ORDER : 0 ;
878878 return (Ordinal == UINT32_MAX) ? nullptr
879879 : createCmdQueue (Context, Device, Ordinal,
0 commit comments