Logo Xpu Discover

Xpu Discover

Tổ chức
intel
xpu-discover

Inventory Intel GPUs (Arc, Arc Pro) on a Linux host. Detect devices, collect driver, firmware and component-health evidence, list processes using each XPU, and read live utilisation.

Tổng quan

Nhà phát hànhintel
Kho mãskills
Tên kỹ năngxpu-discover
Sao
31
Bản fork
14
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Đầy đủ trong hướng dẫn

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được intel công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Xpu Discover trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/intel/skills/tree/main/skills/xpu-discover
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/intel/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/xpu-discover .claude/skills/xpu-discover
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Xpu Discover trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Xpu Discover ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Xpu Discover không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

xpu-discover

xpu-smi is Intel's nvidia-smi. Sees only Intel GPUs (Arc, Arc Pro, Battlemage, Flex, Max).

Quickstart

Subcommands and flags differ between builds; xpu-smi -h lists what the installed one supports (prefer -h: some builds reject help). Report an absent subcommand rather than retrying it.

Run in order. If step 1 fails or has no devices, stop.

sh
xpu-smi discovery                 # 1. inventory
xpu-smi health -l                 # 2. component health (power, frequency, temp)
journalctl -k --no-pager | grep -iE 'guc|huc|iommu|drm|\bxe\b|i915|level.?zero'
                                  # 3. driver/firmware log evidence
xpu-smi ps                        # 4. processes using each GPU
xpu-smi stats -d 0                # 5. utilisation snapshot
xpu-smi dump --device 0 --metrics MEMORY,POWER --interval 1
                                  # 6. live CSV stream (Ctrl-C)

The xpu-smi commands accept -j for JSON output (use when parsing).

Steps 2 and 3 are both needed: health covers power and thermals, the kernel log covers driver and firmware. Neither certifies health, and a command that runs is not a GPU that works.

CUDA -> Intel cheat sheet

CUDAIntel
nvidia-smixpu-smi discovery
nvidia-smi -Lxpu-smi discovery -j
nvidia-smi pmon -c 1xpu-smi ps
nvidia-smi dmonxpu-smi dump --device <id> --metrics MEMORY,POWER --interval 1
nvidia-smi --query-gpu=...xpu-smi stats -d <id> -j
nvidia-smi topo -mxpu-smi topology -m
CUDA_VISIBLE_DEVICES=0ZE_AFFINITY_MASK=0
cuda-memcheckno Arc equivalent: run a real workload (torch-xpu-run)

CUDA refugee footgun: CUDA_VISIBLE_DEVICES=99 silently hides all GPUs; ZE_AFFINITY_MASK=99 crashes the Level Zero loader with an assertion. Always check xpu-smi discovery for valid IDs (start at 0) before setting the mask.

What each subcommand returns

discovery — inventory

One stanza per Intel GPU. Key fields:

  • Device ID — small integer, used as -d and as ZE_AFFINITY_MASK value.

  • PCI BDF Address — stable across reboots (e.g. 0000:36:00.0).

  • DRM Device — /dev/dri/card0, used in --device for Docker.

  • Device Name — Battlemage shows Intel(R) Graphics [0xe2XX] rather than the marketing name; driver quirk, not a problem. Map the PCI device ID in brackets to the product SKU:

    PCI device IDProduct SKUConfirmed
    0xe20bArc B580yes (lspci on hardware)
    0xe211Arc Pro B60yes (lspci on hardware)
    0xe220Arc Pro B50yes (pci.ids)
    0xe221Arc Pro B65yes (pci.ids)
    0xe223Arc Pro B70yes (lspci on hardware)

    Full table provided above. Cross-check with lspci -d 8086: -nn (prints [8086:XXXX]).

Empty output -> kernel didn't enumerate any Intel GPU. See "Troubleshooting".

health -l — component health

Per-device status for power_health, frequency_health, core_temperature, memory_temperature, memory_health. Read the statuses, not the exit code: exit status and sensor support vary independently by build.

  • OK -> no problem reported in this sample; not a workload pass.
  • Unknown, empty, or unsupported -> inconclusive, not healthy. Usual on Arc Pro B60/B70, where only power and frequency report OK.
  • Warning / Critical -> report the component and its value. The routing table below covers kernel-log categories, not sensor components.

If the aggregate call fails (unsupported temperature sensors can abort it), query components one at a time:

sh
xpu-smi health -d 0 -c 3           # power
xpu-smi health -d 0 -c 4           # memory
xpu-smi health -d 0 -c 6           # frequency

Kernel-log scan — driver/firmware errors

Step 3 lists the GPU driver lines. To select messages for review, append | grep -iE '\b(error|fail|warn|timed? ?out|reset|hang|wedged|fault)' (the leading word boundary stops fault matching Default; no trailing boundary, so errors, Resetting and Timedout match). This is triage, not a fault detector: it selects benign resets and misses faults worded without these keywords. No matches means only that nothing matched.

Read journalctl's stderr, and run it unpiped to see its exit status (step 3's pipeline reports grep's): a failed read or no GPU driver lines means the log is unavailable, not that the host is clean. Prefer journalctl -k over dmesg, which can return nothing unprivileged under kernel.dmesg_restrict=1. -k is the current boot; --since narrows it and can hide earlier errors.

Correctable PCIe/AER events are usually benign; check /sys/bus/pci/devices/<bdf>/aer_dev_correctable before treating them as a fault.

ps — what's using each GPU

Lists processes holding Level Zero handles + shared/device memory in MiB. Desktop processes (plasmashell, xauth_*) are normal on a workstation; only worry about a stale model server still holding memory.

stats -d <id> — utilisation snapshot

Many fields show N/A on consumer Battlemage drivers (Arc Pro B70 included) — counter-wiring limitation, not a bug. Memory and power figures generally populate; GPU-utilisation ones do not. For utilisation while running, prefer xpu-smi dump. For a bounded probe use xpu-smi stats -d <id> --samples 1 (-n is not a stats flag).

dump — live CSV stream

On Arc builds use long flags (--device, --metrics, --interval, --number); -m / -i / -n are rejected with The following arguments were not expected. -d <id> is still accepted (xpu-smi 2.2.0), so xpu-smi dump -d 0 --metrics MEMORY --interval 1 also works. Select metrics by group name: MEMORY, UTILIZATION, POWER, TEMPERATURE, CLOCK, PCI, ECC, EU_ARRAY, FAN, ALL.

sh
xpu-smi dump --device 0 --metrics MEMORY,POWER --interval 1 > xpu.csv &
# ... run your model ...
kill %1

For an exact column set: xpu-smi --query-gpu=memory.used,power.draw --id=0 --format=csv. It is single-shot. For repeated sampling use dump --interval, not --query-gpu --loop: on a non-TTY it writes tcsetattr warnings to stderr and does not exit when --count is reached.

The Data Center GPU build (Intel XPU Manager) takes short flags and numeric IDs instead, e.g. xpu-smi dump -d 0 -m 18,1 -i 1 -n 5; xpu-smi dump --help prints each field with its numeric ID.

Privilege note: unprivileged, memory.used / total / free, utilization.memory, power.draw and power.limit populate. The other utilization.* fields, eu.*, the memory.*bandwidth* fields, power.draw.gpu, power.max_limit and energy.consumed read N/A, which is missing telemetry, not zero.

topology -m — multi-GPU connectivity

Matrix of Xe Link / PCIe switch / hostbridge between XPU pairs. Only useful on multi-XPU systems.

Error pattern routing

When the kernel-log scan flags one of these categories:

CategoryCause + fix
Level Zero Init ErrorDriver/userspace mismatch. Confirm xe (Battlemage) or i915 (older) modules loaded: lsmod | grep -E 'i915|xe'. Reload or reboot.
GuC / HuC Not RunningMissing firmware blob. Check journalctl -k | grep -i 'GuC|HuC'; install linux-firmware.
IOMMU CatastrophicKernel cmdline. On consumer boards: intel_iommu=on iommu=pt.
PCIe ErrorCheck /sys/bus/pci/devices/<bdf>/aer_dev_correctable and lspci -vv LnkSta vs LnkCap; correctable counts are usually benign. Reseat card / check slot if uncorrectable.
DRM ErrorStuck context from a crashed desktop session. Logout/login (or reboot) clears it.
i915 Not Loaded on BattlemageBattlemage uses xe, not i915. Confirm modinfo xe; an i915-missing message is misleading on this generation.

Troubleshooting

SymptomFix
xpu-smi: command not foundInstall Intel level-zero packages (Ubuntu / RHEL / Arch all package xpu-smi). Binary lands at /usr/bin/xpu-smi.
discovery empty but card present(1) Kernel didn't bind: lspci -k -s <bdf> should show Kernel driver in use:. (2) Bound to vfio: lsmod | grep vfio. (3) Inside container without /dev/dri: add --device /dev/dri --privileged.
'diag' is not a valid subcommandExpected on Arc/Battlemage. Use xpu-smi health -l plus the kernel-log scan (steps 2 and 3).
Two XPUs present, one visibleprintenv ZE_AFFINITY_MASK; unset for full inventory, re-export for workloads.

Env vars

VariablePurpose
ZE_AFFINITY_MASKWhich XPU(s) a process sees (0, 0,1, ...). Invalid IDs crash the L0 loader (unlike CUDA's silent-hide).
ZE_FLAT_DEVICE_HIERARCHYFLAT exposes tiles as separate root devices; COMPOSITE (default) groups under one. Battlemage is single-tile, doesn't matter.
ZE_ENABLE_VALIDATION_LAYER=1L0 loader prints API misuse — useful when something silently returns wrong device count.

References

Câu hỏi thường gặp

Kỹ năng AI Xpu Discover làm được gì?

Inventory Intel GPUs (Arc, Arc Pro) on a Linux host. Detect devices, collect driver, firmware and component-health evidence, list processes using each XPU, and read live utilisation.

Vì sao nên dùng Xpu Discover trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Xpu Discover là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Xpu Discover trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/intel/skills/tree/main/skills/xpu-discover. TypingMind đọc tệp SKILL.md và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Xpu Discover?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Xpu Discover với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Xpu Discover với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Xpu Discover có miễn phí không?

Có. Kỹ năng này được intel phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇