@@ -1785,7 +1785,7 @@ function compile_mlir!(
1785
1785
],
1786
1786
' ,' ,
1787
1787
),
1788
- " only_enzyme " ,
1788
+ " no_enzyme " ,
1789
1789
)
1790
1790
elseif compile_options. optimization_passes === :only_enzyme
1791
1791
run_pass_pipeline! (
@@ -1801,7 +1801,7 @@ function compile_mlir!(
1801
1801
],
1802
1802
' ,' ,
1803
1803
),
1804
- " after_enzyme " ,
1804
+ " only_enzyme " ,
1805
1805
)
1806
1806
elseif compile_options. optimization_passes === :after_enzyme
1807
1807
run_pass_pipeline! (
@@ -1852,7 +1852,7 @@ function compile_mlir!(
1852
1852
end ,
1853
1853
' ,' ,
1854
1854
),
1855
- " before_enzyme " ,
1855
+ " after_enzyme " ,
1856
1856
)
1857
1857
elseif compile_options. optimization_passes === :before_enzyme
1858
1858
run_pass_pipeline! (
@@ -1887,7 +1887,7 @@ function compile_mlir!(
1887
1887
end ,
1888
1888
' ,' ,
1889
1889
),
1890
- " after_enzyme " ,
1890
+ " before_enzyme " ,
1891
1891
)
1892
1892
elseif compile_options. optimization_passes === :canonicalize
1893
1893
run_pass_pipeline! (mod, " mark-func-memory-effects,canonicalize" , " canonicalize" )
@@ -1897,23 +1897,23 @@ function compile_mlir!(
1897
1897
run_pass_pipeline! (mod, compile_options. optimization_passes, " custom_pass" )
1898
1898
end
1899
1899
1900
- if ! (compile_options. optimization_passes isa String)
1901
- if compile_options. optimization_passes ∉ (:none , :just_batch , :canonicalize ) && (
1900
+ if compile_options. optimization_passes isa Symbol &&
1901
+ compile_options. optimization_passes === :all &&
1902
+ (
1902
1903
compile_options. transpose_propagate === :up ||
1903
1904
compile_options. reshape_propagate === :up
1904
1905
)
1905
- # We tried propagating reshapes and transposes up. If at this point we are left
1906
- # with them, we propagate them down to minimize the number of Ops in the IR.
1907
- run_pass_pipeline! (
1908
- mod,
1909
- optimization_passes (
1910
- Reactant. __compile_options_with_reversed_propagation (compile_options);
1911
- recognize_comms,
1912
- lower_comms,
1913
- ),
1914
- " post_op_transpose_reshape" ,
1915
- )
1916
- end
1906
+ # We tried propagating reshapes and transposes up. If at this point we are left
1907
+ # with them, we propagate them down to minimize the number of Ops in the IR.
1908
+ run_pass_pipeline! (
1909
+ mod,
1910
+ optimization_passes (
1911
+ Reactant. __compile_options_with_reversed_propagation (compile_options);
1912
+ recognize_comms,
1913
+ lower_comms,
1914
+ ),
1915
+ " post_op_transpose_reshape" ,
1916
+ )
1917
1917
end
1918
1918
1919
1919
if backend == " cuda" && compile_options. cudnn_hlo_optimize
0 commit comments