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

metal: the half-precision and vector-type surface (cuda_fp16.h, vector_types.h, cuda_fp8.h)

Niko122118c6075562cf
diff --git a/metal/include/metal_compat/cuda_fp16.h b/metal/include/metal_compat/cuda_fp16.h
new file mode 100644
index 000000000..e69de29bb
diff --git a/metal/include/metal_compat/cuda_fp8.h b/metal/include/metal_compat/cuda_fp8.h
new file mode 100644
index 000000000..c0f63abb2
--- /dev/null
+++ b/metal/include/metal_compat/cuda_fp8.h
@@ -0,0 +1,4 @@
+// metal/include/metal_compat/cuda_fp8.h - the fp8 names the engine includes; the definitions live beside the bf16 ones.
+#pragma once
+
+#include "cuda_bf16.h"
diff --git a/metal/include/metal_compat/vector_types.h b/metal/include/metal_compat/vector_types.h
new file mode 100644
index 000000000..67724b5e1
--- /dev/null
+++ b/metal/include/metal_compat/vector_types.h
@@ -0,0 +1,15 @@
+// metal/include/metal_compat/vector_types.h - the CUDA vector types the dsv41 sources name, on Metal.
+//
+// The compat directory had none, so the first half-precision header to use float2 failed. Only the shapes the engine
+// touches are here (float2/float4/int2/uint2 and their make_ helpers); the Metal runtime's own float4 is not involved.
+#pragma once
+
+struct float2 { float x, y; };
+struct float4 { float x, y, z, w; };
+struct int2 { int x, y; };
+struct uint2 { unsigned x, y; };
+
+static inline float2 make_float2(float x, float y) { return float2{x, y}; }
+static inline float4 make_float4(float x, float y, float z, float w) { return float4{x, y, z, w}; }
+static inline int2 make_int2(int x, int y) { return int2{x, y}; }
+static inline uint2 make_uint2(unsigned x, unsigned y) { return uint2{x, y}; }