From ee693557fa436d8fe1729d2aaeb5db30ff1cae36 Mon Sep 17 00:00:00 2001 From: Russel Arbore <russel.jma@gmail.com> Date: Tue, 18 Feb 2025 14:59:07 -0600 Subject: [PATCH] warp add reduction works --- juno_samples/cava/src/cava.jn | 2 +- juno_samples/cava/src/gpu.sch | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/juno_samples/cava/src/cava.jn b/juno_samples/cava/src/cava.jn index 0c74646c..dbe799f9 100644 --- a/juno_samples/cava/src/cava.jn +++ b/juno_samples/cava/src/cava.jn @@ -152,7 +152,7 @@ fn gamut<row : usize, col : usize, num_ctrl_pts : usize>( let v = v1 * v1 + v2 * v2 + v3 * v3; l2_dist[cp] = sqrt!::<f32>(v); } - + @channel_loop for chan = 0 to CHAN { let chan_val : f32 = 0.0; for cp = 0 to num_ctrl_pts { diff --git a/juno_samples/cava/src/gpu.sch b/juno_samples/cava/src/gpu.sch index 460e4338..619adcd3 100644 --- a/juno_samples/cava/src/gpu.sch +++ b/juno_samples/cava/src/gpu.sch @@ -117,6 +117,9 @@ fixpoint { simpl!(fuse4); array-slf(fuse4); simpl!(fuse4); +fork-tile[2, 0, false, true](fuse4@channel_loop); +fork-split(fuse4@channel_loop); +clean-monoid-reduces(fuse4); no-memset(fuse5@res1); no-memset(fuse5@res2); -- GitLab