Skip to content

Commit

Permalink
[XPU] Use non_daemonic_proc by default on XPU device (#5412)
Browse files Browse the repository at this point in the history
Set non_daemonic_proc=True by default on XPU Device, using
non_daemonic_proc for unit test.

Co-authored-by: Logan Adams <[email protected]>
  • Loading branch information
ys950902 and loadams authored Apr 16, 2024
1 parent 8949105 commit 258e500
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/unit/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ def _launch_procs(self, num_procs):
f"Skipping test because not enough GPUs are available: {num_procs} required, {get_accelerator().device_count()} available"
)

if get_accelerator().device_name() == 'xpu':
self.non_daemonic_procs = True
self.reuse_dist_env = False

# Set start method to `forkserver` (or `fork`)
mp.set_start_method('forkserver', force=True)

Expand Down

0 comments on commit 258e500

Please sign in to comment.