-
Notifications
You must be signed in to change notification settings - Fork 100
Description
-
Executive Summary
This report details the successful deployment of the low-level Ryzen AI NPU driver stack on Ubuntu 24.04 (Kernel 6.18), contrasted with the consistent build failure of ONNX Runtime (ORT) with Vitis AI Execution Provider (EP). The failure is attributed to toolchain incompatibilities (GCC 13/14) and dependency drift (Eigen/Protobuf) in the latest Ubuntu LTS release. -
System Environment
Hardware: ASUS ExpertBook PM3606CKA
APU: AMD Ryzen AI 5 330 (Radeon 820M, NPU enabled)
OS: Ubuntu 24.04.3 LTS (Noble Numbat)
Kernel: 6.18.1-061801-generic (Mainline)
Note: Mainline kernel was required to resolve display (HDMI) and audio is
sues on this hardware.
Toolchain: GCC 13.x / 14.x, CMake 3.28
XRT/XDNA: 2.21.0 (Head/Master branch)
- Driver Stack Status: [SUCCESS]
The bottom-up infrastructure is fully functional. The NPU is recognized, and firmware is correctly loaded.
Driver: amdxdna kernel module loaded.
XRT/XDNA Plugin: Manually built and installed from xdna-driver source.
Verification: xrt-smi examine returns:
Device: [0000:06:00.1] : RyzenAI-npu6
Firmware: 1.0.0.63
Status: AIE Partitions visible, hardware contexts ready.
- AI Runtime Status: [FAILED / BLOCKED]
Attempting to build ONNX Runtime v1.20.1 with Vitis AI EP consistently fails.
Build Command:
Bash
./build.sh --config Release --parallel --build_shared_lib --use_vitisai --skip_tests --build_wheel
--cmake_extra_defines onnxruntime_USE_FULL_PROTOBUF=OFF Protobuf_USE_STATIC_LIBS=OFF
Primary Error Pattern:
The build crashes during the compilation of element_wise_ops.cc.
Location: onnxruntime/core/providers/vitisai/.../element_wise_ops.cc
Error: Template instantiation mismatch in Eigen regarding min/max operations and PropagateNaN.
Context: GCC 13/14 enforces stricter C++17/20 template deduction rules that the current Vitis AI EP source code fails to satisfy.
Troubleshooting Attempted:
Protobuf: Downgraded to 3.20.3 via manual source build (No change).
Eigen: Switched between system-provided Eigen and manual 3.3.9/FetchContent (No change).
Python Environment: Tested with both Python 3.10 and 3.12 (No change).
Flags: Attempted to disable Unit Tests and Benchmarks to isolate the error (No change).
- Suspected Root Causes
Compiler Strictness: GCC 13+ handles std::complex and Eigen template parameters more strictly than GCC 11 (Ubuntu 22.04 default).
Dependency Conflict: The Vitis AI EP logic seems tightly coupled with older versions of Eigen that do not account for the ABI/API changes present in Ubuntu 24.04's default libraries.
LTS Drift: While the amdxdna driver is evolving, the Vitis AI EP integration in ONNX Runtime appears optimized for Ubuntu 22.04 (Jammy) only.
- Conclusion & Request
Conclusion: Ryzen AI NPU on Linux is currently in a "Split State" for Ubuntu 24.04 users. The hardware/kernel layer is ready, but the user-space AI runtime (ORT+VAI EP) is unusable.
Requests for AMD (XDNA/Vitis-AI Team) & Microsoft (ORT Team):
Provide a patch for element_wise_ops.cc to support GCC 13/14 template deduction.
Update the Vitis AI EP build script to support the Ubuntu 24.04 (Noble) environment.
Release official pre-compiled .deb packages for XRT/XDNA-Plugin for Ubuntu 24.04 to lower the entry barrier.