mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
[inductor] Enable subprocess-based parallel compile as the default (#126817)
Differential Revision: [D58239826](https://our.internmc.facebook.com/intern/diff/D58239826) Pull Request resolved: https://github.com/pytorch/pytorch/pull/126817 Approved by: https://github.com/eellison ghstack dependencies: #128037, #128086
This commit is contained in:
parent
ac51f782fe
commit
852b7b4c99
1 changed files with 3 additions and 1 deletions
|
|
@ -387,7 +387,9 @@ developer_warnings = is_fbcode() or is_nightly_or_source
|
|||
# The multiprocessing start method to use for inductor workers in the codecache.
|
||||
# "subprocess", "fork", or "spawn"
|
||||
def decide_worker_start_method():
|
||||
start_method = os.environ.get("TORCHINDUCTOR_WORKER_START", "fork")
|
||||
start_method = os.environ.get(
|
||||
"TORCHINDUCTOR_WORKER_START", "fork" if is_fbcode() else "subprocess"
|
||||
)
|
||||
assert start_method in [
|
||||
"subprocess",
|
||||
"fork",
|
||||
|
|
|
|||
Loading…
Reference in a new issue