Skip to content

Commit 2b0490a

Browse files
authored
Enable TensorIndexer for the legacy Python tests (#5822)
Following up with #5781
1 parent 99f41a7 commit 2b0490a

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

tests/python/conftest.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22
# All rights reserved.
33
# SPDX-License-Identifier: BSD-3-Clause
44

5+
import os
6+
7+
8+
def pytest_configure(config):
9+
"""
10+
Hook called after command line options have been parsed and all plugins
11+
and initial conftest files have been loaded.
12+
"""
13+
# Append to NVFUSER_ENABLE environment variable for all tests in this directory
14+
existing = os.environ.get("NVFUSER_ENABLE", "")
15+
new_options = "id_model,id_model_extra_validation"
16+
17+
if existing:
18+
os.environ["NVFUSER_ENABLE"] = f"{existing},{new_options}"
19+
else:
20+
os.environ["NVFUSER_ENABLE"] = new_options
21+
522

623
def pytest_make_parametrize_id(config, val, argname):
724
return f"{argname}={val}"

tests/python/utils/utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,6 @@ def exec_nvfuser(
322322
with FusionDefinition() as fd:
323323
fusion_func(fd)
324324
torch.manual_seed(0)
325-
if "id_model_extra_validation" not in _enable_options:
326-
_enable_options.append("id_model_extra_validation")
327325
out = fd.execute(
328326
inputs,
329327
device=device,

0 commit comments

Comments
 (0)