From 0afba54b4c13ce547dc48dd8302e2ba46b0dca85 Mon Sep 17 00:00:00 2001 From: JeanP00l <181703563+JeanP00l@users.noreply.github.com> Date: Sat, 3 Oct 2026 22:30:14 +0300 Subject: [PATCH] fused_gr: the gfx906 fast norm/up launches only in the gfx906 build (CUDA and RDNA did not compile) --- src/kernels/cuda/fused_gr.cu | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/kernels/cuda/fused_gr.cu b/src/kernels/cuda/fused_gr.cu index 0531aa0a..41c048cd 100644 --- a/src/kernels/cuda/fused_gr.cu +++ b/src/kernels/cuda/fused_gr.cu @@ -776,12 +776,13 @@ void launch_multi(const GrMulti& m, int variant, cudaStream_t st, unsigned long // gfx906: the latency-hidden norm/up (STRATA_GR_FAST=0: off) - the same sums in the same order as the kernels // they replace (gr_parity checks the multi-token read against single-token calls bitwise) const bool fast = gr_fast(); -#else - const bool fast = false; -#endif if (variant >= kHcSplit) gr_norm_split_kernel<<>>(m); else if (fast) gr_norm_fast_kernel<<>>(m); else gr_norm_multi_kernel<<>>(m); +#else + if (variant >= kHcSplit) gr_norm_split_kernel<<>>(m); + else gr_norm_multi_kernel<<>>(m); +#endif if (stamp_buf) gpu_stamp(stamp_buf, stamp_i0, (void*) st); const bool staged = variant >= kHcStaged; int tv = 2560; @@ -815,8 +816,11 @@ void launch_multi(const GrMulti& m, int variant, cudaStream_t st, unsigned long } } if (stamp_buf) gpu_stamp(stamp_buf, stamp_i0 + 1, (void*) st); +#if defined(STRATA_HIP_GFX906) if (fast) gr_up_fast_kernel<<>>(m); - else gr_up_multi_kernel<<>>(m); + else +#endif + gr_up_multi_kernel<<>>(m); } /// STRATA_HC_SPLIT: unset or 2 = the newest the check accepts (staged), 1 = at most split, 0 = the plain read