Skip to content

Add Intel NPU support (intel_vpu accel driver) - #526

Merged
Syllo merged 5 commits into
Syllo:masterfrom
s3644:intel-npu
Nov 15, 2026
Merged

Syllo merged 5 commits into
Syllo:masterfrom
s3644:intel-npu

Conversation

@s3644

@s3644 s3644 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a backend for Intel NPUs exposed by the in-kernel intel_vpu (ivpu) accel driver: Meteor Lake, Arrow Lake, Lunar Lake and Panther Lake.

How it works

  • Finds devices under /sys/class/accel/accel* whose device/driver is intel_vpu
  • Reads only sysfs, so no extra library is needed:
    • utilization: growth of npu_busy_time_us divided by wall time
    • clock: npu_current_frequency_mhz / npu_max_frequency_mhz (0 MHz while power-gated)
    • memory: npu_memory_utilization against total system RAM, since the NPU has no dedicated memory
  • New INTEL_NPU_SUPPORT CMake option, on by default on Linux; registered as gpu_processing_unit_npu, like the Rockchip backend

Not included yet

  • Per-process usage (fdinfo)
  • Temperature (the driver exposes no NPU sensor)

Testing

Core Ultra 9 285K (8086:ad1d), kernel 7.0, alongside an RTX 5090 and the Arrow Lake iGPU. The NPU is detected and shown as "Intel NPU (Arrow Lake)", and idle readings are correct (0 %, 0 MHz, 65 MB allocated). Not yet tested under an NPU workload.

🤖 Generated with Claude Code

s3644 and others added 5 commits October 8, 2026 22:50
Add a backend for Intel NPUs (Meteor Lake, Arrow Lake, Lunar Lake,
Panther Lake) driven by the in-kernel intel_vpu/ivpu accel driver.
Devices are discovered under /sys/class/accel by their driver link and
read entirely from sysfs, so no extra library is needed:

- utilization from the cumulative npu_busy_time_us counter
- current and maximum clock from npu_{current,max}_frequency_mhz
  (0 MHz while the NPU is power-gated)
- memory allocated by the NPU (npu_memory_utilization) against total
  system RAM, since the NPU has no dedicated memory

The backend is enabled by default on Linux behind the new
INTEL_NPU_SUPPORT CMake option. Per-process reporting is not
implemented yet.

Tested on an Arrow Lake Core Ultra 9 285K (8086:ad1d) alongside an
NVIDIA RTX 5090 and the integrated Intel GPU.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Add the two NPU PCI IDs already handled by the in-kernel intel_vpu
  driver so those parts are named instead of falling back to their ID.
- Report the generation as device_architecture as well.
- Bound the pdev copies to PDEV_LEN to silence -Wformat-truncation.
- Move the vendor extern to file scope to silence -Wnested-externs.
- Add the missing copyright line and apply clang-format.
The NPU has no dedicated memory, and Qualcomm/Rockchip expose system-wide
memory pressure (MemTotal/MemAvailable). Use the same convention here so
the NPU memory columns mean the same thing across backends.

This drops the NPU-resident bytes from npu_memory_utilization.
Describe the supported parts, the build option, the sampling interval
caveat, the memory semantics and the kernel versions exposing each metric.
@Syllo

Syllo commented Nov 15, 2026

Copy link
Copy Markdown
Owner

I merged current master into the branch and added a few follow-ups:

  • Added Wildcat Lake (0xfd3e) and Nova Lake (0xd71d) to the generation table, and report the generation as device_architecture as well.
  • Fixed the new -Wformat-truncation warnings by bounding the pdev copies, and moved the vendor extern to file scope.
  • Added the missing copyright header and applied clang-format.
  • Memory now follows the Qualcomm/Rockchip NPU backends: total/free come from MemTotal/MemAvailable, with system-wide used memory. This replaces the NPU-resident bytes from npu_memory_utilization, so the NPU memory columns mean the same thing across backends.
  • Added the backend to the README: supported generations, INTEL_NPU_SUPPORT, kernel floors (6.11 for utilization, 6.15 for frequency) and the npu_busy_time_us sampling caveat.

Pushed as 7d21b86. Thanks!

@Syllo
Syllo merged commit dc7f1bf into Syllo:master Nov 15, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants