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
Dockerize and Cache Bazel {Local, CI} Builds (#1240)
This PR adds:
- A minimal docker wrapper to the bazel GHA workflow to make it reproducible locally
- Bazel cache to speed up GHA workflows (down to ~5 minutes from ~40+minutes)
This is a no-op for non-bazel workflows and an incremental improvement.
Copy file name to clipboardExpand all lines: development.md
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -175,14 +175,15 @@ manually `source`'d in a shell.
175
175
176
176
Torch-MLIR can also be built using Bazel (apart from the official CMake build) for users that depend on Bazel in their workflows. To build `torch-mlir-opt` using Bazel, follow these steps:
177
177
178
-
1. Install [Bazel](https://docs.bazel.build/versions/main/install.html) if you don't already have it
179
-
2. Install a relatively new release of [Clang](https://releases.llvm.org/download.html)
180
-
3. Build:
178
+
1. Launch an interactive docker container with the required deps installed:
181
179
```shell
182
-
cd utils/bazel
183
-
bazel build @torch-mlir//...
180
+
./utils/bazel/docker/run_docker.sh
184
181
```
185
-
4. Find the built binary at `bazel-bin/external/torch-mlir/torch-mlir-opt`.
182
+
2. Build torch-mlir using bazel (from container):
183
+
```shell
184
+
./utils/bazel/docker/run_bazel_build.sh
185
+
```
186
+
3. Find the built binary at `utils/bazel/bazel-bin/external/torch-mlir/torch-mlir-opt`.
0 commit comments