Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions tests/integration/defs/agg_unit_mem_df.csv
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ unittest/trt/model/test_mamba.py,NVIDIA H100,10,
unittest/_torch/attention,NVIDIA Graphics Device,4,B200 Bring Up Board
unittest/_torch/misc,NVIDIA Graphics Device,4,B200 Bring Up Board
unittest/_torch/speculative,NVIDIA Graphics Device,4,B200 Bring Up Board
unittest/_torch/thop/parallel,NVIDIA Graphics Device,4,B200 Bring Up Board
unittest/_torch/thop/parallel,NVIDIA Graphics Device,16,B200 Bring Up Board
"unittest/_torch/auto_deploy/unit/singlegpu -k ""not test_trtllm_bench_backend_comparison""",NVIDIA Graphics Device,4,B200 Bring Up Board
unittest/_torch/attention,NVIDIA B200,4,
unittest/_torch/misc,NVIDIA B200,4,
unittest/_torch/speculative,NVIDIA B200,4,
unittest/_torch/thop/parallel,NVIDIA B200,4,
unittest/_torch/thop/parallel,NVIDIA B200,16,
"unittest/_torch/auto_deploy/unit/singlegpu -k ""not test_trtllm_bench_backend_comparison""",NVIDIA B200,4,
unittest/_torch/attention,NVIDIA H100,4,
unittest/_torch/misc,NVIDIA H100,4,
unittest/_torch/speculative,NVIDIA H100,2,
unittest/_torch/thop/parallel,NVIDIA H100,4,
unittest/_torch/thop/parallel,NVIDIA H100,16,
28 changes: 28 additions & 0 deletions tests/unittest/_torch/thop/parallel/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import os

import pytest


@pytest.fixture(autouse=True, scope='function')
def set_torchinductor_compile_threads():
"""
Fixture to set TORCHINDUCTOR_COMPILE_THREADS=1 for tests in this directory.
"""
# --- Setup Phase ---
# Save the original value if it exists
original_value = os.environ.get('TORCHINDUCTOR_COMPILE_THREADS')

# Set the desired value for the test
os.environ['TORCHINDUCTOR_COMPILE_THREADS'] = '1'

# Let the test run with the new environment variable
yield

# --- Teardown Phase ---
# Restore the original environment state after the test is done
if original_value is None:
# If the variable didn't exist before, remove it
del os.environ['TORCHINDUCTOR_COMPILE_THREADS']
else:
# Otherwise, restore its original value
os.environ['TORCHINDUCTOR_COMPILE_THREADS'] = original_value
1 change: 1 addition & 0 deletions tests/unittest/pytest.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[pytest]
xdist_start_method = spawn
asyncio_default_fixture_loop_scope = module
threadleak = True
threadleak_exclude = asyncio_\d+
Expand Down