Skip to content

Commit 85d545c

Browse files
wsmosesgithub-actions[bot]giordano
authored
broadcast iota (#1178)
* broadcast iota * select comp iota to dus * fix * Update Compiler.jl * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix * add broadcast compare * add not compare * add broadcast iota * Update Reactant_jll to v0.0.142 * Update src/Compiler.jl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * more passes * fix --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mosè Giordano <[email protected]>
1 parent bcbaec0 commit 85d545c

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/CompileOptions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
rotate_to_pad_comm::Int = 1
66
wrap_comm::Int = 0
77
extend_comm::Int = 0
8-
dus_to_pad_manual_comp_comm::Int = 0
8+
dus_to_pad_manual_comp_comm::Int = 0 # 2
99
dus_to_pad_comm::Int = 1
1010
concat_two_operands_comm::Int = 0
1111
concat_to_pad_comm::Int = 1

src/Compiler.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,15 @@ function optimization_passes(;
683683
"concat_multipad",
684684
"concat_concat_to_dus",
685685
"speculate_if_pad_to_select",
686+
"broadcast_iota_simplify",
687+
"select_comp_iota_to_dus",
688+
"compare_cleanup",
689+
"broadcast_compare",
690+
"not_compare",
691+
"broadcast_iota",
692+
"cse_iota",
693+
"compare_iota_const_simplify",
694+
"reshuffle_ands_compares",
686695
# TODO we want to enable but may cause an infinite compile time
687696
# "concat_to_onedim_dusslice",
688697
]
@@ -1047,6 +1056,9 @@ function get_optimize_comms_passes(options::Reactant.OptimizeCommunicationOption
10471056
"enzyme-hlo-generate-td{patterns=lower_rotate;concat_to_onedim_dus;concat_to_onedim_dusslice;concatreshape_to_onedim_dus}",
10481057
"transform-interpreter",
10491058
"enzyme-hlo-remove-transform",
1059+
"enzyme-hlo-generate-td{patterns=reshape_to_broadcast}",
1060+
"transform-interpreter",
1061+
"enzyme-hlo-remove-transform",
10501062
options_str,
10511063
"enzyme-hlo-generate-td{patterns=lower_rotate;lower_wrap;lower_extend}",
10521064
"transform-interpreter",

0 commit comments

Comments
 (0)