Skip to content

Commit 1d3a166

Browse files
wsmosesgiordano
andauthored
More optimizaation passes (pending jll) (#1138)
* More optimizaation passes (pending jll) * [Compiler] Add global option `SUM_TO_CONV` * Update Reactant_jll and bumb version --------- Co-authored-by: Mosè Giordano <[email protected]> Co-authored-by: Mosè Giordano <[email protected]>
1 parent e1135dc commit 1d3a166

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Reactant"
22
uuid = "3c362404-f566-11ee-1572-e11a4b42c853"
33
authors = ["William Moses <[email protected]>", "Valentin Churavy <[email protected]>", "Sergio Sánchez Ramírez <[email protected]>", "Paul Berg <[email protected]>", "Avik Pal <[email protected]>", "Mosè Giordano <[email protected]>"]
4-
version = "0.2.64"
4+
version = "0.2.66"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
@@ -87,7 +87,7 @@ PythonCall = "0.9"
8787
Random = "1.10"
8888
Random123 = "1.7"
8989
ReactantCore = "0.1.9"
90-
Reactant_jll = "0.0.123"
90+
Reactant_jll = "0.0.125"
9191
ScopedValues = "1.3.0"
9292
Scratch = "1.2"
9393
Sockets = "1.10"

src/Compiler.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ end
459459

460460
const WHILE_CONCAT = Ref(false)
461461
const DUS_TO_CONCAT = Ref(false)
462+
const SUM_TO_CONV = Ref(false)
462463

463464
# Optimization passes via transform dialect
464465
function optimization_passes(;
@@ -654,8 +655,19 @@ function optimization_passes(;
654655
"elementwise_licm(0)",
655656
"concatenate_licm(0)",
656657
"slice_broadcast",
658+
"while_pad_induction_reduction",
659+
"while_licm<1>(1)",
660+
"associative_common_mul_op_reordering",
661+
"slice_select_to_select_slice",
662+
"pad_concat_to_concat_pad",
663+
"slice_if",
664+
"dus_to_i32",
657665
]
658666

667+
if SUM_TO_CONV[]
668+
push!(transform_passes_list, "sum_to_conv")
669+
end
670+
659671
if WHILE_CONCAT[]
660672
push!(transform_passes_list, "while_concat")
661673
end

0 commit comments

Comments
 (0)