AISpot

llama.cpp:ggml SCALE 支援非連續檢視

llama.cpp releases版本更新地端推論開源

llama.cpp 新建置 b11923 放寬了 ggml SCALE 運算元的輸入要求:此前 src0 必須一維連續,現在只需 dim-0 連續、允許任意行步長,與 Metal 後端一元運算元的行為一致。CPU(f32、bf16 按位元組步長定址行)、CUDA(步長感知核心,用 fastdiv 做行分解)與 Metal(新增 bf16 scale)均已適配,SYCL 仍限定連續輸入。test_scale 增加了 view 變體測試,已在 CPU、Metal、CUDA 上驗證;

原標題:b11923
閱讀原文

評分45 / 42(平均 43,門檻 60)
狀態未入選

原文

ggml : relax scale to non-contiguous views ( #31146 ) ggml : relax scale to non-contiguous views SCALE requires src0 to be 1D-contiguous. Relax this to dim-0 contiguity with arbitrary row strides (ggml_is_contiguous_rows), same as the unary ops in the Metal backend. ggml: relax the assert in ggml_scale_impl cpu: address src0 rows through their byte strides (f32, bf16) cuda: stride-aware kernel, fastdiv row decomposition metal: support bf16 scale (guarded unary instantiations) sycl: keep the gate at contiguous, the kernel is flat f32 Add view variants to test_scale. Verified on CPU, Metal and CUDA. Assisted-by: dsh:llama.cpp/ggml-org/Qwen3.8-Flash-Next-GGUF (RTX 5090 32GB, DDR5 128GB) cuda : skip the softcap fusion on non-contiguous views The fused softcap kernel reads src and writes dst as dense arrays, so a view reaching SCALE -> TANH -> SCALE now that SCALE accepts non-contiguous rows would be read wrongly. Keep such graphs on the strided kernels until the fusion becomes stride aware. Co-authored-by: Pascal [email protected] Website: https://llama.app Attestations: https://github.com/ggml-org/llama.cpp/attestations/60288171 macOS/iOS: macOS Apple Silicon (arm64) macOS Apple Silicon (arm64, KleidiAI enabled) DISABLED macOS Intel (x64) iOS XCFramework Linux: Ubuntu x64 (CPU) Ubuntu arm64 (CPU) Ubuntu s390x (CPU) Ubuntu x64 (Vulkan) Ubuntu arm64 (Vulkan) Ubuntu x64 (CUDA 12) - CUDA 12.8 libraries Ubuntu x64 (CUDA 13) - CUDA 13.4 libraries Ubuntu arm64 (CUDA 13) - CUDA 13.4 libraries Ubuntu x64 (ROCm 10.0) Ubuntu x64 (OpenVINO) Ubuntu x64 (SYCL FP32) Ubuntu x64 (SYCL FP16) Linux arm64 (Snapdragon: CPU, Adreno GPU, Hexagon NPU) - setup guide Android: Android arm64 (CPU) Android arm64 (Snapdragon: CPU, Adreno GPU, Hexagon NPU) - setup guide Windows: Windows x64 (CPU) Windows arm64 (CPU) Windows arm64 (OpenCL Adreno) Windows x64 (CUDA 12) - CUDA 12.4 DLLs Windows x64 (CUDA 13) - CUDA 13.4 DLLs Windows arm64 (CUDA 13) - CUDA 13.4 DLLs Windows x64 (Vulkan) Windows arm64 (Vulkan) Windows x64 (OpenVINO) Windows x64 (SYCL) Windows x64 (ROCm 10.0) openEuler: DISABLED openEuler x86 (310p) openEuler x86 (910b, ACL Graph) openEuler aarch64 (310p) openEuler aarch64 (910b, ACL Graph) UI: UI

相關報導

llama.cpp releasesAI 評分46

llama.cpp 修復 ggml CLAMP 非連續檢視定址錯誤

ggml 修復了 CLAMP 運算元在非連續檢視上的定址錯誤,涉及 CPU 與 CUDA 後端。CUDA 此前按 ggml_nelements 做平坦處理、忽略檢視 stride,CPU 則把第 j 行按 j*nb01 定址、忽略 nb02/nb03;現在兩者都改為遵循 dims 1..3 的 stride,且 CUDA 的 supports_op 要求行連續,與 Metal 一致。

llama.cpp releasesAI 評分41

llama.cpp b11499 發布,CUDA 的 ROLL 運算支援非連續張量

llama.cpp 發布 b11499 建置,CUDA 後端改用位元組步長實現 roll,使 ROLL 運算可以作用於非連續張量(#29547)。該版本照例提供各平台預編譯產物:macOS Apple Silicon 與 Intel、iOS XCFramework,以及 Linux、Windows、Android 的 CPU、Vulkan、CUDA 12/CUDA 13、ROCm 10.0、OpenVINO、SYCL 建置,其中 CUDA 12 與 13 分別打包 12.8、1…