Yolov8m model inference run on CPU not running on NPU and performance is 4-FPS only

Dear team,

I am running yolov8m model into NPU, as reference based on Ryzen SW program. But

only 4 FPS (Frame Per seconds). Also checked usage in hardware CPU load shows 100 % ( various core). But not running on NPU .

Used environment details,

Used Operating System: Both windows or Linux ( Error same in only CPU loads not run on NPU)

SDK: Ryzen SDK RAI 1.7.1

AMD CPU details: AMD Ryzen™ 7 8845HS

Windows : 11

Ubuntu : 24.04

Error:

  • 4.1 FPS processing inference
  • CPU Loads 80% various core
  • NPU less than 2% load on windows
  • Error occurs in both linux and windows

Expected Behaviour:

  • Should be used NPU more than 80%
  • Not from CPU load
  • 30 or 40 FPS image processing expected

It sounds like your model is running on the CPU because it isn’t in the specific format the NPU needs to read. You usually have to shrink your model into a “quantized” version, like INT8, before the NPU can actually take over the work. Also, double-check that you’ve installed the latest NPU drivers, or the hardware will just stay idle. Do you see any error messages about “Vitis AI” being missing when you try to start the program?

Thanks for suggestion,

  1. Tried yolov8m_BF16.onnx, yolov8m_XINT8.onnx format with quantized model.
  2. VitisAIExecutionProvider as run inference gets executed, no error related to Vitis AI missing
  3. NPU driver : In Windows: NPU device listed, In Linux: lscpi shows device id ‘PHX/HPT’ of XDNA , Seems like no error message in dmesg , /dev/accel node listed in linux
  4. Issue observed that NPU usage less than 2% only , CPU load 80-100 % both windows and linux
  5. Observation: When export pytorch(pt) model into onnx, gets 3 warnings
    1. Deprecation warning : Pytorch 2.99 require to set dynamo=True
    2. Ultralytics/nn/modules/head.py 163: Trace not generate other inputs input ! if (self.format ! = “imx”)
    3. tal.py: 372 TracerWarning : Iterating over a tensor might cause trace incorrect.
  6. Reference: RyzenAI-SW/CNN-examples/object_detection/yolov8m/README.md at main · amd/RyzenAI-SW · GitHub