@@ -239,7 +239,9 @@ UBENCH_EX(simple, proxy_pool_with_os_memory_provider) {
239239 proxy_pool );
240240 }
241241
242+ fprintf (stderr , ">>> DEBUG 1-A umfPoolDestroy(proxy_pool)\n" );
242243 umfPoolDestroy (proxy_pool );
244+ fprintf (stderr , ">>> DEBUG 1-B umfPoolDestroy(proxy_pool)\n" );
243245 umfMemoryProviderDestroy (os_memory_provider );
244246 free (array );
245247}
@@ -322,7 +324,9 @@ UBENCH_EX(simple, disjoint_pool_with_os_memory_provider) {
322324 disjoint_pool );
323325 }
324326
327+ fprintf (stderr , ">>> DEBUG 2-A umfPoolDestroy(disjoint_pool)\n" );
325328 umfPoolDestroy (disjoint_pool );
329+ fprintf (stderr , ">>> DEBUG 2-B umfPoolDestroy(disjoint_pool)\n" );
326330 umfDisjointPoolParamsDestroy (disjoint_memory_pool_params );
327331 umfMemoryProviderDestroy (os_memory_provider );
328332 free (array );
@@ -369,7 +373,9 @@ UBENCH_EX(simple, jemalloc_pool_with_os_memory_provider) {
369373 jemalloc_pool );
370374 }
371375
376+ fprintf (stderr , ">>> DEBUG 3-A umfPoolDestroy(jemalloc_pool)\n" );
372377 umfPoolDestroy (jemalloc_pool );
378+ fprintf (stderr , ">>> DEBUG 3-B umfPoolDestroy(jemalloc_pool)\n" );
373379 umfMemoryProviderDestroy (os_memory_provider );
374380 free (array );
375381}
@@ -415,9 +421,16 @@ UBENCH_EX(simple, scalable_pool_with_os_memory_provider) {
415421 scalable_pool );
416422 }
417423
424+ fprintf (stderr , ">>> DEBUG 4-A umfPoolDestroy(scalable_pool)\n" );
418425 umfPoolDestroy (scalable_pool );
426+ fprintf (stderr , ">>> DEBUG 4-B umfPoolDestroy(scalable_pool)\n" );
427+ fprintf (stderr ,
428+ ">>> DEBUG 4-C umfMemoryProviderDestroy(os_memory_provider)\n" );
419429 umfMemoryProviderDestroy (os_memory_provider );
430+ fprintf (stderr ,
431+ ">>> DEBUG 4-D umfMemoryProviderDestroy(os_memory_provider)\n" );
420432 free (array );
433+ fprintf (stderr , ">>> DEBUG 4-E free()\n" );
421434}
422435#endif /* (defined UMF_POOL_SCALABLE_ENABLED) */
423436
@@ -445,36 +458,46 @@ static void do_ipc_get_put_benchmark(alloc_t *allocs, size_t num_allocs,
445458 }
446459}
447460
448- int create_level_zero_params (ze_context_handle_t * context ,
461+ static int create_level_zero_params (ze_context_handle_t * context ,
449462 ze_device_handle_t * device ) {
450463 uint32_t driver_idx = 0 ;
451464 ze_driver_handle_t driver = NULL ;
452465
466+ fprintf (stderr , ">>> DEBUG L0 %s:%i (%s)\n" , __FILE__ , __LINE__ , __func__ );
453467 int ret = init_level_zero ();
468+ fprintf (stderr , ">>> DEBUG L0 %s:%i (%s)\n" , __FILE__ , __LINE__ , __func__ );
454469 if (ret != 0 ) {
455470 fprintf (stderr , "Failed to init Level 0!\n" );
456471 return ret ;
457472 }
458473
474+ fprintf (stderr , ">>> DEBUG L0 %s:%i (%s)\n" , __FILE__ , __LINE__ , __func__ );
459475 ret = find_driver_with_gpu (& driver_idx , & driver );
476+ fprintf (stderr , ">>> DEBUG L0 %s:%i (%s)\n" , __FILE__ , __LINE__ , __func__ );
460477 if (ret || driver == NULL ) {
461478 fprintf (stderr , "Cannot find L0 driver with GPU device!\n" );
462479 return ret ;
463480 }
464481
482+ fprintf (stderr , ">>> DEBUG L0 %s:%i (%s)\n" , __FILE__ , __LINE__ , __func__ );
465483 ret = create_context (driver , context );
484+ fprintf (stderr , ">>> DEBUG L0 %s:%i (%s)\n" , __FILE__ , __LINE__ , __func__ );
466485 if (ret != 0 ) {
467486 fprintf (stderr , "Failed to create L0 context!\n" );
468487 return ret ;
469488 }
470489
490+ fprintf (stderr , ">>> DEBUG L0 %s:%i (%s)\n" , __FILE__ , __LINE__ , __func__ );
471491 ret = find_gpu_device (driver , device );
492+ fprintf (stderr , ">>> DEBUG L0 %s:%i (%s)\n" , __FILE__ , __LINE__ , __func__ );
472493 if (ret ) {
473494 fprintf (stderr , "Cannot find GPU device!\n" );
474495 destroy_context (* context );
475496 return ret ;
476497 }
477498
499+ fprintf (stderr , ">>> DEBUG L0 %s:%i\n" , __FILE__ , __LINE__ );
500+
478501 return ret ;
479502}
480503
@@ -486,13 +509,17 @@ UBENCH_EX(ipc, disjoint_pool_with_level_zero_provider) {
486509 ze_device_handle_t device = NULL ;
487510 umf_level_zero_memory_provider_params_handle_t level_zero_params = NULL ;
488511
512+ fprintf (stderr , ">>> DEBUG L0 %s:%i (%s)\n" , __FILE__ , __LINE__ , __func__ );
489513 int ret = create_level_zero_params (& context , & device );
514+ fprintf (stderr , ">>> DEBUG L0 %s:%i (%s)\n" , __FILE__ , __LINE__ , __func__ );
490515 if (ret != 0 ) {
491516 fprintf (stderr , "error: create_level_zero_params() failed\n" );
492517 exit (-1 );
493518 }
494519
520+ fprintf (stderr , ">>> DEBUG L0 %s:%i (%s)\n" , __FILE__ , __LINE__ , __func__ );
495521 umf_result = umfLevelZeroMemoryProviderParamsCreate (& level_zero_params );
522+ fprintf (stderr , ">>> DEBUG L0 %s:%i (%s)\n" , __FILE__ , __LINE__ , __func__ );
496523 if (umf_result != UMF_RESULT_SUCCESS ) {
497524 fprintf (stderr ,
498525 "error: umfLevelZeroMemoryProviderParamsCreate() failed\n" );
@@ -610,7 +637,9 @@ UBENCH_EX(ipc, disjoint_pool_with_level_zero_provider) {
610637 umfPoolFree (pool , allocs [i ].ptr );
611638 }
612639
640+ fprintf (stderr , ">>> DEBUG 5-A umfPoolDestroy(pool)\n" );
613641 umfPoolDestroy (pool );
642+ fprintf (stderr , ">>> DEBUG 5-B umfPoolDestroy(pool)\n" );
614643
615644err_params_destroy :
616645 umfDisjointPoolParamsDestroy (disjoint_params );
0 commit comments