Skip to content

Commit e801f01

Browse files
authored
feat: new passes (#1417)
1 parent 281862a commit e801f01

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
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.138"
4+
version = "0.2.139"
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.210"
93+
Reactant_jll = "0.0.212"
9494
ScopedValues = "1.3.0"
9595
Scratch = "1.2"
9696
Sockets = "1.10"

src/Compiler.jl

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,8 @@ function optimization_passes(
887887
"log_simplify",
888888
"neg_mul_const_simplify",
889889
"neg_div_const_simplify",
890+
"reshape_deletions_broadcast_in_dim_simplify",
891+
"reshape_insertions_broadcast_in_dim_simplify",
890892
]
891893

892894
if !compile_options.disable_scatter_gather_optimization_passes
@@ -1092,6 +1094,8 @@ function optimization_passes(
10921094
"transpose_batch_norm_inference",
10931095
"transpose_batch_norm_grad",
10941096
"transpose_if",
1097+
"transpose_fft",
1098+
"transpose_reshape",
10951099
],
10961100
)
10971101
if AGGRESSIVE_PROPAGATION[]
@@ -1128,10 +1132,23 @@ function optimization_passes(
11281132
if compile_options.no_nan
11291133
append!(
11301134
transform_passes_list,
1131-
["no_nan", "no_nan_self_sub_simplify", "no_nan_add_sub_simplify(1)"],
1135+
[
1136+
"no_nan",
1137+
"no_nan_self_sub_simplify",
1138+
"no_nan_add_sub_simplify(1)",
1139+
"no_nan_mul_simplify(1)",
1140+
"no_nan_div_simplify(1)",
1141+
],
11321142
)
11331143
else
1134-
push!(transform_passes_list, "no_nan_add_sub_simplify(0)")
1144+
append!(
1145+
transform_passes_list,
1146+
[
1147+
"no_nan_add_sub_simplify(0)",
1148+
"no_nan_mul_simplify(0)",
1149+
"no_nan_div_simplify(0)",
1150+
],
1151+
)
11351152
end
11361153

11371154
if compile_options.all_finite

0 commit comments

Comments
 (0)