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
- 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 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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file torchcodec_xpu-0.15.0-cp314-cp314-manylinux_2_24_x86_64.whl.
File metadata
- Download URL: torchcodec_xpu-0.15.0-cp314-cp314-manylinux_2_24_x86_64.whl
- Upload date:
- Size: 266.8 kB
- Tags: CPython 3.14, manylinux: glibc 2.24+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
997ee14d0996541260eb613bb94a6ce0e1391e44b0b4886152c750c6ea5b2636
|
|
| MD5 |
5c0cd4c7d0300521a63753955de99db4
|
|
| BLAKE2b-256 |
eedb30b6508ecac37a81a61145b07f9529dd77d0e359836515a4ad24ebd30b06
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torchcodec_xpu-0.15.0-cp314-cp314-manylinux_2_24_x86_64.whl -
Subject digest:
997ee14d0996541260eb613bb94a6ce0e1391e44b0b4886152c750c6ea5b2636 - Sigstore transparency entry: 2427522713
- Sigstore integration time:
-
Permalink:
intel/torchlib-xpu@3aec84b2cd0eaa578211d5436ad5acd5f391dbaf -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/intel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@3aec84b2cd0eaa578211d5436ad5acd5f391dbaf -
Trigger Event:
release
-
Statement type:
File details
Details for the file torchcodec_xpu-0.15.0-cp313-cp313-manylinux_2_24_x86_64.whl.
File metadata
- Download URL: torchcodec_xpu-0.15.0-cp313-cp313-manylinux_2_24_x86_64.whl
- Upload date:
- Size: 266.8 kB
- Tags: CPython 3.13, manylinux: glibc 2.24+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
428a46309efdfdfd531584918fe805d150bac96fcc713d1894def801c543ed44
|
|
| MD5 |
90aaa8d7ab6bad1351846263bab6d566
|
|
| BLAKE2b-256 |
69d716d5e5e72ddbd8eeba4eb0ac672c33eafc37fc0aa6a60fa14ee205814acc
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torchcodec_xpu-0.15.0-cp313-cp313-manylinux_2_24_x86_64.whl -
Subject digest:
428a46309efdfdfd531584918fe805d150bac96fcc713d1894def801c543ed44 - Sigstore transparency entry: 2427522411
- Sigstore integration time:
-
Permalink:
intel/torchlib-xpu@3aec84b2cd0eaa578211d5436ad5acd5f391dbaf -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/intel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@3aec84b2cd0eaa578211d5436ad5acd5f391dbaf -
Trigger Event:
release
-
Statement type:
File details
Details for the file torchcodec_xpu-0.15.0-cp312-cp312-manylinux_2_24_x86_64.whl.
File metadata
- Download URL: torchcodec_xpu-0.15.0-cp312-cp312-manylinux_2_24_x86_64.whl
- Upload date:
- Size: 266.8 kB
- Tags: CPython 3.12, manylinux: glibc 2.24+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
016972f68787b682de0129b44f275ec3660d47fcb77a4fd796be19522e37e186
|
|
| MD5 |
975a80084fec2bc62940787088164d9d
|
|
| BLAKE2b-256 |
725e431bbd17fa09746a08d19636972c9fe18acaba2fd05bdf0ec5ee9781bb12
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torchcodec_xpu-0.15.0-cp312-cp312-manylinux_2_24_x86_64.whl -
Subject digest:
016972f68787b682de0129b44f275ec3660d47fcb77a4fd796be19522e37e186 - Sigstore transparency entry: 2427523377
- Sigstore integration time:
-
Permalink:
intel/torchlib-xpu@3aec84b2cd0eaa578211d5436ad5acd5f391dbaf -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/intel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@3aec84b2cd0eaa578211d5436ad5acd5f391dbaf -
Trigger Event:
release
-
Statement type:
File details
Details for the file torchcodec_xpu-0.15.0-cp311-cp311-manylinux_2_24_x86_64.whl.
File metadata
- Download URL: torchcodec_xpu-0.15.0-cp311-cp311-manylinux_2_24_x86_64.whl
- Upload date:
- Size: 266.8 kB
- Tags: CPython 3.11, manylinux: glibc 2.24+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f9e8cd38f74609e760b567348f559c27e6a27b91aebc6803e9401b7acebafac
|
|
| MD5 |
2e514bc8a33bade81096d7bec8c82878
|
|
| BLAKE2b-256 |
815c2d7fd5442841684f95840baa359e71efbeee5d4ac35d8ef248d5afd638c0
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torchcodec_xpu-0.15.0-cp311-cp311-manylinux_2_24_x86_64.whl -
Subject digest:
3f9e8cd38f74609e760b567348f559c27e6a27b91aebc6803e9401b7acebafac - Sigstore transparency entry: 2427521771
- Sigstore integration time:
-
Permalink:
intel/torchlib-xpu@3aec84b2cd0eaa578211d5436ad5acd5f391dbaf -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/intel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@3aec84b2cd0eaa578211d5436ad5acd5f391dbaf -
Trigger Event:
release
-
Statement type:
File details
Details for the file torchcodec_xpu-0.15.0-cp310-cp310-manylinux_2_24_x86_64.whl.
File metadata
- Download URL: torchcodec_xpu-0.15.0-cp310-cp310-manylinux_2_24_x86_64.whl
- Upload date:
- Size: 266.8 kB
- Tags: CPython 3.10, manylinux: glibc 2.24+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7858cc48811e8b036b488f1064df044a8c62bdc1d5e90edce97d996fb03e724
|
|
| MD5 |
b6b45f91a873ce78543ac46446abf6a8
|
|
| BLAKE2b-256 |
89b68398ab38e7979e6f0031975338be5ab7e83167721d37a60c7255d2d33430
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torchcodec_xpu-0.15.0-cp310-cp310-manylinux_2_24_x86_64.whl -
Subject digest:
d7858cc48811e8b036b488f1064df044a8c62bdc1d5e90edce97d996fb03e724 - Sigstore transparency entry: 2427522125
- Sigstore integration time:
-
Permalink:
intel/torchlib-xpu@3aec84b2cd0eaa578211d5436ad5acd5f391dbaf -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/intel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@3aec84b2cd0eaa578211d5436ad5acd5f391dbaf -
Trigger Event:
release
-
Statement type: