@@ -678,9 +678,11 @@ static umf_result_t ze_memory_provider_initialize(const void *params,
678678 }
679679
680680 ze_provider -> resident_device_count = ze_params -> resident_device_count ;
681- memcpy (ze_provider -> resident_device_indices ,
682- ze_params -> resident_device_indices ,
683- sizeof (uint32_t ) * ze_params -> resident_device_count );
681+ if (ze_params -> resident_device_count > 0 ) {
682+ memcpy (ze_provider -> resident_device_indices ,
683+ ze_params -> resident_device_indices ,
684+ sizeof (uint32_t ) * ze_params -> resident_device_count );
685+ }
684686 ze_provider -> device_count = ze_params -> device_count ;
685687 memcpy (ze_provider -> device_handles , ze_params -> device_handles ,
686688 sizeof (ze_device_handle_t ) * ze_params -> device_count );
@@ -1216,10 +1218,13 @@ umf_result_t umfLevelZeroMemoryProviderParamsSetMemoryType(
12161218
12171219umf_result_t umfLevelZeroMemoryProviderParamsSetResidentDevices (
12181220 umf_level_zero_memory_provider_params_handle_t hParams ,
1219- ze_device_handle_t * hDevices , uint32_t deviceCount ) {
1221+ ze_device_handle_t * hDevices , uint32_t deviceCount ,
1222+ uint32_t * residentDevicesIndices , uint32_t residentDevicesCount ) {
12201223 (void )hParams ;
12211224 (void )hDevices ;
12221225 (void )deviceCount ;
1226+ (void )residentDevicesIndices ;
1227+ (void )residentDevicesCount ;
12231228 LOG_ERR ("L0 memory provider is disabled! (UMF_BUILD_LEVEL_ZERO_PROVIDER is "
12241229 "OFF)" );
12251230 return UMF_RESULT_ERROR_NOT_SUPPORTED ;
0 commit comments