mirror of https://github.com/llvm/torch-mlir
[Bazel] Fix broken Bazel build (#2252)
Bazel GHA run: https://github.com/sjain-stanford/torch-mlir/actions/runs/5408580473pull/2274/head
parent
449cfb8375
commit
facce24ae3
|
@ -58,6 +58,18 @@ jobs:
|
|||
-t torch-mlir:ci \
|
||||
.
|
||||
|
||||
- name: Verify buildifier was run (bazel lint)
|
||||
run: |
|
||||
docker run --rm \
|
||||
-v "$(pwd)":"/opt/src/torch-mlir" \
|
||||
-v "${HOME}/.cache/bazel":"/root/.cache/bazel" \
|
||||
torch-mlir:ci \
|
||||
bazel run @torch-mlir//:buildifier
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "Please 'bazel run @torch-mlir//:buildifier' and commit changes."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Bazel build torch-mlir
|
||||
run: |
|
||||
docker run --rm \
|
||||
|
@ -74,18 +86,6 @@ jobs:
|
|||
torch-mlir:ci \
|
||||
bazel test @torch-mlir//test/...
|
||||
|
||||
- name: Verify buildifier was run (bazel lint)
|
||||
run: |
|
||||
docker run --rm \
|
||||
-v "$(pwd)":"/opt/src/torch-mlir" \
|
||||
-v "${HOME}/.cache/bazel":"/root/.cache/bazel" \
|
||||
torch-mlir:ci \
|
||||
bazel run @torch-mlir//:buildifier
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "Please 'bazel run @torch-mlir//:buildifier' and commit changes."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Switch back bazel cache directory to user ownership
|
||||
# to allow GHA post-cache step to save cache without
|
||||
# permissions issue.
|
||||
|
|
|
@ -24,7 +24,7 @@ new_local_repository(
|
|||
path = "../../externals/llvm-project",
|
||||
)
|
||||
|
||||
load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure", "llvm_disable_optional_support_deps")
|
||||
load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure")
|
||||
|
||||
llvm_configure(
|
||||
name = "llvm-project",
|
||||
|
@ -36,8 +36,6 @@ llvm_configure(
|
|||
],
|
||||
)
|
||||
|
||||
llvm_disable_optional_support_deps()
|
||||
|
||||
local_repository(
|
||||
name = "mlir-hlo",
|
||||
path = "../../externals/mlir-hlo/",
|
||||
|
@ -125,3 +123,14 @@ maybe(
|
|||
"https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "llvm_zlib",
|
||||
build_file = "@llvm-raw//utils/bazel/third_party_build:zlib-ng.BUILD",
|
||||
sha256 = "e36bb346c00472a1f9ff2a0a4643e590a254be6379da7cddd9daeb9a7f296731",
|
||||
strip_prefix = "zlib-ng-2.0.7",
|
||||
urls = [
|
||||
"https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.0.7.zip",
|
||||
],
|
||||
)
|
||||
|
|
|
@ -104,6 +104,7 @@ cc_library(
|
|||
deps = [
|
||||
":MLIRTorchOpsIncGen",
|
||||
":MLIRTorchTypesIncGen",
|
||||
"@llvm-project//mlir:CastInterfaces",
|
||||
"@llvm-project//mlir:ControlFlowInterfaces",
|
||||
"@llvm-project//mlir:IR",
|
||||
"@llvm-project//mlir:InferTypeOpInterface",
|
||||
|
@ -826,6 +827,7 @@ cc_binary(
|
|||
":TorchMLIRInitAll",
|
||||
":TorchMLIRTorchDialect",
|
||||
":TorchMLIRTorchPasses",
|
||||
"@llvm-project//mlir:AllExtensions",
|
||||
"@llvm-project//mlir:AllPassesAndDialects",
|
||||
"@llvm-project//mlir:MlirOptLib",
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue