Skip to content

Commit 1b57120

Browse files
committed
fix: call
1 parent 2e2d18f commit 1b57120

File tree

1 file changed

+47
-9
lines changed

1 file changed

+47
-9
lines changed

src/Compiler.jl

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,11 @@ function compile_mlir!(
15541554
"remove-unnecessary-enzyme-ops",
15551555
"enzyme-simplify-math",
15561556
(
1557-
legalize_chlo_to_stablehlo ? ["chlo-legalize-to-stablehlo"] : []
1557+
if legalize_chlo_to_stablehlo
1558+
["func.func(chlo-legalize-to-stablehlo)"]
1559+
else
1560+
[]
1561+
end
15581562
)...,
15591563
opt_passes2,
15601564
lower_enzymexla_linalg_pass,
@@ -1572,7 +1576,11 @@ function compile_mlir!(
15721576
"remove-unnecessary-enzyme-ops",
15731577
"enzyme-simplify-math",
15741578
(
1575-
legalize_chlo_to_stablehlo ? ["chlo-legalize-to-stablehlo"] : []
1579+
if legalize_chlo_to_stablehlo
1580+
["func.func(chlo-legalize-to-stablehlo)"]
1581+
else
1582+
[]
1583+
end
15761584
)...,
15771585
opt_passes2,
15781586
kern,
@@ -1603,7 +1611,11 @@ function compile_mlir!(
16031611
"remove-unnecessary-enzyme-ops",
16041612
"enzyme-simplify-math",
16051613
(
1606-
legalize_chlo_to_stablehlo ? ["chlo-legalize-to-stablehlo"] : []
1614+
if legalize_chlo_to_stablehlo
1615+
["func.func(chlo-legalize-to-stablehlo)"]
1616+
else
1617+
[]
1618+
end
16071619
)...,
16081620
opt_passes2,
16091621
]
@@ -1630,7 +1642,11 @@ function compile_mlir!(
16301642
"remove-unnecessary-enzyme-ops",
16311643
"enzyme-simplify-math",
16321644
(
1633-
legalize_chlo_to_stablehlo ? ["chlo-legalize-to-stablehlo"] : []
1645+
if legalize_chlo_to_stablehlo
1646+
["func.func(chlo-legalize-to-stablehlo)"]
1647+
else
1648+
[]
1649+
end
16341650
)...,
16351651
opt_passes2,
16361652
]
@@ -1646,7 +1662,11 @@ function compile_mlir!(
16461662
"remove-unnecessary-enzyme-ops",
16471663
"enzyme-simplify-math",
16481664
(
1649-
legalize_chlo_to_stablehlo ? ["chlo-legalize-to-stablehlo"] : []
1665+
if legalize_chlo_to_stablehlo
1666+
["func.func(chlo-legalize-to-stablehlo)"]
1667+
else
1668+
[]
1669+
end
16501670
)...,
16511671
opt_passes2,
16521672
kern,
@@ -1675,7 +1695,11 @@ function compile_mlir!(
16751695
"remove-unnecessary-enzyme-ops",
16761696
"enzyme-simplify-math",
16771697
(
1678-
legalize_chlo_to_stablehlo ? ["chlo-legalize-to-stablehlo"] : []
1698+
if legalize_chlo_to_stablehlo
1699+
["func.func(chlo-legalize-to-stablehlo)"]
1700+
else
1701+
[]
1702+
end
16791703
)...,
16801704
opt_passes2,
16811705
kern,
@@ -1699,7 +1723,13 @@ function compile_mlir!(
16991723
"canonicalize",
17001724
"remove-unnecessary-enzyme-ops",
17011725
"enzyme-simplify-math",
1702-
(legalize_chlo_to_stablehlo ? ["chlo-legalize-to-stablehlo"] : [])...,
1726+
(
1727+
if legalize_chlo_to_stablehlo
1728+
["func.func(chlo-legalize-to-stablehlo)"]
1729+
else
1730+
[]
1731+
end
1732+
)...,
17031733
opt_passes2,
17041734
],
17051735
',',
@@ -1737,7 +1767,11 @@ function compile_mlir!(
17371767
"remove-unnecessary-enzyme-ops",
17381768
"enzyme-simplify-math",
17391769
(
1740-
legalize_chlo_to_stablehlo ? ["chlo-legalize-to-stablehlo"] : []
1770+
if legalize_chlo_to_stablehlo
1771+
["func.func(chlo-legalize-to-stablehlo)"]
1772+
else
1773+
[]
1774+
end
17411775
)...,
17421776
opt_passes2,
17431777
lower_enzymexla_linalg_pass,
@@ -1752,7 +1786,11 @@ function compile_mlir!(
17521786
"remove-unnecessary-enzyme-ops",
17531787
"enzyme-simplify-math",
17541788
(
1755-
legalize_chlo_to_stablehlo ? ["chlo-legalize-to-stablehlo"] : []
1789+
if legalize_chlo_to_stablehlo
1790+
["func.func(chlo-legalize-to-stablehlo)"]
1791+
else
1792+
[]
1793+
end
17561794
)...,
17571795
opt_passes2,
17581796
kern,

0 commit comments

Comments
 (0)