-
Notifications
You must be signed in to change notification settings - Fork 623
[BAZEL] Update the Bazel overlay to use MODULE #4398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shantanu-gontia
wants to merge
8
commits into
llvm:main
Choose a base branch
from
shantanu-gontia:shantanu-gontia/bzlmod
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+237
−179
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
546d6fc
Remove WORKSPACE and add MODULE. Bump bazelversion to 8.4.0 similar t…
shantanu-gontia 774fbba
fix BUILD.bazel
shantanu-gontia 619f85c
Update bazel version in the Dockerfile
shantanu-gontia d3ed8a2
Update dockerfile for simplicity
shantanu-gontia e7be4d6
Format
shantanu-gontia 4a62b31
Uncomment use_default_substitutions to get FileCheck to work
shantanu-gontia 3c13923
Create a torch_lit_test macro based on the LLVM lit_test macro that w…
shantanu-gontia feddceb
newline
shantanu-gontia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 8.4.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| # This file is licensed under the Apache License v2.0 with LLVM Exceptions. | ||
| # See https://llvm.org/LICENSE.txt for license information. | ||
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| """ | ||
| Torch-MLIR Overlay | ||
| """ | ||
|
|
||
| module( | ||
| name = "torch-mlir-overlay", | ||
| ) | ||
|
|
||
| bazel_dep( | ||
| name = "bazel_skylib", | ||
| version = "1.8.2", | ||
| ) | ||
| bazel_dep( | ||
| name = "platforms", | ||
| version = "0.0.11", | ||
| ) | ||
| bazel_dep( | ||
| name = "rules_cc", | ||
| version = "0.2.14", | ||
| ) | ||
| bazel_dep( | ||
| name = "rules_python", | ||
| version = "1.7.0", | ||
| ) | ||
| bazel_dep( | ||
| name = "rules_shell", | ||
| version = "0.6.1", | ||
| ) | ||
|
|
||
| bazel_dep( | ||
| name = "buildifier_prebuilt", | ||
| version = "8.2.1", | ||
| dev_dependency = True, | ||
| ) | ||
|
|
||
| bazel_dep( | ||
| name = "apple_support", | ||
| version = "1.24.1", | ||
| repo_name = "build_bazel_apple_support", | ||
| ) | ||
|
|
||
| # LLVM | ||
| new_local_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:local.bzl", "new_local_repository") | ||
|
|
||
| new_local_repository( | ||
| name = "llvm-raw", | ||
| build_file_content = "# empty", | ||
| path = "../../externals/llvm-project", | ||
| ) | ||
|
|
||
| llvm_configure = use_repo_rule("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure") | ||
|
|
||
| llvm_configure( | ||
| name = "llvm-project", | ||
| targets = [ | ||
| "X86", | ||
| "AArch64", | ||
| # The bazel dependency graph for mlir-opt fails to load (at the analysis step) without the NVPTX | ||
| # target in this list, because mlir/test:TestGPU depends on the //llvm:NVPTXCodeGen target, | ||
| # which is not defined unless this is included. | ||
| "NVPTX", | ||
| ], | ||
| ) | ||
|
|
||
| http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
|
||
| http_archive( | ||
| name = "llvm_zstd", | ||
| build_file = "@llvm-raw//utils/bazel/third_party_build:zstd.BUILD", | ||
| sha256 = "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0", | ||
| strip_prefix = "zstd-1.5.2", | ||
| urls = [ | ||
| "https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz", | ||
| ], | ||
| ) | ||
|
|
||
| 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", | ||
| ], | ||
| ) | ||
|
|
||
| # StableHLO | ||
| local_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:local.bzl", "local_repository") | ||
|
|
||
| local_repository( | ||
| name = "stablehlo", | ||
| path = "../../externals/stablehlo/", | ||
| ) | ||
|
|
||
| # Torch-MLIR | ||
| new_local_repository( | ||
| name = "torch-mlir-raw", | ||
| build_file_content = "# empty", | ||
| path = "../..", | ||
| ) | ||
|
|
||
| torch_mlir_configure = use_repo_rule("@torch-mlir-raw//utils/bazel:configure.bzl", "torch_mlir_configure") | ||
|
|
||
| torch_mlir_configure( | ||
| name = "torch-mlir", | ||
| ) |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for
FileChecksubstitution using@LLVM_TOOLS_DIR@