@@ -357,6 +357,11 @@ def _compile_and_write_autotune_config(
357
357
)
358
358
359
359
if os .path .exists (autotune_tmp_file ):
360
+ logger .debug (
361
+ "Compiling module: %s. Use existing autotune config file: %s" ,
362
+ module_name ,
363
+ autotune_tmp_file ,
364
+ )
360
365
debug_options .xla_gpu_load_autotune_results_from = autotune_tmp_file
361
366
return _compile_and_write_cache (
362
367
backend ,
@@ -369,6 +374,7 @@ def _compile_and_write_autotune_config(
369
374
370
375
if distributed .global_state .process_id == 0 :
371
376
debug_options .xla_gpu_dump_autotune_results_to = autotune_tmp_file
377
+ logger .debug ("Compiling and dumping autotune for module: %s" , module_name )
372
378
executable = _compile_and_write_cache (
373
379
backend ,
374
380
computation ,
@@ -377,20 +383,47 @@ def _compile_and_write_autotune_config(
377
383
module_name ,
378
384
cache_key ,
379
385
)
386
+
387
+ logger .debug (
388
+ "Writing autotune config for module %s to %s" ,
389
+ module_name ,
390
+ autotune_tmp_file ,
391
+ )
380
392
with open (autotune_tmp_file , "rb" ) as f :
381
393
autotune_config = f .read ()
382
394
383
395
autotune_config = compilation_cache .compress_executable (autotune_config )
384
396
global_client .key_value_set_bytes (cache_key , autotune_config )
397
+ logger .debug (
398
+ "Autotune config for module %s with size %d shared by cache_key %s" ,
399
+ module_name ,
400
+ len (autotune_config ),
401
+ cache_key ,
402
+ )
385
403
else :
404
+ logger .debug (
405
+ "Compiling module %s, waiting for config to be shared by cache_key %s" ,
406
+ module_name ,
407
+ cache_key ,
408
+ )
386
409
autotune_config = global_client .blocking_key_value_get_bytes (
387
410
cache_key , share_timeout
388
411
)
389
412
413
+ logger .debug (
414
+ "Received autotune config for module %s of size %d" ,
415
+ module_name ,
416
+ len (autotune_config ),
417
+ )
390
418
autotune_config = compilation_cache .decompress_executable (autotune_config )
391
419
with open (autotune_tmp_file , "wb" ) as f :
392
420
f .write (autotune_config )
393
421
422
+ logger .debug (
423
+ "Compiling module %s, using autotune config from %s" ,
424
+ module_name ,
425
+ autotune_tmp_file ,
426
+ )
394
427
debug_options .xla_gpu_load_autotune_results_from = autotune_tmp_file
395
428
executable = _compile_and_write_cache (
396
429
backend ,
0 commit comments