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++
gfx1103 (Radeon 780M) joins the gfx11 WMMA kernels: decode x1.53, same answers
Niko122134458600ab87
diff --git a/cmake/hip_backend.cmake b/cmake/hip_backend.cmakeindex 34a3b9b61..fcd9ba142 100644--- a/cmake/hip_backend.cmake+++ b/cmake/hip_backend.cmake@@ -12,7 +12,7 @@ endif()# same wave32 / 64 KiB LDS / sudot4 family as gfx1100, on a unified-memory APU; experimental.set(_strata_hip_validated gfx1100 gfx1201)set(_strata_hip_community gfx1101 gfx1200)-set(_strata_hip_unvalidated gfx1010 gfx1011 gfx1012 gfx1102 gfx1103 gfx1030 gfx1031 gfx1034 gfx1150 gfx1151 gfx1152) # gfx1103: Radeon 780M iGPU, opt-in, portable kernels (no WMMA); gfx1152: Krackan, Radeon 860M / 840M (#1625), builds with the portable kernels, no card report yet+set(_strata_hip_unvalidated gfx1010 gfx1011 gfx1012 gfx1102 gfx1103 gfx1030 gfx1031 gfx1034 gfx1150 gfx1151 gfx1152) # gfx1103: Radeon 780M iGPU, opt-in, WMMA kernels like gfx1100; gfx1152: Krackan, Radeon 860M / 840M (#1625), builds with the portable kernels, no card report yet# CMake hands HIP a ';' list, but a -DCMAKE_HIP_ARCHITECTURES typed by hand (or ROCm's own Windows tooling) may use# spaces, which foreach(IN LISTS) would otherwise treat as one element.string(REPLACE " " ";" _strata_hip_norm "${CMAKE_HIP_ARCHITECTURES}")diff --git a/docs/STRIX_HALO.md b/docs/STRIX_HALO.mdindex 6365cac77..a28df535d 100644--- a/docs/STRIX_HALO.md+++ b/docs/STRIX_HALO.md@@ -16,7 +16,7 @@ What the engine does differently on this chip:the memory plan use) counts what Linux can give back (`MemAvailable` less 6 GiB for the system, `STRATA_UMA_HEADROOM_GIB`changes the 6) instead of only `MemFree`, per device, for any integrated GPU on Linux (this applies to a DGX Spark too).- **gfx11 matrix cores.** The prompt attention, the block scorer, the prompt GEMMs and the prompt experts have WMMA kernels for- gfx1100 / 1101 / 1102 / 1150 / 1151. A gfx11 part outside that list (gfx1103, gfx1152) is not given them: it takes the portable path.+ gfx1100 / 1101 / 1102 / 1103 / 1150 / 1151. A gfx11 part outside that list (gfx1152) is not given them: it takes the portable path.- **The hipBLASLt table** `tools/hip/gfx1151-hipblaslt-100401.txt` (ROCm 7.14.1's hipBLASLt 1.x `100401`), including the prompt shapesat `--prefill 16384` (T 16383 / 16384). Setup's own ROCm for gfx1151 (the 7.14.0a20260608 wheels, hipBLASLt 1.4.0) takes`tools/hip/gfx1151-hipblaslt-100400.txt`: the same shapes, calibrated against that library (docs/AMD_HIP.md, Tuning table).diff --git a/include/strata/hip_compat/intrinsics.hpp b/include/strata/hip_compat/intrinsics.hppindex 6ed99dfd6..a3d13c328 100644--- a/include/strata/hip_compat/intrinsics.hpp+++ b/include/strata/hip_compat/intrinsics.hpp@@ -16,7 +16,7 @@ __device__ __forceinline__ int signed_byte(uint32_t word, int lane) {// CUDA's signed __dp4a: four signed byte products accumulated modulo 2^32.__device__ __forceinline__ int dp4a(int a, int b, int c) {-#if (defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1150__) || \+#if (defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1103__) || defined(__gfx1150__) || \defined(__gfx1151__) || defined(__gfx1200__) || \defined(__gfx1201__)) && __has_builtin(__builtin_amdgcn_sudot4)// RDNA3 and RDNA4 expose the signed/unsigned dot4 form (v_dot4_i32_iu8). Markdiff --git a/include/strata/kernels/gfx_arch.hpp b/include/strata/kernels/gfx_arch.hppindex 56c8b2443..7e028c66f 100644--- a/include/strata/kernels/gfx_arch.hpp+++ b/include/strata/kernels/gfx_arch.hpp@@ -2,7 +2,7 @@// prompt-expert kernels) was built for.//// The WMMA kernels select their intrinsic with `#if defined(__gfx1100__) || ... || defined(__gfx1151__)`: a gfx11 part-// outside that list (gfx1103, gfx1152, ...) gets an empty or trapping body. The runtime gates therefore match the SAME+// outside that list (gfx1152, ...) gets an empty or trapping body. The runtime gates therefore match the SAME// list, not the "gfx11" prefix, so such a part falls back to hipBLASLt / the portable kernels instead of launching code// that is not there. Pure string matching (no HIP headers), usable from host code of any build.#pragma once@@ -21,7 +21,7 @@ inline bool gfx_arch_is(const char* gcn, const char* name) {/// The gfx11 targets the matrix-core kernels (prompt GEMM / attention / scorer / fused experts) are compiled for.inline bool gfx_arch_is_gfx11_wmma(const char* gcn) {- return gfx_arch_is(gcn, "gfx1100") || gfx_arch_is(gcn, "gfx1101") || gfx_arch_is(gcn, "gfx1102") ||+ return gfx_arch_is(gcn, "gfx1100") || gfx_arch_is(gcn, "gfx1101") || gfx_arch_is(gcn, "gfx1102") || gfx_arch_is(gcn, "gfx1103") ||gfx_arch_is(gcn, "gfx1150") || gfx_arch_is(gcn, "gfx1151");}diff --git a/src/kernels/cuda/qsa_prompt_attn.cu b/src/kernels/cuda/qsa_prompt_attn.cuindex 4a203c552..3a0a8e38a 100644--- a/src/kernels/cuda/qsa_prompt_attn.cu+++ b/src/kernels/cuda/qsa_prompt_attn.cu@@ -1139,7 +1139,7 @@ bool launch70(const float*, const QsaAttnPools&, const int32_t*, const int32_t*,#if defined(__gfx1200__) || defined(__gfx1201__)#define STRATA_PA_WMMA 1#define STRATA_PA_GFX11 0-#elif defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1150__) || \+#elif defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1103__) || defined(__gfx1150__) || \defined(__gfx1151__)#define STRATA_PA_WMMA 1#define STRATA_PA_GFX11 1diff --git a/src/kernels/cuda/qsa_select.cu b/src/kernels/cuda/qsa_select.cuindex 4820d208f..d880fc6e9 100644--- a/src/kernels/cuda/qsa_select.cu+++ b/src/kernels/cuda/qsa_select.cu@@ -298,7 +298,7 @@ __global__ void __launch_bounds__(128) block_scores_tc_kernel(const float* __res#if defined(__gfx1200__) || defined(__gfx1201__)#define STRATA_SEL_GFX12 1#define STRATA_SEL_GFX11 0-#elif defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1150__) || \+#elif defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1103__) || defined(__gfx1150__) || \defined(__gfx1151__)#define STRATA_SEL_GFX12 0#define STRATA_SEL_GFX11 1diff --git a/src/prefill/kernels.cu b/src/prefill/kernels.cuindex 18ec999aa..6e12086e8 100644--- a/src/prefill/kernels.cu+++ b/src/prefill/kernels.cu@@ -1732,7 +1732,7 @@ __global__ void to_bf16_kernel(const float* __restrict__ x, uint16_t* __restricttypedef __bf16 um_b16 __attribute__((ext_vector_type(16)));typedef float um_f8 __attribute__((ext_vector_type(8)));__device__ __forceinline__ um_f8 um_wmma(um_b16 a, um_b16 b, um_f8 c) {-#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1150__) || defined(__gfx1151__)+#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1103__) || defined(__gfx1150__) || defined(__gfx1151__)return __builtin_amdgcn_wmma_f32_16x16x16_bf16_w32(a, b, c);#else(void) a; (void) b; return c; // not a gfx11 device pass: never launched (runtime gate)diff --git a/src/prefill/moe_fused.cu b/src/prefill/moe_fused.cuindex 178c09ccd..7d47680c8 100644--- a/src/prefill/moe_fused.cu+++ b/src/prefill/moe_fused.cu@@ -371,7 +371,7 @@ expert_kernel(const Batch b, const Tables tb, const uint8_t* __restrict__ act, c// No LDS staging: a wave reads its weight rows (16 B per row and 64-weight block) and its tile rows' activation// blocks (80 B) straight from global memory (L2: an expert's rows are read by every tile, a token's by every weight// block), one block ahead in registers; the work item's weight scales go to LDS once.-#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1150__) || defined(__gfx1151__)+#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1103__) || defined(__gfx1150__) || defined(__gfx1151__)#define STRATA_FUSED_W11 1#else#define STRATA_FUSED_W11 0diff --git a/src/prefill/moe_fused_iq.cu b/src/prefill/moe_fused_iq.cuindex c28a0fb3e..ce2ca76f9 100644--- a/src/prefill/moe_fused_iq.cu+++ b/src/prefill/moe_fused_iq.cu@@ -662,7 +662,7 @@ native_kernel(const Batch b, const NativeGeom geo, const Tables tb, const uint8_// 8 hi .. 8 hi + 7 of them, so a 16-value k-step is still one WMMA (the K16 scales stay per WMMA). NW_DROW is the// D row of a lane's element i; on gfx12 a lane's 8 rows are consecutive, so a feature's gate (even local row) and up// (odd) sit in one lane (elements 2j, 2j + 1) and the SwiGLU needs no cross-lane exchange.-#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1150__) || defined(__gfx1151__)+#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1103__) || defined(__gfx1150__) || defined(__gfx1151__)#define STRATA_NAT_W11 1#else#define STRATA_NAT_W11 0diff --git a/src/prefill/wmma_gemm.cu b/src/prefill/wmma_gemm.cuindex 02452d967..11af8c89f 100644--- a/src/prefill/wmma_gemm.cu+++ b/src/prefill/wmma_gemm.cu@@ -39,7 +39,7 @@using v8fp32 = float __attribute__((ext_vector_type(8)));// Does the CURRENT device run the gfx11 WMMA kernels of this file? Exactly the targets whose intrinsics are selected-// below (gfx1100 / 1101 / 1102 / 1150 / 1151): a gfx11 part outside the list (gfx1103, gfx1152) has no device code+// below (gfx1100 / 1101 / 1102 / 1103 / 1150 / 1151): a gfx11 part outside the list (gfx1152) has no device code// here, so it takes the hipBLASLt / hipBLAS paths instead of running a kernel that is not there. Cached per device// (hipGetDeviceProperties is not cheap, and a mixed-GPU box has more than one answer).static bool strata_wmma_gfx11_device() {@@ -63,7 +63,7 @@ template <>struct WmmaTraits<_Float16> {using vec_t = _Float16 __attribute__((ext_vector_type(16)));__device__ static inline v8fp32 mma(vec_t a, vec_t b, v8fp32 c) {-#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1150__) || defined(__gfx1151__)+#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1103__) || defined(__gfx1150__) || defined(__gfx1151__)return __builtin_amdgcn_wmma_f32_16x16x16_f16_w32(a, b, c);#else(void) a; (void) b; (void) c;@@ -76,7 +76,7 @@ template <>struct WmmaTraits<__bf16> {using vec_t = __bf16 __attribute__((ext_vector_type(16)));__device__ static inline v8fp32 mma(vec_t a, vec_t b, v8fp32 c) {-#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1150__) || defined(__gfx1151__)+#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1103__) || defined(__gfx1150__) || defined(__gfx1151__)return __builtin_amdgcn_wmma_f32_16x16x16_bf16_w32(a, b, c);#else(void) a; (void) b; (void) c;@@ -321,7 +321,7 @@ template <int BN, int WN>__global__ void __launch_bounds__(256) kernel(const _Float16* __restrict__ X, const _Float16* __restrict__ W,float* __restrict__ Y, int M, int N, int K, int ldy, int accumulate,int ldx, int ldw) {-#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1150__) || defined(__gfx1151__)+#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1103__) || defined(__gfx1150__) || defined(__gfx1151__)constexpr int TN = WN / 16, NB = BN / 64;__shared__ __align__(16) _Float16 sA[2][BM][LDK];__shared__ __align__(16) _Float16 sB[2][BN][LDK];@@ -398,7 +398,7 @@ __global__ void __launch_bounds__(256) kernel(const _Float16* __restrict__ X, co__global__ void __launch_bounds__(256) kernel_bk64(const _Float16* __restrict__ X, const _Float16* __restrict__ W,float* __restrict__ Y, int M, int N, int K, int ldy, int accumulate,int ldx, int ldw) {-#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1150__) || defined(__gfx1151__)+#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1103__) || defined(__gfx1150__) || defined(__gfx1151__)constexpr int BN = 256, WN = 64, BK64 = 64, LDK64 = BK64 + 8;__shared__ __align__(16) _Float16 sA[BM][LDK64];__shared__ __align__(16) _Float16 sB[BN][LDK64];@@ -493,7 +493,7 @@ __global__ void __launch_bounds__(256) kernel_hcdown(const uint16_t* __restrict_const uint16_t* __restrict__ Wd, const uint16_t* __restrict__ Wi,int nd, int ni, float* __restrict__ lo, float* __restrict__ inj,int M, int K) {-#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1150__) || defined(__gfx1151__)+#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1103__) || defined(__gfx1150__) || defined(__gfx1151__)constexpr int BN = 128, WN = 32, TN = 2, BK64 = 64, LDK64 = BK64 + 8;__shared__ __align__(16) uint16_t sA[BM][LDK64];__shared__ __align__(16) uint16_t sB[BN][LDK64];@@ -586,7 +586,7 @@ __device__ __forceinline__ hb16 hx_frag(const uint16_t* p) {}__global__ void __launch_bounds__(HX_NT) kernel_hcd_exact(const uint16_t* __restrict__ X, int ldx,const uint16_t* __restrict__ W, float* __restrict__ Y, int M) {-#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1150__) || defined(__gfx1151__)+#if defined(__gfx1100__) || defined(__gfx1101__) || defined(__gfx1102__) || defined(__gfx1103__) || defined(__gfx1150__) || defined(__gfx1151__)constexpr int K = HX_K, BN = HX_BN, BMT = HX_BM, BK = HX_BK, NT = HX_NT;__shared__ __align__(16) uint16_t sA[BMT][HX_LDK];__shared__ __align__(16) uint16_t sB[BN][HX_LDK];