@@ -368,8 +368,8 @@ umf_result_t umfLevelZeroMemoryProviderParamsSetResidentDevices(
368
368
for (uint32_t first_idx = 0 ; first_idx < deviceCount ; first_idx ++ ) {
369
369
for (uint32_t second_idx = 0 ; second_idx < first_idx ; second_idx ++ ) {
370
370
if (hDevices [first_idx ] == hDevices [second_idx ]) {
371
- LOG_ERR ("resident devices are not unique, idx:%u and "
372
- "idx:%u both point to device:%p" ,
371
+ LOG_ERR ("resident devices are not unique, idx: %u and "
372
+ "idx: %u both point to device: %p" ,
373
373
first_idx , second_idx , (void * )hDevices [first_idx ]);
374
374
return UMF_RESULT_ERROR_INVALID_ARGUMENT ;
375
375
}
@@ -513,9 +513,10 @@ static umf_result_t ze_memory_provider_alloc_helper(void *provider, size_t size,
513
513
}
514
514
515
515
if (ze_result != ZE_RESULT_SUCCESS ) {
516
- LOG_ERR ("failed to allocate memory, type:%d, size:%lu, alignment:%lu, "
517
- "result:%d" ,
518
- ze_provider -> memory_type , size , alignment , ze_result );
516
+ LOG_ERR (
517
+ "failed to allocate memory, type: %d, size: %lu, alignment: %lu, "
518
+ "result: %d" ,
519
+ ze_provider -> memory_type , size , alignment , ze_result );
519
520
return ze2umf_result (ze_result );
520
521
}
521
522
@@ -526,7 +527,7 @@ static umf_result_t ze_memory_provider_alloc_helper(void *provider, size_t size,
526
527
* resultPtr , size );
527
528
if (ze_result != ZE_RESULT_SUCCESS ) {
528
529
utils_read_unlock (& ze_provider -> resident_device_rwlock );
529
- LOG_ERR ("making resident allocation %p of size:%lu on device %p "
530
+ LOG_ERR ("making resident allocation %p of size: %lu on device %p "
530
531
"failed with 0x%x" ,
531
532
* resultPtr , size ,
532
533
(void * )ze_provider -> resident_device_handles [i ], ze_result );
@@ -539,7 +540,7 @@ static umf_result_t ze_memory_provider_alloc_helper(void *provider, size_t size,
539
540
}
540
541
return ze2umf_result (ze_result );
541
542
}
542
- LOG_DEBUG ("allocation %p of size:%lu made resident on device %p" ,
543
+ LOG_DEBUG ("allocation %p of size: %lu made resident on device %p" ,
543
544
* resultPtr , size ,
544
545
(void * )ze_provider -> resident_device_handles [i ]);
545
546
}
@@ -575,7 +576,7 @@ static umf_result_t query_min_page_size(ze_memory_provider_t *ze_provider,
575
576
ze_provider -> context , ptr , & properties , NULL );
576
577
577
578
* min_page_size = properties .pageSize ;
578
- LOG_DEBUG ("Querying minimum page size, got:%lu" , properties .pageSize );
579
+ LOG_DEBUG ("Querying minimum page size, got: %lu" , properties .pageSize );
579
580
580
581
ze_memory_provider_free_helper (ze_provider , ptr , 1 , 0 );
581
582
@@ -614,7 +615,7 @@ static umf_result_t ze_memory_provider_initialize(const void *params,
614
615
615
616
if (ze_params -> resident_device_count > 0 &&
616
617
ze_params -> resident_device_handles == NULL ) {
617
- LOG_ERR ("Device handler should be non-NULL if device_count:%d is "
618
+ LOG_ERR ("Device handler should be non-NULL if device_count: %d is "
618
619
"greater than 0" ,
619
620
ze_params -> resident_device_count );
620
621
return UMF_RESULT_ERROR_INVALID_ARGUMENT ;
@@ -682,7 +683,7 @@ static umf_result_t ze_memory_provider_initialize(const void *params,
682
683
ze_params -> resident_device_handles ,
683
684
sizeof (ze_device_handle_t ) * ze_params -> resident_device_count );
684
685
685
- LOG_INFO ("L0 memory provider:%p have %d resident device(s)" ,
686
+ LOG_INFO ("L0 memory provider: %p have %d resident device(s)" ,
686
687
(void * )ze_provider , ze_params -> resident_device_count );
687
688
} else {
688
689
LOG_INFO ("L0 memory provider has no resident devices" );
@@ -1016,15 +1017,16 @@ static int ze_memory_provider_resident_device_change_helper(uintptr_t key,
1016
1017
}
1017
1018
1018
1019
if (result != ZE_RESULT_SUCCESS ) {
1019
- LOG_ERR ("ze_memory_provider_resident_device_change found our pointer "
1020
- "%p but failed to make it resident on device:%p due to err:%d" ,
1021
- (void * )key , (void * )change_data -> peer_device , result );
1020
+ LOG_ERR (
1021
+ "ze_memory_provider_resident_device_change found our pointer "
1022
+ "%p but failed to make it resident on device: %p due to err: %d" ,
1023
+ (void * )key , (void * )change_data -> peer_device , result );
1022
1024
++ change_data -> failed_changes ;
1023
1025
return 1 ;
1024
1026
}
1025
1027
1026
1028
LOG_DEBUG ("ze_memory_provider_resident_device_change found our pointer %p "
1027
- "and made it resident on device:%p" ,
1029
+ "and made it resident on device: %p" ,
1028
1030
(void * )key , (void * )change_data -> peer_device );
1029
1031
++ change_data -> success_changes ;
1030
1032
return 0 ;
@@ -1035,8 +1037,8 @@ umf_result_t umfLevelZeroMemoryProviderResidentDeviceChange(
1035
1037
bool is_adding ) {
1036
1038
ze_memory_provider_t * ze_provider = umfMemoryProviderGetPriv (provider );
1037
1039
1038
- LOG_INFO ("%s resident device %p, src_provider:%p, existing peers "
1039
- "count:%d" ,
1040
+ LOG_INFO ("%s resident device %p, src_provider: %p, existing peers "
1041
+ "count: %d" ,
1040
1042
(is_adding ? "adding" : "removing" ), (void * )device ,
1041
1043
(void * )provider , ze_provider -> resident_device_count );
1042
1044
@@ -1054,7 +1056,7 @@ umf_result_t umfLevelZeroMemoryProviderResidentDeviceChange(
1054
1056
if (!is_adding ) {
1055
1057
utils_write_unlock (& ze_provider -> resident_device_rwlock );
1056
1058
LOG_ERR ("trying to remove resident device %p but the device "
1057
- "is not a peer of provider:%p currently " ,
1059
+ "is currently not a peer of provider: %p " ,
1058
1060
(void * )device , (void * )provider );
1059
1061
return UMF_RESULT_ERROR_INVALID_ARGUMENT ;
1060
1062
}
@@ -1091,8 +1093,8 @@ umf_result_t umfLevelZeroMemoryProviderResidentDeviceChange(
1091
1093
// found
1092
1094
if (is_adding ) {
1093
1095
utils_write_unlock (& ze_provider -> resident_device_rwlock );
1094
- LOG_ERR ("trying to add resident device:%p but the device is "
1095
- "already a peer of provider:%p" ,
1096
+ LOG_ERR ("trying to add resident device: %p but the device is "
1097
+ "already a peer of provider: %p" ,
1096
1098
(void * )device , (void * )provider );
1097
1099
return UMF_RESULT_ERROR_INVALID_ARGUMENT ;
1098
1100
}
@@ -1119,19 +1121,19 @@ umf_result_t umfLevelZeroMemoryProviderResidentDeviceChange(
1119
1121
& ze_memory_provider_resident_device_change_helper , & privData );
1120
1122
if (result != UMF_RESULT_SUCCESS ) {
1121
1123
LOG_ERR ("umfMemoryTrackerIterateAll failed during resident device "
1122
- "change with result:%d numFailed:%d, numSuccess:%d" ,
1124
+ "change with result: %d numFailed: %d, numSuccess: %d" ,
1123
1125
result , privData .success_changes , privData .failed_changes );
1124
1126
return result ;
1125
1127
}
1126
1128
1127
1129
if (privData .failed_changes > 0 ) {
1128
1130
LOG_ERR ("umfMemoryTrackerIterateAll did not manage to do some change "
1129
- "numFailed:%d, numSuccess:%d" ,
1131
+ "numFailed: %d, numSuccess: %d" ,
1130
1132
privData .success_changes , privData .failed_changes );
1131
1133
return UMF_RESULT_ERROR_MEMORY_PROVIDER_SPECIFIC ;
1132
1134
}
1133
1135
1134
- LOG_INFO ("ze_memory_provider_resident_device_change done, numSuccess:%d" ,
1136
+ LOG_INFO ("ze_memory_provider_resident_device_change done, numSuccess: %d" ,
1135
1137
privData .success_changes );
1136
1138
return UMF_RESULT_SUCCESS ;
1137
1139
}
0 commit comments