File tree 4 files changed +46
-21
lines changed
4 files changed +46
-21
lines changed Original file line number Diff line number Diff line change @@ -43,26 +43,32 @@ The best part about this tool is that while it does focus on visualizing GPU ope
43
43
## Getting Started
44
44
45
45
### Prerequisites
46
+
46
47
- Python installed (preferably the latest available version).
47
48
- [ Triton] ( https://github.com/openai/triton/blob/main/README.md ) installed. Follow the installation instructions in the linked repository.
48
49
49
50
Upon successfully installing Triton, install Torch using the following command:
51
+
50
52
``` sh
51
53
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121
52
54
```
53
55
54
56
Upon successful installation of Torch make sure to uninstall ` pytorch-triton ` using the following command:
57
+
55
58
``` sh
56
59
pip uninstall pytorch-triton
57
60
```
61
+
58
62
### Installation of Triton-Viz
63
+
59
64
Clone the repository to your local machine:
60
65
61
66
``` sh
62
67
git clone https://github.com/Deep-Learning-Profiling-Tools/triton-viz.git
63
68
cd triton-viz
64
69
pip install -e .
65
70
```
71
+
66
72
You're all set!
67
73
68
74
## Working with Examples
@@ -71,10 +77,13 @@ You're all set!
71
77
cd examples
72
78
python < file_name> .py
73
79
```
80
+
74
81
## More Puzzles
82
+
75
83
If you're interested in fun puzzles to work with in Triton, do check out: [ Triton Puzzles] ( https://github.com/srush/Triton-Puzzles )
76
84
77
85
## License
86
+
78
87
Triton-Viz is licensed under the MIT License. See the [ LICENSE] ( LICENSE ) for details.
79
88
80
89
## Publication
Original file line number Diff line number Diff line change 1
1
[tool .ruff ]
2
2
ignore = [" E731" ]
3
+
4
+ [build-system ]
5
+ requires = [" setuptools>=42" , " wheel" ]
6
+ build-backend = " setuptools.build_meta"
7
+
8
+ [project ]
9
+ name = " triton-viz"
10
+ version = " 1.1.1"
11
+ description = " A visualization tool for Triton"
12
+ authors = [
13
+ {
name =
" Deep Learning Profiling Tools Team" ,
email =
" [email protected] " }
14
+ ]
15
+ readme = " README.md"
16
+ license = {text = " MIT" }
17
+ requires-python = " >=3.7"
18
+ classifiers = [
19
+ " Programming Language :: Python :: 3" ,
20
+ " License :: OSI Approved :: MIT License" ,
21
+ " Operating System :: OS Independent" ,
22
+ ]
23
+ dependencies = [
24
+ " setuptools" ,
25
+ " triton" ,
26
+ " gradio" ,
27
+ " pyarrow" ,
28
+ " pre-commit" ,
29
+ " pytest" ,
30
+ " chalk-diagrams @ git+https://github.com/chalk-diagrams/chalk.git"
31
+ ]
32
+
33
+ [project .urls ]
34
+ homepage = " https://github.com/Deep-Learning-Profiling-Tools/triton-viz"
Original file line number Diff line number Diff line change 1
- from setuptools import setup , find_packages
1
+ # setup.py
2
+ from setuptools import setup
2
3
3
- setup (
4
- name = "triton-viz" ,
5
- version = "1.1.1" ,
6
- packages = find_packages (),
7
- description = "A visualization tool for Triton" ,
8
- author = "Deep Learning Profiling Tools Team" ,
9
-
10
- url = "https://github.com/Deep-Learning-Profiling-Tools/triton-viz" ,
11
- install_requires = [
12
- "setuptools" ,
13
- "triton" ,
14
- "gradio" ,
15
- "chalk-diagrams @ git+https://github.com/chalk-diagrams/chalk.git" ,
16
- "pyarrow" ,
17
- "pre-commit" ,
18
- "pytest" ,
19
- ],
20
- )
4
+ setup ()
Original file line number Diff line number Diff line change 17
17
from triton .runtime .interpreter import (
18
18
GridExecutor ,
19
19
_implicit_cvt ,
20
- RESERVED_KWS ,
21
20
interpreter_builder ,
22
21
InterpretedFunction ,
23
22
)
@@ -136,7 +135,8 @@ def _check_storage_contiguous(tensor):
136
135
137
136
def _grid_executor_call (self , * args_dev , ** kwargs ):
138
137
# Removes reserved keywords from kwargs
139
- kwargs = {k : v for k , v in kwargs .items () if k not in RESERVED_KWS }
138
+ argspec = inspect .getfullargspec (self .fn )
139
+ kwargs = {k : v for k , v in kwargs .items () if k in argspec .args }
140
140
if kwargs .pop ("warmup" , False ):
141
141
return
142
142
args_hst , kwargs_hst = self ._init_args_hst (args_dev , kwargs )
You can’t perform that action at this time.
0 commit comments