Skip to content

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++

gfx906 compat build: s26_tsum.cuh takes its AMD branch only on gfx10+ (permlanex16 / DPP), device_free_bytes skips the integrated-GPU attribute the compat layer lacks

Niko1221a751fbb12859
diff --git a/docs/AMD_HIP.md b/docs/AMD_HIP.md
index 35b062648..e08f5fbe5 100644
--- a/docs/AMD_HIP.md
+++ b/docs/AMD_HIP.md
@@ -6,7 +6,7 @@ RX 9070 / 9070 XT / Radeon AI PRO R9700 (RDNA4, gfx1201; see [RDNA4](#rdna4-gfx1
(gfx1101) and the RX 9060 XT (gfx1200) were validated by their owners (see [Community-validated
cards](#community-validated-cards)); the RX 6800 / 6900 series (RDNA2, gfx1030) builds and runs too, reported by a community machine and not yet validated by the maintainers (see [RDNA2](#rdna2-gfx1030)). Setup chooses it by itself on a PC with no NVIDIA card Strata can use (`--backend hip` on a PC with both); the
install steps for users are in [INSTALL.md](INSTALL.md#amd-cards). gfx906 (Instinct MI50 / MI60, Radeon VII; wave64) has a separate
-opt-in build, see [gfx906](#gfx906-instinct-mi50--mi60-radeon-vii-wave64-built-from-source). Other AMD architectures and mixed
+opt-in build, see [gfx906](#gfx906-instinct-mi50--mi60-radeon-vii-wave64-built-from-source). The Ryzen AI Max "Strix Halo" APU (gfx1151, RDNA3.5, unified memory) is built from source on Linux: see [STRIX_HALO.md](STRIX_HALO.md). Other AMD architectures and mixed
AMD/NVIDIA execution in one run are not supported.
The backend maps the CUDA-shaped runtime and BLAS calls to HIP/hipBLAS, uses
diff --git a/src/core/expert_cache.cpp b/src/core/expert_cache.cpp
index fed6c43a2..c64b5ac45 100644
--- a/src/core/expert_cache.cpp
+++ b/src/core/expert_cache.cpp
@@ -28,7 +28,7 @@ namespace strata::core {
size_t device_free_bytes() {
size_t free_b = 0, total_b = 0;
cudaMemGetInfo(&free_b, &total_b);
-#if defined(__linux__)
+#if defined(__linux__) && !defined(STRATA_HIP_GFX906) // (the gfx906 compat layer has no cudaDevAttrIntegrated; that GPU is discrete)
// per device: a box can mix an integrated GPU (an APU) with a discrete one, and the answer is the CURRENT device's
static std::atomic<int> uma_cache[64]; // 0 unknown, 1 integrated (unified memory), 2 discrete
bool unified_memory = false;
diff --git a/src/kernels/cuda/s26_tsum.cuh b/src/kernels/cuda/s26_tsum.cuh
index 575ec8e24..f484492bd 100644
--- a/src/kernels/cuda/s26_tsum.cuh
+++ b/src/kernels/cuda/s26_tsum.cuh
@@ -7,9 +7,11 @@
// DPP row_xmask / permlanex16 instead of ds_bpermute.
#pragma once
+#include <cuda_runtime.h> // (before the first use of __forceinline__ / __float_as_int: a gfx906 build gets them from its shim)
+
namespace strata::kernels::s26ts {
-#if defined(__HIP_PLATFORM_AMD__)
+#if defined(__HIP_PLATFORM_AMD__) && !defined(STRATA_HIP_GFX906) // (permlanex16 / DPP row_xmask: gfx10+ only)
__device__ __forceinline__ float xmov16(float v) {
return __int_as_float(__builtin_amdgcn_permlanex16(__float_as_int(v), __float_as_int(v), 0x76543210u, 0xfedcba98u,
false, false));