@@ -159,7 +159,7 @@ void L0DeviceTy::reportDeviceInfo() const {
159
159
DP (" Device %" PRIu32 " \n " , DeviceId);
160
160
DP (" -- Name : %s\n " , getNameCStr ());
161
161
DP (" -- PCI ID : 0x%" PRIx32 " \n " , getPCIId ());
162
- DP (" -- UUID : %s\n " , getUuid ().c_str ());
162
+ DP (" -- UUID : %s\n " , getUuid ().data ());
163
163
DP (" -- Number of total EUs : %" PRIu32 " \n " , getNumEUs ());
164
164
DP (" -- Number of threads per EU : %" PRIu32 " \n " , getNumThreadsPerEU ());
165
165
DP (" -- EU SIMD width : %" PRIu32 " \n " , getSIMDWidth ());
@@ -558,7 +558,7 @@ Expected<InfoTreeNode> L0DeviceTy::obtainInfoImpl() {
558
558
Info.add (" Device Number" , getDeviceId ());
559
559
Info.add (" Device Name" , getNameCStr ());
560
560
Info.add (" Device PCI ID" , getPCIId ());
561
- Info.add (" Device UUID" , getUuid ().c_str ());
561
+ Info.add (" Device UUID" , getUuid ().data ());
562
562
Info.add (" Number of total EUs" , getNumEUs ());
563
563
Info.add (" Number of threads per EU" , getNumThreadsPerEU ());
564
564
Info.add (" EU SIMD width" , getSIMDWidth ());
@@ -814,7 +814,7 @@ int32_t L0DeviceTy::makeMemoryResident(void *Mem, size_t Size) {
814
814
// / Create a command list with given ordinal and flags
815
815
ze_command_list_handle_t L0DeviceTy::createCmdList (
816
816
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) {
818
818
ze_command_list_desc_t cmdListDesc = {ZE_STRUCTURE_TYPE_COMMAND_LIST_DESC,
819
819
nullptr , // extension
820
820
Ordinal, Flags};
@@ -823,15 +823,15 @@ ze_command_list_handle_t L0DeviceTy::createCmdList(
823
823
&cmdList);
824
824
DP (" Created a command list " DPxMOD " (Ordinal: %" PRIu32
825
825
" ) for device %s.\n " ,
826
- DPxPTR (cmdList), Ordinal, DeviceIdStr.c_str ());
826
+ DPxPTR (cmdList), Ordinal, DeviceIdStr.data ());
827
827
return cmdList;
828
828
}
829
829
830
830
// / Create a command list with default flags
831
831
ze_command_list_handle_t
832
832
L0DeviceTy::createCmdList (ze_context_handle_t Context,
833
833
ze_device_handle_t Device, uint32_t Ordinal,
834
- const std::string & DeviceIdStr) {
834
+ const std::string_view DeviceIdStr) {
835
835
return (Ordinal == UINT32_MAX)
836
836
? nullptr
837
837
: createCmdList (Context, Device, Ordinal, 0 , DeviceIdStr);
@@ -853,7 +853,7 @@ ze_command_queue_handle_t
853
853
L0DeviceTy::createCmdQueue (ze_context_handle_t Context,
854
854
ze_device_handle_t Device, uint32_t Ordinal,
855
855
uint32_t Index, ze_command_queue_flags_t Flags,
856
- const std::string & DeviceIdStr) {
856
+ const std::string_view DeviceIdStr) {
857
857
ze_command_queue_desc_t cmdQueueDesc = {ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC,
858
858
nullptr , // extension
859
859
Ordinal,
@@ -866,14 +866,14 @@ L0DeviceTy::createCmdQueue(ze_context_handle_t Context,
866
866
&cmdQueue);
867
867
DP (" Created a command queue " DPxMOD " (Ordinal: %" PRIu32 " , Index: %" PRIu32
868
868
" , Flags: %" PRIu32 " ) for device %s.\n " ,
869
- DPxPTR (cmdQueue), Ordinal, Index, Flags, DeviceIdStr.c_str ());
869
+ DPxPTR (cmdQueue), Ordinal, Index, Flags, DeviceIdStr.data ());
870
870
return cmdQueue;
871
871
}
872
872
873
873
// / Create a command queue with default flags
874
874
ze_command_queue_handle_t L0DeviceTy::createCmdQueue (
875
875
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) {
877
877
ze_command_queue_flags_t Flags = InOrder ? ZE_COMMAND_QUEUE_FLAG_IN_ORDER : 0 ;
878
878
return (Ordinal == UINT32_MAX) ? nullptr
879
879
: createCmdQueue (Context, Device, Ordinal,
0 commit comments