@@ -1554,7 +1554,11 @@ function compile_mlir!(
1554
1554
" remove-unnecessary-enzyme-ops" ,
1555
1555
" enzyme-simplify-math" ,
1556
1556
(
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
1558
1562
). .. ,
1559
1563
opt_passes2,
1560
1564
lower_enzymexla_linalg_pass,
@@ -1572,7 +1576,11 @@ function compile_mlir!(
1572
1576
" remove-unnecessary-enzyme-ops" ,
1573
1577
" enzyme-simplify-math" ,
1574
1578
(
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
1576
1584
). .. ,
1577
1585
opt_passes2,
1578
1586
kern,
@@ -1603,7 +1611,11 @@ function compile_mlir!(
1603
1611
" remove-unnecessary-enzyme-ops" ,
1604
1612
" enzyme-simplify-math" ,
1605
1613
(
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
1607
1619
). .. ,
1608
1620
opt_passes2,
1609
1621
]
@@ -1630,7 +1642,11 @@ function compile_mlir!(
1630
1642
" remove-unnecessary-enzyme-ops" ,
1631
1643
" enzyme-simplify-math" ,
1632
1644
(
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
1634
1650
). .. ,
1635
1651
opt_passes2,
1636
1652
]
@@ -1646,7 +1662,11 @@ function compile_mlir!(
1646
1662
" remove-unnecessary-enzyme-ops" ,
1647
1663
" enzyme-simplify-math" ,
1648
1664
(
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
1650
1670
). .. ,
1651
1671
opt_passes2,
1652
1672
kern,
@@ -1675,7 +1695,11 @@ function compile_mlir!(
1675
1695
" remove-unnecessary-enzyme-ops" ,
1676
1696
" enzyme-simplify-math" ,
1677
1697
(
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
1679
1703
). .. ,
1680
1704
opt_passes2,
1681
1705
kern,
@@ -1699,7 +1723,13 @@ function compile_mlir!(
1699
1723
" canonicalize" ,
1700
1724
" remove-unnecessary-enzyme-ops" ,
1701
1725
" 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
+ ). .. ,
1703
1733
opt_passes2,
1704
1734
],
1705
1735
' ,' ,
@@ -1737,7 +1767,11 @@ function compile_mlir!(
1737
1767
" remove-unnecessary-enzyme-ops" ,
1738
1768
" enzyme-simplify-math" ,
1739
1769
(
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
1741
1775
). .. ,
1742
1776
opt_passes2,
1743
1777
lower_enzymexla_linalg_pass,
@@ -1752,7 +1786,11 @@ function compile_mlir!(
1752
1786
" remove-unnecessary-enzyme-ops" ,
1753
1787
" enzyme-simplify-math" ,
1754
1788
(
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
1756
1794
). .. ,
1757
1795
opt_passes2,
1758
1796
kern,
0 commit comments