ROCm / ROCm/FastFlowLM

No NPU device found on ubuntu

Open Beginner friendly
#400 8 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.9k
Forks
152
Avg merge
4h 14m
Merged PRs (30d)
11

Description

I found this happening on my machine and doing the below fixed it; flm validate reports "No NPU device found" when the real issue is insufficient permissions.

Summary

flm validate prints [ERROR] No NPU device found when the NPU device (/dev/accel/accel0) does exist but the current user lacks permission to open it. This is misleading — the device is present and the amdxdna driver is loaded; the user simply isn't in the render group (or hasn't re-logged after joining it).

Environment
  • OS: Ubuntu, kernel 6.17.0-14-generic (Ubuntu 24.04.4 LTS)
  • NPU: AMD Device 17F0 (XDNA2) [Strix Halo]
  • Driver: amdxdna 0.6.0 (DKMS, out-of-tree)
  • FLM version: installed via .deb - fastflowlm_0.9.35_ubuntu24.04_amd64.deb
Steps to Reproduce
  1. Install amdxdna-dkms and flm per the Linux guide
  2. Do not add your user to the render group (or add them but don't log out/in)
  3. Run flm validate
Expected Behavior

A clear error indicating the device exists but access is denied, e.g.:

[Linux]  Kernel: 6.17.0-14-generic
[ERROR]  NPU device found at /dev/accel/accel0 but permission denied.
         Add your user to the 'render' group:  sudo usermod -aG render $USER
         Then log out and log back in.
[Linux]  Memlock Limit: 15992 MB
Actual Behavior
[Linux]  Kernel: 6.17.0-14-generic
[ERROR]  No NPU device found.
[Linux]  Memlock Limit: 15992 MB

flm validate --json similarly reports "amd_device_found": false and "devices": [].

Root Cause

/dev/accel/accel0 is owned by root:render with mode crw-rw----. The sanity_check_npu_stack() function in src/src/main.cpp appears to open the device and, when the open fails with EACCES (permission denied), treats it identically to ENOENT (device not found).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/src/main.cpp at sanity_check_npu_stack() and reproduce with /dev/accel/accel0 present but inaccessible to the current user. Distinguish permission denial from a missing device in flm validate, including its --json output, and verify that the resulting message gives the render-group guidance shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux, ubuntu
Domain
cli, operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.