Skip to content

Commit e8f1900

Browse files
committed
enable CI with TRITON_INTERPRET=1; format trace.py using pre-commit
1 parent 31062fd commit e8f1900

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

.github/workflows/python-app.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ name: Python application
55

66
on:
77
push:
8-
branches-ignore:
9-
- '**'
8+
branches:
9+
- main
10+
- keren/v2.0
1011
pull_request:
11-
branches-ignore:
12-
- '**'
12+
branches:
13+
- main
14+
- keren/v2.0
1315

1416
permissions:
1517
contents: read
@@ -54,6 +56,8 @@ jobs:
5456
pip install -e .
5557
5658
- name: Test with pytest
59+
env: |
60+
TRITON_INTERPRET=1
5761
run: |
5862
cd triton_viz
5963
python -m pytest tests

triton_viz/core/trace.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ def add_client(self, new_client: Union[Client, str]) -> None:
3434
new_client_instance = self._normalize_client(new_client)
3535
self.client_manager.add_clients([new_client_instance])
3636

37-
def __init__(self, kernel: Union[JITFunction, InterpretedFunction], client: Union[str, Client]) -> None:
37+
def __init__(
38+
self,
39+
kernel: Union[JITFunction, InterpretedFunction],
40+
client: Union[str, Client],
41+
) -> None:
3842
self.fn = kernel
3943
if isinstance(kernel, InterpretedFunction):
4044
self.interpreter_fn = kernel
@@ -91,7 +95,9 @@ def decorator(kernel) -> Trace:
9195
trace.add_client(clients)
9296
return trace
9397

94-
raise TypeError(f"Expected JITFunction, InterpretedFunction or Trace, got {type(kernel)}")
98+
raise TypeError(
99+
f"Expected JITFunction, InterpretedFunction or Trace, got {type(kernel)}"
100+
)
95101

96102
return decorator
97103

0 commit comments

Comments
 (0)