Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Environment:Intel Ipex llm Linux XPU Environment

From Leeroopedia


Knowledge Sources
Domains Infrastructure, Environment_Diagnostics
Last Updated 2026-02-09 04:00 GMT

Overview

General Intel XPU environment on Linux for running environment diagnostics, GPU health checks, and validating Intel GPU driver and OneAPI toolkit installations.

Description

This environment provides a general-purpose Intel XPU context on Linux for verifying that the Intel GPU stack is correctly installed and operational. It includes the Intel GPU drivers, OneAPI base toolkit, and the `xpu-smi` utility for GPU monitoring and diagnostics. This environment is used to run environment check scripts that validate driver versions, GPU visibility, Level Zero runtime status, and overall system readiness for IPEX-LLM workloads.

Usage

Use this environment for Linux Environment Diagnostics to verify Intel XPU hardware and software stack readiness. It is the mandatory prerequisite for running environment validation checks, GPU enumeration, and driver compatibility tests on Linux systems with Intel GPUs.

System Requirements

Category Requirement Notes
OS Ubuntu 22.04 LTS Other Linux distributions may work with manual driver installation
Hardware Intel GPU (Arc/Flex/Max) Any Intel discrete or integrated GPU with XPU support
GPU Driver Intel GPU drivers `intel-opencl-icd`, `intel-level-zero-gpu` required
Toolkit Intel OneAPI Base Toolkit Provides compiler runtimes and Level Zero loader

Dependencies

System Packages

  • Intel OneAPI Base Toolkit
  • `intel-opencl-icd`
  • `intel-level-zero-gpu`
  • `level-zero`, `level-zero-dev`
  • `xpu-smi` (Intel XPU System Management Interface)

Python Packages

  • `ipex-llm[xpu]` (pre-release, for validation)
  • `torch` (XPU variant, for device detection)
  • `intel_extension_for_pytorch` (XPU variant)

Credentials

No credentials are required. The following environment setup is needed:

  • Source the OneAPI environment via `source /opt/intel/oneapi/setvars.sh` before running diagnostics.

Quick Install

# Install Intel GPU drivers (Ubuntu 22.04)
sudo apt-get update
sudo apt-get install -y intel-opencl-icd intel-level-zero-gpu level-zero level-zero-dev xpu-smi

# Install Intel OneAPI Base Toolkit
# Follow instructions at https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html

# Source Intel OneAPI environment
source /opt/intel/oneapi/setvars.sh

# Verify GPU visibility
xpu-smi discovery

# Install IPEX-LLM for Python-level validation
pip install --pre --upgrade ipex-llm[xpu] --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/

# Verify XPU device in Python
python -c "import torch; import intel_extension_for_pytorch; print(torch.xpu.device_count(), 'XPU device(s) found')"

Common Errors

Error Message Cause Solution
`xpu-smi: command not found` XPU SMI utility not installed `sudo apt-get install xpu-smi`
`No XPU devices discovered` GPU drivers not loaded grep -i vga`
`Level Zero loader not found` OneAPI toolkit not installed or not sourced Install OneAPI toolkit and run `source /opt/intel/oneapi/setvars.sh`
`torch.xpu.device_count() returns 0` Intel Extension for PyTorch not installed Install `intel_extension_for_pytorch` XPU variant

Compatibility Notes

  • Linux Only: This environment is specific to Linux. For Windows environment diagnostics, see the Windows_Environment page.
  • xpu-smi: The `xpu-smi` tool provides GPU discovery, health monitoring, firmware info, and telemetry similar to `nvidia-smi` for NVIDIA GPUs.
  • Driver Versions: GPU driver versions must be compatible with the OneAPI toolkit version. Mismatched versions may cause device detection failures.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment