Skip to content

Commit bccfbd7

Browse files
Pangorawmofeing
authored andcommitted
update make-dialects to regenerate libMLIR_h.jl
1 parent 6a550d0 commit bccfbd7

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

.github/workflows/regenerate-dialects.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
run: |
2323
import Pkg
2424
Pkg.add("JuliaFormatter")
25-
- run: julia make-dialects.jl
25+
- run: julia make-bindings.jl
2626
working-directory: ./deps/ReactantExtra
2727
- run: chmod -R u+rw ./src/mlir/Dialects/
2828
- name: Format code
Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
for file in [
2-
"Builtin.jl",
3-
"Arith.jl",
4-
"Affine.jl",
5-
"Func.jl",
6-
"Enzyme.jl",
7-
"StableHLO.jl",
8-
"CHLO.jl",
9-
"VHLO.jl",
10-
]
1+
function build_file(output_path)
2+
file = basename(output_path)
113
run(
124
Cmd(
135
`bazel build --action_env=JULIA=$(Base.julia_cmd().exec[1]) --repo_env HERMETIC_PYTHON_VERSION="3.10" --check_visibility=false --verbose_failures //:$file`;
@@ -16,7 +8,24 @@ for file in [
168
)
179
Base.Filesystem.cp(
1810
joinpath(@__DIR__, "bazel-bin", file),
19-
joinpath(dirname(dirname(@__DIR__)), "src", "mlir", "Dialects", file);
11+
output_path;
2012
force=true,
2113
)
2214
end
15+
16+
src_dir = joinpath(dirname(dirname(@__DIR__)), "src")
17+
18+
for file in [
19+
"Builtin.jl",
20+
"Arith.jl",
21+
"Affine.jl",
22+
"Func.jl",
23+
"Enzyme.jl",
24+
"StableHLO.jl",
25+
"CHLO.jl",
26+
"VHLO.jl",
27+
]
28+
build_file(joinpath(src_dir, "mlir", "Dialects", file))
29+
end
30+
31+
build_file(joinpath(src_dir, "mlir", "libMLIR_h.jl"))

0 commit comments

Comments
 (0)