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 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.

Supported FFmpeg versions

Intel Plugin for TorchCodec is being validated with FFmpeg versions range [6, 9].

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

FFmpeg with enabled VAAPI backend must be installed on the system separately. Pre-built wheels support FFmpeg versions range [6, 9].

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

  • Intel® Data Center GPU Max Series (Ponte Vecchio, PVC) GPUs are not supported due to missing hardware media engines. Execution will fallback to CPU.
  • SYCL color space conversion kernel is not supported on Intel® Arc™ Pro A-Series Graphics (Alchemist, DG2) and Intel® Data Center GPU Flex Series (Archtic Sound, ATS-M) GPUs as 64-bit floating point operations used in the kernel are not available on these GPUs. Execution will fallback to less performant color space conversion on CPU or on media engines via FFmpeg VAAPI.

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.16.0-cp314-cp314-manylinux_2_24_x86_64.whl (518.2 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.24+ x86-64

torchcodec_xpu-0.16.0-cp313-cp313-manylinux_2_24_x86_64.whl (518.2 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64

torchcodec_xpu-0.16.0-cp312-cp312-manylinux_2_24_x86_64.whl (518.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64

torchcodec_xpu-0.16.0-cp311-cp311-manylinux_2_24_x86_64.whl (518.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64

torchcodec_xpu-0.16.0-cp310-cp310-manylinux_2_24_x86_64.whl (518.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64

File details

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

File metadata

File hashes

Hashes for torchcodec_xpu-0.16.0-cp314-cp314-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 b068ccca122bddaa45bf5190738eeb30a16596c00ad061a7a1048f85a4ffe525
MD5 6a288d609f90b90c8e955911ee87a752
BLAKE2b-256 ada85f21a92f0767ddca0766a2c1a7e835d40107f5a788ace58446a18e9a9a3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for torchcodec_xpu-0.16.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.16.0-cp313-cp313-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for torchcodec_xpu-0.16.0-cp313-cp313-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 c705eaaa37576bd61f8d20a3a8c90dcf947466ec6ba0705ebadff21bc25942ff
MD5 8fdffc0c2db22e4b7f85b3d598acba5c
BLAKE2b-256 7829eba6312e0f084d5c19446c34003a4f5ea8f4e7ab9b660c9e5d1537975043

See more details on using hashes here.

Provenance

The following attestation bundles were made for torchcodec_xpu-0.16.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.16.0-cp312-cp312-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for torchcodec_xpu-0.16.0-cp312-cp312-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 aa64f264f03e8bcc0fba882b37caad33bb7782120267de2c7703040688d8f154
MD5 1fdcb246d20214bb91907829192fa4b1
BLAKE2b-256 43a160930610e398a948828cccad16cc240c0ecc61fc590650bd357e4fa17328

See more details on using hashes here.

Provenance

The following attestation bundles were made for torchcodec_xpu-0.16.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.16.0-cp311-cp311-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for torchcodec_xpu-0.16.0-cp311-cp311-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 c0acf0e893246571228b1df6bac02b2332c9cbf41a5604ecd94ace6f28662827
MD5 25fef6015dbc7aac52045bcc55ff18c3
BLAKE2b-256 aa6c5afe3d3e0b4698a0adb4a43b792b4fbe1c71f47287e32bf5c4443569f645

See more details on using hashes here.

Provenance

The following attestation bundles were made for torchcodec_xpu-0.16.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.16.0-cp310-cp310-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for torchcodec_xpu-0.16.0-cp310-cp310-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 2b780ecf72f0f5e43eed91be76088eb396dc04f4ab8f3fc145e6ab78e41c4fd5
MD5 eefdb067648d83008ea1f8a2f33d425b
BLAKE2b-256 7537e1f7a68860a9c9ea8a9a464d063422f5956ac95c0d481ab9c618b07e24d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for torchcodec_xpu-0.16.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

This release

0.16.0 This release

5 files

0.15.0

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