Environment
- Board: Rock 5C (RK3588)
- OS: RadxaOS (Kernel 6.1.84-8-rk2410)
- RKNPU2 Package: 2.3.0-1
- RKNN Runtime: 2.3.2
- RKNPU Driver: 0.9.8
Problem Description
Experiencing severe NPU instability when running llama.cpp with RKNPU2 backend on RadxaOS. Issues manifest as:
- EFAULT errors (
failed to allocate handle, errno: 14) during inference after ~60s of model loading
- Board crashes/reboots frequently during NPU operations
- CPU-only builds also crash the board, indicating the issue is not purely RKNPU-related
Error Messages
E RKNN: failed to allocate handle, errno: 14 (EFAULT)
E RKNN: failed to submit matmul task
Known Driver Bugs
-
Spinlock recursion bug in RKNPU 0.9.x with 4+ contexts in auto core mode
-
Kernel panic issues with NPU operations on 6.1.84-vendor-rk35xx
Investigation Summary
| Test |
Result |
| Standalone SDK matmul test |
PASS |
| SDK stress test (50 contexts) |
PASS |
| CPU-only llama-cli build |
FAIL (board crashes) |
| NPU-accelerated llama-cli |
FAIL (EFAULT errors) |
Conclusion: Hardware/system instability that predates our fork's changes.
Workarounds Applied
- Force single NPU core (RKNN_NPU_CORE_0)
- Use static memory context for B-matrix allocations
- Map quantization to power of 2 for context caching
Recommendation
Switch to Armbian for Rock 5C, which provides more stable NPU driver support.
Expected Behavior
NPU should operate stably for sustained inference sessions without board crashes or EFAULT errors.
Related
🤖 Generated with Claude Code
Environment
Problem Description
Experiencing severe NPU instability when running llama.cpp with RKNPU2 backend on RadxaOS. Issues manifest as:
failed to allocate handle, errno: 14) during inference after ~60s of model loadingError Messages
Known Driver Bugs
Spinlock recursion bug in RKNPU 0.9.x with 4+ contexts in auto core mode
Kernel panic issues with NPU operations on 6.1.84-vendor-rk35xx
Investigation Summary
Conclusion: Hardware/system instability that predates our fork's changes.
Workarounds Applied
Recommendation
Switch to Armbian for Rock 5C, which provides more stable NPU driver support.
Expected Behavior
NPU should operate stably for sustained inference sessions without board crashes or EFAULT errors.
Related
🤖 Generated with Claude Code