From def62de5780956cb8f816f1faac8c487d4d1ebb8 Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 4 Feb 2026 09:57:29 +0000 Subject: [PATCH] Fix heavy tests to use available primitives --- test_heavy_fused.sexp | 18 ++++++------------ test_heavy_interpreted.sexp | 11 +++++------ 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/test_heavy_fused.sexp b/test_heavy_fused.sexp index 498b855..d421cfb 100644 --- a/test_heavy_fused.sexp +++ b/test_heavy_fused.sexp @@ -13,10 +13,9 @@ (require-primitives "image") (require-primitives "math") - ;; Define heavy effects pipeline (5 effects fused into one kernel) + ;; Define heavy effects pipeline (4 effects fused into one kernel) (def heavy-pipeline [{:op "rotate" :angle 0} - {:op "zoom" :amount 1.0} {:op "hue_shift" :degrees 30} {:op "ripple" :amplitude 15 :frequency 10 :decay 2 :phase 0 :center_x 960 :center_y 540} {:op "brightness" :factor 1.0}]) @@ -31,15 +30,10 @@ base (image:make-image 1920 1080 color) ;; Dynamic parameters - angle1 (* t 30) - angle2 (* t -20) - zoom1 (+ 1.0 (* 0.1 (math:sin (* t 0.5)))) - zoom2 (+ 1.0 (* 0.05 (math:cos (* t 0.7)))) - phase1 (* t 2) - phase2 (* t 3)] + angle (* t 30) + phase (* t 2)] - ;; 10 effects in ONE kernel call! + ;; 4 effects in ONE kernel call! (streaming_gpu:fused-pipeline base heavy-pipeline - :rotate_angle angle1 - :zoom_amount zoom1 - :ripple_phase phase1)))) + :rotate_angle angle + :ripple_phase phase)))) diff --git a/test_heavy_interpreted.sexp b/test_heavy_interpreted.sexp index 0060c07..72c7965 100644 --- a/test_heavy_interpreted.sexp +++ b/test_heavy_interpreted.sexp @@ -29,11 +29,10 @@ zoom (+ 1.0 (* 0.1 (math:sin (* t 0.5)))) phase (* t 2) - ;; Apply 5 effects one by one (INTERPRETED - many kernel launches) + ;; Apply 4 effects one by one (INTERPRETED - many kernel launches) step1 (geometry_gpu:rotate base angle) - step2 (streaming_gpu:gpu-zoom step1 zoom) - step3 (color_ops:hue-shift step2 30) - step4 (geometry_gpu:ripple step3 15 :frequency 10 :decay 2 :time phase) - step5 (color_ops:brightness step4 1.0)] + step2 (color_ops:hue-shift step1 30) + step3 (geometry_gpu:ripple step2 15 :frequency 10 :decay 2 :time phase) + step4 (color_ops:brightness step3 1.0)] - step5))) + step4)))