Skip to content

Usage of CUDA Tensor Cores (WMMA)

Choose a tag to compare

@kar-dim kar-dim released this 21 Aug 11:29
· 550 commits to master since this release

This release introduces a CUDA only performance optimization in the computation of Rx per block:
We now use NVIDIA Tensor Cores via the WMMA API for block-wise matrix multiplications.

  • The kernel responsible for computing the Rx matrices has been refactored to use WMMA (Warp Matrix Multiply Accumulate) instructions.

  • Instead of performing standard CUDA thread-wise reductions in shared memory, the Rx computation is now done by Tensor Core matrix multiplication (Xᵀ * X), providing throughput improvements on supported GPUs. This also reduces the shared memory required by letting Tensor Cores handle the accumulation which improves occupancy.

Requirements:

  • NVIDIA GPU with Tensor Core support (Volta, Turing, Ampere, Ada or newer).
  • CUDA 11+ recommended for stable WMMA API support.

Support video rotation

This release also introduces support for handling video rotation metadata automatically. Videos recorded on smartphones or other devices that store rotation information in their metadata will now be correctly processed.

  • Detects rotation from input video metadata (rotate tag or display matrix).
  • Applies the correct rotation during processing using FFmpeg filters (transpose, hflip,vflip).
  • Only applies transformation to videos that require it, keeping processing efficient for standard files.

Note: The rotation is now applied directly to the pixel data, not just via metadata, ensuring that players display the video correctly regardless of their metadata handling.

Support Full range videos

Added full support for full-range videos. Previously, colors could appear incorrect for full-range videos. Now they are encoded and displayed correctly. Limited-range videos remain unaffected.

Support WebP and TIFF images for CPU builds

  • Support for loading and saving of WebP images (static libwebp, no DLL dependency).
  • Support for loading and saving of TIFF images (dynamic libtiff, DLL dependency). NOTE: TIFF files support many other colorspaces other than sRGB (CMYK for example). The input file must be converted to sRGB beforehand.