Skip to main content

Intel Plugin for TorchCodec

Overview

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")

Supported hardware

All the Intel GPU hardware enabled for XPU PyTorch backend with hardware media decoding capabilities is supported.

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 torchcodec-xpu \
  --extra-index-url https://download.pytorch.org/whl/xpu

Environment variables

The following environment variables can be used to customize the behavior of Intel Plugin for TorchCodec:

  • TORCHCODEC_XPU_LOG_LEVEL=0|1|2|3|4 (default: 0) - log level.

  • USE_SYCL_KERNELS = on|off (default: off) - use SYCL kernels for augmentation such as color space conversion instead of VAAPI interface. If SYCL kernels are requested but can not be used due to hardware limitations, then fallback to VAAPI will be attempted.

  • CPU_FALLBACK=on|off (default: on) - allow CPU fallback.

  • FORCE_CPU_FALLBACK=on|off (default: off) - force CPU fallback.

Known limitations

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

torchcodec_xpu-0.15.0-cp314-cp314-manylinux_2_24_x86_64.whl (266.8 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.24+ x86-64

torchcodec_xpu-0.15.0-cp313-cp313-manylinux_2_24_x86_64.whl (266.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64

torchcodec_xpu-0.15.0-cp312-cp312-manylinux_2_24_x86_64.whl (266.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64

torchcodec_xpu-0.15.0-cp311-cp311-manylinux_2_24_x86_64.whl (266.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64

torchcodec_xpu-0.15.0-cp310-cp310-manylinux_2_24_x86_64.whl (266.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64

File details

Details for the file torchcodec_xpu-0.15.0-cp314-cp314-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for torchcodec_xpu-0.15.0-cp314-cp314-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 997ee14d0996541260eb613bb94a6ce0e1391e44b0b4886152c750c6ea5b2636
MD5 5c0cd4c7d0300521a63753955de99db4
BLAKE2b-256 eedb30b6508ecac37a81a61145b07f9529dd77d0e359836515a4ad24ebd30b06

See more details on using hashes here.

Provenance

The following attestation bundles were made for torchcodec_xpu-0.15.0-cp314-cp314-manylinux_2_24_x86_64.whl:

Publisher: ci.yml on intel/torchlib-xpu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torchcodec_xpu-0.15.0-cp313-cp313-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for torchcodec_xpu-0.15.0-cp313-cp313-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 428a46309efdfdfd531584918fe805d150bac96fcc713d1894def801c543ed44
MD5 90aaa8d7ab6bad1351846263bab6d566
BLAKE2b-256 69d716d5e5e72ddbd8eeba4eb0ac672c33eafc37fc0aa6a60fa14ee205814acc

See more details on using hashes here.

Provenance

The following attestation bundles were made for torchcodec_xpu-0.15.0-cp313-cp313-manylinux_2_24_x86_64.whl:

Publisher: ci.yml on intel/torchlib-xpu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torchcodec_xpu-0.15.0-cp312-cp312-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for torchcodec_xpu-0.15.0-cp312-cp312-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 016972f68787b682de0129b44f275ec3660d47fcb77a4fd796be19522e37e186
MD5 975a80084fec2bc62940787088164d9d
BLAKE2b-256 725e431bbd17fa09746a08d19636972c9fe18acaba2fd05bdf0ec5ee9781bb12

See more details on using hashes here.

Provenance

The following attestation bundles were made for torchcodec_xpu-0.15.0-cp312-cp312-manylinux_2_24_x86_64.whl:

Publisher: ci.yml on intel/torchlib-xpu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torchcodec_xpu-0.15.0-cp311-cp311-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for torchcodec_xpu-0.15.0-cp311-cp311-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 3f9e8cd38f74609e760b567348f559c27e6a27b91aebc6803e9401b7acebafac
MD5 2e514bc8a33bade81096d7bec8c82878
BLAKE2b-256 815c2d7fd5442841684f95840baa359e71efbeee5d4ac35d8ef248d5afd638c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for torchcodec_xpu-0.15.0-cp311-cp311-manylinux_2_24_x86_64.whl:

Publisher: ci.yml on intel/torchlib-xpu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torchcodec_xpu-0.15.0-cp310-cp310-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for torchcodec_xpu-0.15.0-cp310-cp310-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 d7858cc48811e8b036b488f1064df044a8c62bdc1d5e90edce97d996fb03e724
MD5 b6b45f91a873ce78543ac46446abf6a8
BLAKE2b-256 89b68398ab38e7979e6f0031975338be5ab7e83167721d37a60c7255d2d33430

See more details on using hashes here.

Provenance

The following attestation bundles were made for torchcodec_xpu-0.15.0-cp310-cp310-manylinux_2_24_x86_64.whl:

Publisher: ci.yml on intel/torchlib-xpu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.16.0

5 files

This release

0.15.0 This release

5 files

0.14.0

5 files

0.13.0

5 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page