Skip to content

Commit c806a3d

Browse files
authored
feat: new passes (#1415)
1 parent 23a8d1a commit c806a3d

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
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.137"
4+
version = "0.2.138"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
@@ -90,7 +90,7 @@ PythonCall = "0.9"
9090
Random = "1.10"
9191
Random123 = "1.7"
9292
ReactantCore = "0.1.15"
93-
Reactant_jll = "0.0.209"
93+
Reactant_jll = "0.0.210"
9494
ScopedValues = "1.3.0"
9595
Scratch = "1.2"
9696
Sockets = "1.10"

src/Compiler.jl

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,12 @@ function optimization_passes(
881881
"split_convolution_into_reverse_convolution",
882882
# TODO we want to enable but may cause an infinite compile time
883883
# "concat_to_onedim_dusslice",
884+
# TODO expose an option to enable this
885+
# "chained_multiply_to_power",
886+
"power_multiply_to_power",
887+
"log_simplify",
888+
"neg_mul_const_simplify",
889+
"neg_div_const_simplify",
884890
]
885891

886892
if !compile_options.disable_scatter_gather_optimization_passes
@@ -1129,7 +1135,15 @@ function optimization_passes(
11291135
end
11301136

11311137
if compile_options.all_finite
1132-
push!(transform_passes_list, "all_finite")
1138+
append!(
1139+
transform_passes_list,
1140+
[
1141+
"all_finite_is_finite",
1142+
"all_finite_is_inf",
1143+
"all_finite_is_pos_inf",
1144+
"all_finite_is_neg_inf",
1145+
],
1146+
)
11331147
end
11341148

11351149
lower_transform_passes = copy(transform_passes_list)

0 commit comments

Comments
 (0)