AISpot

llama.cpp 修復 CUDA argsort 的 CCCL 版本判斷錯誤,避免靜默效能回退

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

llama.cpp 修復了 CUDA 後端 argsort 的 CCCL 版本判斷錯誤:舊寫法分別比較主、次版本號,在 CCCL 4.x 上被判定為假,STRIDED_ITERATOR_AVAILABLE 不再定義,argsort 靜默退回 init_offsets 路徑,只損失效能且不報錯、不警告。補丁改用 CCCL 自帶的打包整數 CCCL_VERSION(3.4.3 記作 3004003),只需一次比較。

原標題:b11509
閱讀原文

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

原文

CUDA: fix CCCL version guard breaking on major version rollover ( #29453 ) CUDA: fix CCCL version guard breaking on major version rollover The guard compared the major and minor components independently: CCCL_MAJOR_VERSION >= 3 && CCCL_MINOR_VERSION >= 1 Minor resets to 0 whenever a new major series is cut, so on CCCL 4.x this evaluates as 4 >= 3 && 0 >= 1, i.e. false. STRIDED_ITERATOR_AVAILABLE stops being defined and argsort silently falls back to the init_offsets path. Nothing warns and the build still succeeds, so the regression is a quiet performance loss rather than a compile error. CCCL already exposes the version as a single packed integer in MMMmmmpp form, which is what its own version header uses: CCCL_VERSION = MAJOR * 1000000 + MINOR * 1000 + PATCH so 3.4.3 is 3004003 and ">= 3.1" is a plain ">= 3001000". One comparison, with no component arithmetic left to get wrong. Checked against a hand-written "version >= 3.1" reference over 2.9.9, 3.0.0, 3.1.0, 3.1.99, 3.2.0, 3.4.3, 3.9.9, 3.99.99, 4.0.0, 4.2.7 and 5.0.0: no divergences. The old guard disagreed at 4.0.0 and 5.0.0. Verified on RTX 4070 (sm_89), CUDA 13.4, CCCL 3.4.3: cmake --build build --config Release: exit 0 test-backend-ops test -o ARGSORT -b CUDA0: 98/98 passed, CUDA0 OK Note that a passing regression test does not on its own prove the guard is still taken, since the fallback path passes too. Preprocessing the real translation unit confirms the strided-iterator branch is the one compiled in: counting_iterator is present, init_offsets is not. Signed-off-by: Heitor [email protected] Update ggml/src/ggml-cuda/argsort.cu Apply suggestion from @ORippler Signed-off-by: Heitor [email protected] Co-authored-by: Oliver Simons [email protected] Website: https://llama.app Attestations: https://github.com/ggml-org/llama.cpp/attestations/53997029 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 評分40

llama.cpp b11538 修復 MSVC 下 CUDA 舍入問題

llama.cpp 發布 b11538 建置,修復 CUDA 後端的舍入問題,使 MSVC 下 CPU 與 GPU 的計算結果一致。本次發布包覆蓋 macOS/iOS、Linux、Windows、Android 與 openEuler,其中 CUDA 12/13 預編譯包分別對應 CUDA 12.8 與 13.4 庫,Linux 與 Windows x64 另有 ROCm 10.0、OpenVINO、SYCL、Vulkan 建置,Snapdragon 平台提供 CPU、Adr…

llama.cpp releasesAI 評分43

llama.cpp 發布 b11425:CUDA alloc_deps 檢查改為與 batch 無關

llama.cpp 發布 b11425 建置,主要變更是把 CUDA 後端的 alloc_deps 檢查改為與 batch 無關(PR #29986,修復 #29980)。該版本同時更新各平台預編譯產物,覆蓋 macOS Apple Silicon 與 Intel、iOS XCFramework、Android arm64,以及 Windows 和 Ubuntu 上的 CUDA 12、CUDA 13、Vulkan、ROCm 10.0、SYCL、OpenVINO 等後端。

llama.cpp releasesAI 評分37

llama.cpp 發布 b11465,覆蓋 CUDA 13 與 ROCm 10.0 等平台

llama.cpp 發布建置版本 b11465,本次改動是「測試:在測試遞迴回滾時保留 anchor」(#29923)。該版本提供的預編譯產物覆蓋 macOS/iOS、Linux、Android、Windows 與 openEuler,其中 Windows 與 Linux 的 x64/arm64 均包含 CUDA 12、CUDA 13(CUDA 13.4 庫)、Vulkan、ROCm 10.0、OpenVINO、SYCL 等後端。