Skip to content

Commit a2d3d11

Browse files
Updates various guides
- Updates `RELEASE.md` to mention things to be careful of when creating a new release. - Updates `debugging.md` to be more concise.
1 parent b04d420 commit a2d3d11

File tree

3 files changed

+33
-20
lines changed

3 files changed

+33
-20
lines changed

tripy/RELEASE.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,21 @@ This document explains how to release a new version of Tripy.
55
1. Update version numbers in [`pyproject.toml`](./pyproject.toml) and
66
[`__init__.py`](./tripy/__init__.py) (make sure they match!).
77

8+
Often, updates to Tripy will also require updates to dependencies,
9+
like MLIR-TRT, so make sure to update those version numbers as well.
10+
811
2. Add a new entry to [`packages.html`](./docs/packages.html).
912
This ensures that we will be able to `pip install` Tripy.
1013

1114
3. If there were any other functional changes since the most recent
1215
L1, make sure to run L1 testing locally.
1316

14-
4. Create a PR with the above two changes.
17+
4. Create a PR with the above changes.
18+
19+
5. Once the PR created in (4) is merged, **WAIT FOR THE POST-MERGE PIPELINES TO COMPLETE**.
20+
This is a very important step as otherwise the release pipeline could fail.
1521

16-
5. Once the PR created in (4) is merged, create a new tag with:
22+
Once the post-merge pipelines have succeeded, create a new tag with:
1723
```bash
1824
git tag tripy-vX.Y.Z
1925
```

tripy/docs/post0_developer_guides/architecture.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
This document explains the overall architecture of Tripy.
44

55

6-
76
## Overview
87

98
The main technical requirement of Tripy is twofold:
Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,37 @@
1-
# Debugging MLIR-TensorRT backend
1+
# Debugging MLIR-TensorRT
22

3-
1. Install new python bindings for compiler and runtime. Assuming `tripy/mlir-tensorrt` directory exists. No need to update `LD_LIBRARY_PATH`.
3+
While developing Tripy features, you may need to debug MLIR-TRT code.
4+
This guide outlines some methods of doing so.
45

5-
<!-- Tripy: DOC: NO_EVAL Start -->
6-
```bash
7-
python3 -m pip install --force-reinstall mlir-tensorrt/build/wheels/trt100/**/*.whl
8-
```
9-
<!-- Tripy: DOC: NO_EVAL End -->
106

11-
2. Set environment flags for debugging:
7+
## Environment Variables
8+
9+
We include some environment variables to enable extra debugging information from MLIR-TRT:
10+
11+
- `export TRIPY_MLIR_DEBUG_ENABLED=1` will enable debug prints in MLIR-TRT and dump all intermediate IRs to a directory.
12+
- `export TRIPY_MLIR_DEBUG_PATH=<mlir-debug-path>` sets the directory for IR dumps. The default path is `mlir-dumps`.
13+
- `export TRIPY_TRT_DEBUG_ENABLED=1` will dump TensorRT engines and their layer information.
14+
- `export TRIPY_TRT_DEBUG_PATH=<trt-debug-path>` sets the directory for TensorRT dumps. Default path is `tensorrt-dumps`.
1215

13-
- `export TRIPY_MLIR_DEBUG_ENABLED=1` to enable MLIR-TRT debugging. It will enable debugging prints in MLIR-TRT as well as dump all intermediate IRs after each pass.
14-
- `export TRIPY_MLIR_DEBUG_PATH=<mlir-debug-path>` to set debug path for MLIR-TRT dumps. Default path is `mlir-dumps` under the repo directory. This will create one or more folders named like `module_ins_t1_outs_t2_1`.
15-
- `export TRIPY_TRT_DEBUG_ENABLED=1` to enable TensorRT debugging. It will dump TensorRT engines and their layer information (if there are any TensorRT built during compilation).
16-
- `export TRIPY_TRT_DEBUG_PATH=<trt-debug-path>` to set debug path for TensorRT dumps. Default path is `tensorrt-dumps` under the repo directory.
1716

17+
## Using A Debugger
1818

19-
3. Use LLDB for debugging MLIR-TensorRT backend.
20-
In order to use `lldb` in tripy container, launch the container with extra security options:
19+
For more involved bugs, it may be helpful to step into MLIR-TRT code.
20+
To do so, you will need a debug build of MLIR-TRT;
21+
see [CONTRIBUTING.md](source:/CONTRIBUTING.md)
22+
for details on using custom builds of MLIR-TRT.
23+
24+
Once you've installed the debug build in the container, you should be able to use `gdb` as normal.
25+
26+
Alternatively, you can use [LLDB](https://lldb.llvm.org/) if you launch the container with extra security options:
2127

2228
<!-- Tripy: DOC: NO_EVAL Start -->
2329
```bash
2430
docker run --gpus all --cap-add=SYS_PTRACE \
25-
--security-opt seccomp=unconfined --security-opt apparmor=unconfined \
26-
-p 8080:8080 -v $(pwd):/tripy/ -it --rm tripy:latest
31+
--security-opt seccomp=unconfined --security-opt apparmor=unconfined \
32+
-p 8080:8080 -v $(pwd):/tripy/ -it --rm tripy:latest
2733
```
2834
<!-- Tripy: DOC: NO_EVAL End -->
29-
See https://forums.swift.org/t/debugging-using-lldb/18046 for more details.
35+
36+
See [this post](https://forums.swift.org/t/debugging-using-lldb/18046) for details on
37+
why these security options are required.

0 commit comments

Comments
 (0)