libxe2: gdn recurrent update issues its state loads before the local stores -- 234 -> 166 us a call

The state pointer is generic, so IGC ordered every load behind the preceding local store and the
128 loads of a row block each paid a full memory round trip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
This commit is contained in:
claudeandClaude Opus 5.5 committed 2026-10-25 11:13:28 +01:00
1 parent b5eef7e1ab
commit 5010e1d083
1 file changed
+6 -1
+6 -1
View File
@@ -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];