You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: third_party/proton/README.md
+10-1
Original file line number
Diff line number
Diff line change
@@ -141,14 +141,17 @@ By default, proton profiles are in the *json* format and can be read by *Hatchet
141
141
pip install llnl-hatchet
142
142
proton-viewer -m time/s <profile.hatchet>
143
143
```
144
+
144
145
NOTE: `pip install hatchet` does not work because the API is slightly different.
145
146
146
147
### Visualizing sorted profile data
148
+
147
149
In addition visualizing the profile data on terminal through Hatchet. A sorted list of the kernels by the first metric can be done using the --print-sorted flag with proton-viewer
prints the sorted kernels by the time/ns since it is the first listed.
153
156
154
157
More options can be found by running the following command.
@@ -157,21 +160,27 @@ More options can be found by running the following command.
157
160
proton-viewer -h
158
161
```
159
162
160
-
### Advanced features
163
+
## Advanced features
164
+
165
+
### Instrumentation (experimental)
166
+
161
167
In addition to profiling, Proton also incorporates MLIR/LLVM based compiler instrumentation passes to get Triton level analysis
162
168
and optimization information. This feature is under active development and the list of available passes is expected to grow.
163
169
164
170
#### Available passes
171
+
165
172
print-mem-spaces: this pass prints the load and store address spaces (e.g. global, flat, shared) chosen by the compiler and attributes back to Triton source information.
166
173
167
174
Example usage with the Proton matmul tutorial:
175
+
168
176
```bash
169
177
$ proton --instrument=print-mem-spaces matmul.py
170
178
0 matmul_kernel matmul.py:180:20 SHARED STORE
171
179
1 matmul_kernel matmul.py:181:20 SHARED STORE
172
180
2 matmul_kernel matmul.py:180:20 SHARED LOAD
173
181
3 matmul_kernel matmul.py:181:20 SHARED LOAD
174
182
```
183
+
175
184
Notes: The instrument functionality is currently only available from the command line. Additionally the instrument and profile command line arguments can not be use simulantously.
0 commit comments