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

sycl: the migrated Gemm::bf16 / gr_norm* definitions take #2091's new parameters (the shared headers changed; SYCL never uses the FP16 image)

Niko12212016b7fe015a
diff --git a/sycl/src/prefill/gemm.dp.cpp b/sycl/src/prefill/gemm.dp.cpp
index 7c173c216..5439886f8 100644
--- a/sycl/src/prefill/gemm.dp.cpp
+++ b/sycl/src/prefill/gemm.dp.cpp
@@ -743,8 +743,11 @@ inline bool staged_gemm(sycl::queue& q, void* handle, const uint16_t* W, int lda
}
} // namespace
+// (#2091, CUDA Turing only) no FP16 activation image on this backend
+bool Gemm::bf16_converts_x() const { return false; }
+
void Gemm::bf16(const uint16_t* X, const uint16_t* W, float* Y, int64_t T, int64_t N, int64_t K, int64_t ldy,
- float beta, int64_t ldx) {
+ float beta, int64_t ldx, bool /*x_f16*/) {
if (T <= 0 || N <= 0) return;
if (ldy <= 0) ldy = N;
if (ldx <= K) ldx = 0;
diff --git a/sycl/src/prefill/kernels.dp.cpp b/sycl/src/prefill/kernels.dp.cpp
index 7f1879574..aadec5b99 100644
--- a/sycl/src/prefill/kernels.dp.cpp
+++ b/sycl/src/prefill/kernels.dp.cpp
@@ -2278,7 +2278,7 @@ void to_bf16(const float* x, uint16_t* y, int64_t n, void* stream, uint16_t* ylo
}
void gr_norm(const float* R, const float* w_norm, float eps, float* xn, uint16_t* xn16, int64_t T, void* stream,
- uint16_t* xn16_lo) {
+ uint16_t* xn16_lo, bool /*f16img: the Turing FP16 image of xn16 (CUDA only)*/) {
{
auto exp_props = sycl::ext::oneapi::experimental::properties{
sycl::ext::oneapi::experimental::use_root_sync};
@@ -2297,7 +2297,7 @@ void gr_norm(const float* R, const float* w_norm, float eps, float* xn, uint16_t
check("gr_norm");
}
void gr_norm_rs(const float* R, const float* w_norm, float eps, float* rs, uint16_t* xn16, int64_t T, void* stream,
- uint16_t* xn16_lo, int64_t ldx) {
+ uint16_t* xn16_lo, int64_t ldx, bool /*f16img*/) {
{
auto exp_props = sycl::ext::oneapi::experimental::properties{
sycl::ext::oneapi::experimental::use_root_sync};
@@ -2360,7 +2360,8 @@ bool gr_upmix(const uint16_t* lo16, const uint16_t* w_up, const float* R, const
#endif
}
void gr_write_norm_rs(float* R, const float* bo, const float* inj, int64_t inj_ld, const float* w_norm_next, float eps,
- float* rs, uint16_t* xn16, int64_t T, void* stream, uint16_t* xn16_lo, int64_t ldx) {
+ float* rs, uint16_t* xn16, int64_t T, void* stream, uint16_t* xn16_lo, int64_t ldx,
+ bool /*f16img*/) {
{
auto exp_props = sycl::ext::oneapi::experimental::properties{
sycl::ext::oneapi::experimental::use_root_sync};
@@ -2387,7 +2388,7 @@ void gr_write_norm_rs(float* R, const float* bo, const float* inj, int64_t inj_l
}
void gr_write_cvec_norm_rs(float* R, const float* bo, const float* inj, int64_t inj_ld, const float* v_l,
const float* s_l, const int* on, int mode, const float* w_norm_next, float eps, float* rs,
- uint16_t* xn16, int64_t T, void* stream, uint16_t* xn16_lo, int64_t ldx) {
+ uint16_t* xn16, int64_t T, void* stream, uint16_t* xn16_lo, int64_t ldx, bool /*f16img*/) {
{
auto exp_props = sycl::ext::oneapi::experimental::properties{
sycl::ext::oneapi::experimental::use_root_sync};