Skip to main content

Intel extension for torchcodec

Project description

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.

To use Intel® XPU plugin for TorchCodec, load it in the Python script and pass XPU device to initialize TorchCodec decoder or encoder:

import torchcodec
import torchcodec_xpu

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:

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

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

Known limitations

Project details


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

Uploaded CPython 3.14manylinux: glibc 2.24+ x86-64

torchcodec_xpu-0.14.0-cp313-cp313-manylinux_2_24_x86_64.whl (266.2 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64

torchcodec_xpu-0.14.0-cp312-cp312-manylinux_2_24_x86_64.whl (266.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64

torchcodec_xpu-0.14.0-cp311-cp311-manylinux_2_24_x86_64.whl (266.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64

torchcodec_xpu-0.14.0-cp310-cp310-manylinux_2_24_x86_64.whl (266.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64

File details

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

File metadata

  • Download URL: torchcodec_xpu-0.14.0-cp314-cp314-manylinux_2_24_x86_64.whl
  • Upload date:
  • Size: 266.2 kB
  • Tags: CPython 3.14, manylinux: glibc 2.24+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.9.6 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.65.0 urllib3/1.26.18 CPython/3.10.12

File hashes

Hashes for torchcodec_xpu-0.14.0-cp314-cp314-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 65504dbcc2f3fce5759d476788a015f5cc1522e71b74c76a432320e4960a86c1
MD5 474ffb2fb47e39e2984db71a5d4d5de7
BLAKE2b-256 d41599c2f6044d58848ec47d360d8a001ddd8057f2dfdc9233d7712177e6e00b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchcodec_xpu-0.14.0-cp313-cp313-manylinux_2_24_x86_64.whl
  • Upload date:
  • Size: 266.2 kB
  • Tags: CPython 3.13, manylinux: glibc 2.24+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.9.6 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.65.0 urllib3/1.26.18 CPython/3.10.12

File hashes

Hashes for torchcodec_xpu-0.14.0-cp313-cp313-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 1b4c87f6aec42baa73e9634b01a9d7422c283d17aa47cf7eb555f472fd076658
MD5 6d0656a454d07908875ffdee5a62cbb5
BLAKE2b-256 3a712a0d038c6d778e276b13a5a7c5419fae8555a9e5fa99005295c1c69bd954

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchcodec_xpu-0.14.0-cp312-cp312-manylinux_2_24_x86_64.whl
  • Upload date:
  • Size: 266.2 kB
  • Tags: CPython 3.12, manylinux: glibc 2.24+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.9.6 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.65.0 urllib3/1.26.18 CPython/3.10.12

File hashes

Hashes for torchcodec_xpu-0.14.0-cp312-cp312-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 4a8102e1cd767b02d9c900f8101719b4bf24f1b91bfcd5963d8e1d5d81bb9e29
MD5 ac1ef321f0579f6bec8bc2ace89a8d6e
BLAKE2b-256 6b2e2d7e88ce07f545a191038bb3bf499e9e8af2469c87aa5ebea51abf810956

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchcodec_xpu-0.14.0-cp311-cp311-manylinux_2_24_x86_64.whl
  • Upload date:
  • Size: 266.2 kB
  • Tags: CPython 3.11, manylinux: glibc 2.24+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.9.6 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.65.0 urllib3/1.26.18 CPython/3.10.12

File hashes

Hashes for torchcodec_xpu-0.14.0-cp311-cp311-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 5b00afcfad918777c49929467991fdb07a2f59cd46b33500f370ee2726d4b254
MD5 bed4b581f6eabb9bb3586799daf7af2d
BLAKE2b-256 45e8ad44e72834c6a3677dee852444295f61d5ed060c9a3fb7053c8dfe83fcf1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchcodec_xpu-0.14.0-cp310-cp310-manylinux_2_24_x86_64.whl
  • Upload date:
  • Size: 266.2 kB
  • Tags: CPython 3.10, manylinux: glibc 2.24+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.9.6 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.65.0 urllib3/1.26.18 CPython/3.10.12

File hashes

Hashes for torchcodec_xpu-0.14.0-cp310-cp310-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 4a3d840dd7a168d69c403bc5a7d92d041f47d2153b2085b3375d7a1d8eebca6b
MD5 e336f54e8043c27f5ef559e1ff7cd373
BLAKE2b-256 dcdfd66caa8f3bd1cb739a0f42d40332246c5aeef217f68f1acca138923b7eb1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page