Skip to content

Commit 9ff1b0f

Browse files
committed
feat: enable new licm + loop unroll passes + inlining
1 parent 2a979f8 commit 9ff1b0f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ PythonCall = "0.9.25"
105105
Random = "1.10"
106106
Random123 = "1.7"
107107
ReactantCore = "0.1.16"
108-
Reactant_jll = "0.0.256"
108+
Reactant_jll = "0.0.257"
109109
ScopedValues = "1.3.0"
110110
Scratch = "1.2"
111111
Sockets = "1.10"

src/Compiler.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,7 @@ const AGGRESSIVE_SUM_TO_CONV = Ref(false)
693693
const AGGRESSIVE_PROPAGATION = Ref(false)
694694
const DUS_SLICE_SIMPLIFY = Ref(true)
695695
const CONCATS_TO_DUS = Ref(false)
696+
const WHILE_UNROLL_THRESHOLD = Ref(5)
696697

697698
# Optimization passes via transform dialect
698699
function optimization_passes(
@@ -912,6 +913,7 @@ function optimization_passes(
912913
"while_is_copy_simplify",
913914
"split_variadic_scatter_op",
914915
"dynamic_slice_simplify",
916+
"enzyme_hlo_unroll($(WHILE_UNROLL_THRESHOLD[]))",
915917
]
916918

917919
if !compile_options.disable_auto_batching_passes
@@ -955,6 +957,9 @@ function optimization_passes(
955957
"transpose_licm(0)",
956958
"broadcastindim_licm(0)",
957959
"reshape_licm(0)",
960+
"dot_general_licm(0)",
961+
"reduce_licm(0)",
962+
"reduce_window_licm(0)",
958963
],
959964
)
960965
end

0 commit comments

Comments
 (0)