Commit Graph

7 Commits (99115dcdc8cff8ce07bd027a12b001ddd7e957f3)

Author SHA1 Message Date
Sambhav Jain 401869e31d
[Bazel] Use bazel 6 to support dict select union (#3100)
Bazel builds broke with the recent LLVM bump due to union select of
dictionaries:
```bazel
    substitutions = {
        "#cmakedefine01 MLIR_DEPRECATED_GPU_SERIALIZATION_ENABLE": "#define MLIR_DEPRECATED_GPU_SERIALIZATION_ENABLE 0",
        "#cmakedefine01 MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS": "#define MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS 0",
        "#cmakedefine MLIR_GREEDY_REWRITE_RANDOMIZER_SEED ${MLIR_GREEDY_REWRITE_RANDOMIZER_SEED}": "/* #undef MLIR_GREEDY_REWRITE_RANDOMIZER_SEED */",
        "#cmakedefine01 MLIR_ENABLE_NVPTXCOMPILER": "#define MLIR_ENABLE_NVPTXCOMPILER 0",
        "#cmakedefine01 MLIR_ENABLE_PDL_IN_PATTERNMATCH": "#define MLIR_ENABLE_PDL_IN_PATTERNMATCH 1",
        "#cmakedefine01 MLIR_ENABLE_ROCM_CONVERSIONS": "#define MLIR_ENABLE_ROCM_CONVERSIONS 0",
    } | if_cuda_available(
        {"#cmakedefine01 MLIR_ENABLE_CUDA_CONVERSIONS": "#define MLIR_ENABLE_CUDA_CONVERSIONS 1"},
        {"#cmakedefine01 MLIR_ENABLE_CUDA_CONVERSIONS": "#define MLIR_ENABLE_CUDA_CONVERSIONS 0"},
    ),
```
```
Analyzing: target @torch-mlir//:torch-mlir-opt (1 packages loaded, 0 targets configured)
ERROR: Traceback (most recent call last):
	File "/root/.cache/bazel/_bazel_root/b89349c08f7224396763d[14](https://github.com/llvm/torch-mlir/actions/runs/8515127977/job/23322023669#step:8:15)fe35cba11/external/llvm-project/mlir/BUILD.bazel", line 41, column 7, in <toplevel>
		} | if_cuda_available(
Error: unsupported binary operation: dict | select
```

Bazel 6 supports dict select union
ebae4860db
after starlark added support for union over dictionaries. This PR bumps
bazel to 6.4, and adds a missing dep.

torch-mlir's bazel build:
https://github.com/sjain-stanford/torch-mlir/actions/runs/8530438588/job/23368225180
2024-04-02 15:51:01 -07:00
Ahmed S. Taei 3bed35c0ee
[Bazel] Fix clang version, missing mhlo deps and add reqs files (#1898)
* Fix clang version, missing mhlo deps and add reqs files
2023-02-24 15:07:34 -08:00
Ashay Rane a897c49803
CI: miscellaneous fixes for Release builds (#1781)
- Use v3 of actions/checkout, since the version we use (v2) uses
   Node.js 12, which is deprecated by GitHub.

 - Source the PowerShell venv sctipt (instead of the bash sript) since
   the calling script is a PowerShell script.  Without this, the build
   doesn't use venv at all.

 - Make the build dependencies in whl-requirements.txt (used by
   setup.py) match those in requirements.txt.  To that end, this patch
   creates a build-requirements.txt that is referenced by
   requirements.txt and whl-requirements.txt.
2023-01-06 20:41:43 -06:00
Sambhav Jain b320f7fb77
Simplify Bazel build workflow (#1587)
Remove `run_bazel_build.sh`, simplify docker's entrypoint to start container at `utils/bazel` directory, update docs.
2022-11-15 08:34:43 -08:00
Sambhav Jain dcff5a7150
[Bazel] Update to Ubuntu-22.04 and clang-16 for Bazel build docker (#1523)
* Update Ubuntu and clang in the docker container
* Specifically build just `@torch-mlir//:torch-mlir-opt`


Triggered GHA run:
https://github.com/sjain-stanford/torch-mlir/actions/runs/3317006870/jobs/5479411204
2022-11-10 13:11:06 -08:00
Sambhav Jain 0765449684
[Bazel] Make pytorch-requirements.txt available within the docker container (#1439)
Updates the bazel Dockerfile to match changes from https://github.com/llvm/torch-mlir/pull/1419. This should get the bazel build back to green.

Also triggered bazel build on GHA here: https://github.com/sjain-stanford/torch-mlir/actions/runs/3154741943. Let's wait for it to complete before landing this.
2022-09-29 16:30:31 -07:00
Sambhav Jain 9c8b962720
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.
2022-08-17 12:46:17 -07:00