Skip to content

Commit 76d3188

Browse files
committed
remove GPU dependencies in unittests
1 parent 8c560de commit 76d3188

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

tests/test_config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import pytest
1+
import pytest, os
2+
os.environ["TRITON_SANITIZER_BACKEND"] = "off"
23
import triton_viz.core.config as cfg
34

45

tests/test_print_traceback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def kernel_A(ptr, n):
2727

2828

2929
def test_print_nested_functions():
30-
x = torch.arange(4, device="cuda", dtype=torch.float32)
30+
x = torch.arange(4, dtype=torch.float32)
3131
print("Input:", x)
3232

3333
# We'll launch a grid bigger than x.numel() to force a out-of-bounds error

tests/test_wrapper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def _decorator(fn):
5959
env = os.environ.copy()
6060
env["PYTHONPATH"] = str(tmp_path) + os.pathsep + env.get("PYTHONPATH", "")
6161
env["TRITON_SANITIZER_BACKEND"] = "symexec"
62+
env["TRITON_INTERPRET"] = "1"
6263

6364
# run the dummy program using triton-sanitizer
6465
cmd = ["triton-sanitizer", str(tmp_path / "dummy_program.py")]

0 commit comments

Comments
 (0)