Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tests/unittest/_torch/misc/test_autotuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,8 @@ def _distributed_worker_function(world_size, strategy):
runner = DistributedGemmRunner(prefer_tactics=prefer_tactics)
config = TuningConfig(distributed_tuning_strategy=strategy)

# Keep temp_dir in function scope to prevent premature garbage collection
temp_dir = None
if rank == 0:
temp_dir = tempfile.TemporaryDirectory()
# rank 0 should broadcast the cache path to all ranks
Expand Down Expand Up @@ -782,6 +784,7 @@ def _distributed_worker_function(world_size, strategy):
else:
assert False, f"Unknown strategy: {strategy}"

dist.barrier()
return True


Expand Down
Loading