cuda: guard PDL can-use check on pre-Hopper devices (fix sm_86 crash)#32
cuda: guard PDL can-use check on pre-Hopper devices (fix sm_86 crash)#32ddvnguyen wants to merge 1 commit into
Conversation
ggml_cuda_kernel_can_use_pdl() called cudaFuncGetAttributes() on every device. On sm_86 (RTX 3060) + CUDA 13.2 that query faults for PDL-carrying flash-attn kernels, and CUDA_CHECK escalates it to GGML_ABORT — crashing rpc-server and blocking the native --rpc COMBINE path. Pre-Hopper GPUs never emit PDL device-side primitives (ggml_cuda_pdl_sync/_lc are compiled out for arch < Hopper), so the query is pointless there. Gate on device compute capability before the query and cache a permanent false for cc < Hopper. Hopper/Blackwell (incl. sm_120) are unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012d7PtURptwKpgMcFZ2MvYn
|
Closing — this guard rests on a misdiagnosis. Spike hydra_vortex#381 ran the So there is no PDL crash to fix here. And pre-Hopper already returns Generated by Claude Code |
Overview
ggml_cuda_kernel_can_use_pdl()(ggml/src/ggml-cuda/common.cuh) calledcudaFuncGetAttributes()on every device before checkingattr.ptxVersion >= 90. On sm_86 (RTX 3060) + CUDA 13.2 that query faults for the PDL-carrying flash-attn kernels, andCUDA_CHECKescalates the error into aGGML_ABORT— crashingrpc-serveron the 3060 peer.This is the
GGML_CUDA_PDLcrash tracked in PR #31's live-hardware notes ("rpc-server crashes on 3060 with PDL check"), and it is the blocker that forces COMBINE onto the--rpc-engineadd-backend-after-load path (→ the 35-split perf gap) instead of the clean native--rpcregister-before-load path.Fix
Gate on device compute capability before the
cudaFuncGetAttributesquery and cache a permanentfalseforcc < GGML_CUDA_CC_HOPPER. Pre-Hopper GPUs never emit PDL device-side primitives (ggml_cuda_pdl_sync/_lcare compiled out for arch < Hopper), so the query is pointless there anyway. Hopper/Blackwell (including sm_120 / the 5060 Ti) are unaffected — they still run the full PTX-version check.Additional information
ddvnguyen/llama.cpp#31(comments of 2026-07-06).--rpcregister-before-load architecture that PR fork: resolve #376 — make COMBINE mode RPC work (gate-then-degrade) #31 needs to collapse the 35+ graph-split regression.cmake --build build_sm86_sm120 --target llama-engine, then runrpc-serveron the 3060 and exercise a flash-attn graph.Requirements
Generated by Claude Code