FastRPC from PowerShell on the cDSP
Device: Galaxy S23 (SM8550, Hexagon V73). Host app: AndroidSMA .preview (declares libcdsprpc.so).
DSP library: SDK 6.4.0.2 examples/calculator, glue generated by qaic, compiled with
QuIC LLVM Hexagon Clang 19.0.04 (-mv73 -O2 -fPIC -G0 -shared), unsigned, SHA-256 CDABE27C3AED2E5E….
CPU side: src/runspace/FastRpcProbe.ps1 — PowerShell calling libcdsprpc.so directly
(remote_session_control, remote_handle64_open/invoke/close). ABI from incs/remote.h
and the generated stub: DSPRPC_CONTROL_UNSIGNED_MODULE = 2, CDSP_DOMAIN_ID = 3,
calculator_sum method 2, scalars REMOTE_SCALARS_MAKEX(0,2,2,1,0,0) = 0x02020100, remote_arg = 16 bytes.
Job=fastrpc-probe
UnsignedPdRc=0
OpenRc=0 Handle=set
Sum n=1000 bytes=4000 expected=-500 got=-500 mismatches=0 FirstMs=1.61 WarmMeanMs=0.35 P50Ms=0.35 P95Ms=0.36
Sum n=2458624 bytes=9834496 expected=-1346624 got=-1346624 mismatches=0 FirstMs=36.23 WarmMeanMs=32.94 P50Ms=32.02 P95Ms=43.49
Passed=True
CloseRc=0
Device log: "Created user PD on domain 3", shell fastrpc_shell_unsigned_3.
Integration finding: a generator-sized tensor passed as an ordinary heap buffer costs ~33 ms per call. Per-block FastRPC with copies is not viable (~18 blocks). Next measurement: the same call with registered shared memory (rpcmem/DMA-BUF), versus a QNN custom op package.