Skip to content

Commit 6eda790

Browse files
pifon2atensorflower-gardener
authored andcommitted
[XLA:GPU] Document ptx-opt usage.
PiperOrigin-RevId: 837532758
1 parent 049affc commit 6eda790

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

third_party/xla/docs/tools.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,3 +291,17 @@ hlo-opt --emit-proto input.hlo
291291
```
292292
hlo-opt input.pbtxt or input.pb
293293
```
294+
295+
## [`ptx-opt`] Compiler LLVM Module down to PTX
296+
297+
The tool will run LLVMIR optimization pipeline and then call CompileToPtx.
298+
299+
```
300+
bazel run //xla/hlo/tools/ptx-opt -- --arch=9.0 <filename>
301+
```
302+
303+
The tool can also dump LLVMIR after every path.
304+
305+
```
306+
bazel run //xla/hlo/tools/ptx-opt -- --arch=9.0 --xla_dump_to=<path> --xla_gpu_dump_llvmir <filename>
307+
```

0 commit comments

Comments
 (0)