From 2520168cc02a65aaf8ddffe25d581ea5cc7c94e8 Mon Sep 17 00:00:00 2001 From: Russel Arbore <russel.jma@gmail.com> Date: Sun, 16 Feb 2025 17:56:25 -0600 Subject: [PATCH] Rip out vectorizable --- hercules_ir/src/ir.rs | 3 --- hercules_opt/src/schedule.rs | 25 ------------------------- juno_scheduler/src/compile.rs | 1 - juno_scheduler/src/pm.rs | 1 - 4 files changed, 30 deletions(-) diff --git a/hercules_ir/src/ir.rs b/hercules_ir/src/ir.rs index e8dfc280..f96cc10c 100644 --- a/hercules_ir/src/ir.rs +++ b/hercules_ir/src/ir.rs @@ -323,9 +323,6 @@ pub enum Schedule { // backedge can be removed, and the reduce code can be merged into the // parallel code. ParallelReduce, - // This fork-join has no impeding control flow and the fork has a constant - // factor. - Vectorizable, // This reduce can be re-associated. This may lower a sequential dependency // chain into a reduction tree. MonoidReduce, diff --git a/hercules_opt/src/schedule.rs b/hercules_opt/src/schedule.rs index 7ecf07a4..53fc3b1b 100644 --- a/hercules_opt/src/schedule.rs +++ b/hercules_opt/src/schedule.rs @@ -120,31 +120,6 @@ pub fn infer_parallel_reduce( } } -/* - * Infer vectorizable fork-joins. Just check that there are no control nodes - * between a fork and its join and the factor is a constant. - */ -pub fn infer_vectorizable(editor: &mut FunctionEditor, fork_join_map: &HashMap<NodeID, NodeID>) { - for id in editor.node_ids() { - let func = editor.func(); - if !func.nodes[id.idx()].is_join() { - continue; - } - - let u = get_uses(&func.nodes[id.idx()]).as_ref()[0]; - if let Some(join) = fork_join_map.get(&u) - && *join == id - { - let factors = func.nodes[u.idx()].try_fork().unwrap().1; - if factors.len() == 1 - && evaluate_dynamic_constant(factors[0], &editor.get_dynamic_constants()).is_some() - { - editor.edit(|edit| edit.add_schedule(u, Schedule::Vectorizable)); - } - } - } -} - /* * Infer monoid reduction loops. Exactly one of the associative operation's * operands must be the Reduce node, and all other operands must not be in the diff --git a/juno_scheduler/src/compile.rs b/juno_scheduler/src/compile.rs index fc2a729e..c2194afe 100644 --- a/juno_scheduler/src/compile.rs +++ b/juno_scheduler/src/compile.rs @@ -160,7 +160,6 @@ impl FromStr for Appliable { "monoid" | "associative" => Ok(Appliable::Schedule(Schedule::MonoidReduce)), "parallel-fork" => Ok(Appliable::Schedule(Schedule::ParallelFork)), "parallel-reduce" => Ok(Appliable::Schedule(Schedule::ParallelReduce)), - "vectorize" => Ok(Appliable::Schedule(Schedule::Vectorizable)), "no-memset" | "no-reset" => Ok(Appliable::Schedule(Schedule::NoResetConstant)), "task-parallel" | "async-call" => Ok(Appliable::Schedule(Schedule::AsyncCall)), diff --git a/juno_scheduler/src/pm.rs b/juno_scheduler/src/pm.rs index 8db79b46..410e614c 100644 --- a/juno_scheduler/src/pm.rs +++ b/juno_scheduler/src/pm.rs @@ -2050,7 +2050,6 @@ fn run_pass( }; infer_parallel_reduce(&mut func, fork_join_map, reduce_cycles); infer_parallel_fork(&mut func, fork_join_map); - infer_vectorizable(&mut func, fork_join_map); infer_monoid_reduce(&mut func, reduce_cycles); infer_no_reset_constants(&mut func, no_reset_constants); changed |= func.modified(); -- GitLab