diff --git a/libxe2/xe2_gdn.cpp b/libxe2/xe2_gdn.cpp index 1e0376e1..2919c097 100644 --- a/libxe2/xe2_gdn.cpp +++ b/libxe2/xe2_gdn.cpp @@ -1628,10 +1628,15 @@ int launch_recurrent_reg_t(sycl::queue& qu, const RecIO& r, int64_t n_seq, float float st[K]; auto load_rows = [&](int64_t slot) { if constexpr (COAL) { + /* every load issued before the first local store: the state pointer is + * generic, so a load after a local store waits for it, and interleaved + * the 128 loads ran one memory latency each */ const float* base = (const float*)sp + at4(r.stv, slot, h, e0, 0); + float ld[kCb * K / kSub]; + for (int i = 0; i < kCb * K / kSub; ++i) ld[i] = base[i * kSub + l]; for (int i = 0; i < kCb * K / kSub; ++i) { const int idx = i * kSub + l; - tr[(idx / K) * (K + 1) + idx % K] = base[idx]; + tr[(idx / K) * (K + 1) + idx % K] = ld[i]; } sycl::group_barrier(sg); for (int d = 0; d < K; ++d) st[d] = tr[l * (K + 1) + d];