Skip to content

Commit f26f1d1

Browse files
committed
fix: add handling for InductorSubproc thread in thread police function
1 parent af51fc8 commit f26f1d1

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

tests/tests_fabric/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def thread_police_duuu_daaa_duuu_daaa():
111111
sys.version_info >= (3, 9)
112112
and isinstance(thread, _ExecutorManagerThread)
113113
or "ThreadPoolExecutor-" in thread.name
114+
or thread.name == "InductorSubproc" # torch.compile
114115
):
115116
# probably `torch.compile`, can't narrow it down further
116117
continue

tests/tests_pytorch/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ def thread_police_duuu_daaa_duuu_daaa():
170170
sys.version_info >= (3, 9)
171171
and isinstance(thread, _ExecutorManagerThread)
172172
or "ThreadPoolExecutor-" in thread.name
173+
or thread.name == "InductorSubproc" # torch.compile
173174
):
174175
# probably `torch.compile`, can't narrow it down further
175176
continue

0 commit comments

Comments
 (0)