Intel® XPU Library for PyTorch* Ecosystem Projects
This project contains a set of plugins for PyTorch* ecosystem libraries which enable hardware acceleration on Intel® GPUs thru the xpu PyTorch* device backend. The goal of the project is to:
- Facilitate enabling of the Intel® GPUs support across PyTorch* ecosystem projects
- Provide the plugins till the support for Intel® GPUs will be accepted in the respective upstream projects
At the moment project provides plugins for the following frameworks:
- Intel® XPU plugin for TorchCodec
Plugins
Intel® XPU plugin for TorchCodec
TorchCodec is a high-performance Python library designed for media processing (decoding and encoding) using PyTorch* tensors. Intel® XPU plugin for TorchCodec enables hardware acceleration for video operations (only decoding at the moment) on Linux. Both TorchCodec and Intel® plugin rely on the FFmpeg libraries for their operations which must be pre-installed on the system. Intel® plugin further assumes that FFmpeg is built with the VAAPI support.
TorchCodec will automatically load Intel® XPU plugin if it is installed on the system via Python packages entry point mechanism. After importing TorchCodec, pass XPU device to initialize TorchCodec decoder or encoder:
import torchcodec
decoder = torchcodec.decoders.VideoDecoder(
"input.mp4", device="xpu:0")
Installation
Pre-built release wheels are available at PyPI. Installation requires PyTorch with enabled XPU support which can be fetched from https://download.pytorch.org/whl/xpu:
pip install torchlib-xpu \
--extra-index-url https://download.pytorch.org/whl/xpu
Build from sources
-
Install uv
-
Install oneAPI 2026.1
-
Install FFmpeg development environment with enabled VAAPI hardware acceleration. For example:
- By installing FFmpeg provided by your Linux distribution. For Ubuntu:
apt-get update && apt-get install -y \
libavcodec-dev \
libavdevice-dev \
libavfilter-dev \
libavformat-dev \
libavutil-dev \
libswresample-dev \
libswscale-dev
- By self-building FFmpeg from sources. The following example provides the minimal configuration required for hardware FFmpeg VAAPI codecs to be functional. For software fallback support, FFmpeg needs to be additionally built with enabled software codecs such as x264, x265, etc.:
git clone https://git.ffmpeg.org/ffmpeg.git && cd ffmpeg
./configure \
--prefix=$HOME/_install \
--libdir=$HOME/_install/lib \
--disable-static \
--disable-stripping \
--disable-doc \
--enable-shared \
--enable-vaapi
make -j$(nproc) && make install
export PKG_CONFIG_PATH=$HOME/_install/lib/pkgconfig
export LD_LIBRARY_PATH=$HOME/_install/lib:$LD_LIBRARY_PATH
- Build and install plugins supplied by Intel® XPU Library for PyTorch* Ecosystem Projects:
git clone https://github.com/intel/torchlib-xpu.git && cd torchlib-xpu
uv venv && uv pip install -e . \
--index https://download.pytorch.org/whl/xpu -vv
Metadata
Release files for torchlib-xpu 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| torchlib_xpu-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for torchlib_xpu-0.5.0-py3-none-any.whl |
Release files / torchlib_xpu-0.5.0-py3-none-any.whl
| Download URL | torchlib_xpu-0.5.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2107052878b6f4fcce8a6e4bdc2a570cc6a4a0f7975bfdcc17e0a1041585556f
|
|
BLAKE2b-256 checksum How to use checksums |
7aa0cb3202d404ba468bd3e6c888c872c86267a633be13d521ebb6dd66a1d378
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency logSecurity for torchlib-xpu 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
1 file in this release has been uploaded with provenance metadata.
Attestation for torchlib_xpu-0.5.0-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.