Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.
C++
sycl: read doorbell flags with an uncached L1+L3 hint
joeyjoe02557c2b67c1cc
diff --git a/sycl/include/strata/sycl_doorbell.hpp b/sycl/include/strata/sycl_doorbell.hppindex d801c54e0..0690c7345 100644--- a/sycl/include/strata/sycl_doorbell.hpp+++ b/sycl/include/strata/sycl_doorbell.hpp@@ -8,14 +8,32 @@// goes through these two.#pragma once#include <sycl/sycl.hpp>+#include <sycl/ext/intel/experimental/cache_control_properties.hpp>#include <cstdint>namespace strata {using sys_atomic_u32 = sycl::atomic_ref<uint32_t, sycl::memory_order::relaxed, sycl::memory_scope::system>;+// A system-scope atomic load of host USM is still served from the GPU's cache on an Arc Pro B60 (NEO 26.31,+// oneAPI 2026.1.1): a device spin never sees the host's store and runs to kSpinMax every time (bounded host/GPU+// ping-pong: 263 ms per round trip, 168 of 200 waits hit the bound). An explicit uncached L1+L3 read hint goes to+// memory every time: 2.4 us per round trip, 0 of 200. The acquire fence keeps the compiler from hoisting the load+// out of a spin loop. -DSTRATA_DOORBELL_ATOMIC_LOAD restores the atomic load.+#ifndef STRATA_DOORBELL_ATOMIC_LOAD+using doorbell_uncached_read = decltype(sycl::ext::oneapi::experimental::properties(+ sycl::ext::intel::experimental::read_hint<sycl::ext::intel::experimental::cache_control<+ sycl::ext::intel::experimental::cache_mode::uncached,+ sycl::ext::oneapi::experimental::cache_level::L1, sycl::ext::oneapi::experimental::cache_level::L3>>));+inline uint32_t sys_load(const volatile uint32_t* p) {+ sycl::atomic_fence(sycl::memory_order::acquire, sycl::memory_scope::system);+ sycl::ext::oneapi::experimental::annotated_ptr<uint32_t, doorbell_uncached_read> u(const_cast<uint32_t*>(p));+ return u[0];+}+#elseinline uint32_t sys_load(const volatile uint32_t* p) {return sys_atomic_u32(*const_cast<uint32_t*>(p)).load();}+#endifinline void sys_store(volatile uint32_t* p, uint32_t v) {sys_atomic_u32(*const_cast<uint32_t*>(p)).store(v);sycl::atomic_fence(sycl::memory_order::release, sycl::memory_scope::system);