Details
rpc : add SUPPORTS_OP command (#32532)
- rpc : add SUPPORTS_OP command
The RPC device used to report every op as supported, so the scheduler
and llama's fused-op probes could pick ops the remote backend cannot
run. One case is flash attention over K/V rows on Vulkan.
Add RPC_CMD_SUPPORTS_OP, which takes a serialized graph in the same
format as GRAPH_COMPUTE and returns one support flag per node.
On the client, answers are cached per device under two keys:
- exact: op, op params, types and the ne/nb of the op and its srcs
- coarse: op, op params and types only, AND-ed over all nodes that
share it. It answers shapes that were not seen during reserve,
e.g. a different n_kv or n_tokens at inference.
Ops not found in either cache are queried one at a time.
Add an optional ggml_backend_dev_graph_preprocess proc address and
call it from llama_context::graph_reserve(), so the RPC backend sends
each reserve graph in a single round trip instead of one per node.
Testing done:
test-llama-archs passes with an RPC server running each of CUDA,
Vulkan and Metal
Co-authored-by: Kevin Hopper no-reply@maestro.press
Co-authored-by: ZihaoMu zmu@amd.com
Co-authored-by: Yonghye Kwon developer.0hye@gmail.com
-
address review comments
-
remove coarse cache
Co-authored-by: Kevin Hopper no-reply@maestro.press
Co-authored-by: ZihaoMu zmu@amd.com
Co-authored-by: Yonghye Kwon developer.0hye@gmail.com
Website:
Attestations:
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 24.04 s390x (CPU)
- Ubuntu 26.04 s390x (CPU)
- Ubuntu 26.04 s390x (zDNN)
- Ubuntu x64 (Vulkan)
- Ubuntu arm64 (Vulkan)
- Ubuntu x64 (CUDA 12) - CUDA 12.8 libraries
- Ubuntu x64 (CUDA 13) - CUDA 13.5 libraries
- Ubuntu arm64 (CUDA 13) - CUDA 13.5 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:
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.5 DLLs
- Windows arm64 (CUDA 13) - CUDA 13.5 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: