How To Install libvkfft-dev on Debian 12

Learn how to install libvkfft-dev on Debian 12 with this tutorial. libvkfft-dev is Vulkan/CUDA/HIP/OpenCL Fast Fourier Transform library

Introduction

In this tutorial we learn how to install libvkfft-dev on Debian 12.

What is libvkfft-dev

libvkfft-dev is:

VkFFT is an efficient GPU-accelerated multidimensional Fast Fourier Transform library for Vulkan/CUDA/HIP/OpenCL projects. VkFFT aims to provide the community with an open-source alternative to Nvidia’s cuFFT library while achieving better performance. VkFFT is written in C language and supports Vulkan, CUDA, HIP and OpenCL as backends.

  • 1D/2D/3D systems

  • Forward and inverse directions of FFT

  • Support for big FFT dimension sizes. Current limits: C2C or even C2R/R2C - (2^32, 2^32, 2^32). Odd C2R/R2C - (2^12, 2^32, 2^32). R2R - (2^12, 2^12, 2^12). Depends on the amount of shared memory on the device. (will be increased later).

  • Radix-2/3/4/5/7/8/11/13 FFT. Sequences using radix 3, 5, 7, 11 and 13 have comparable performance to that of powers of 2.

  • Bluestein’s FFT algorithm for all other sequences. Full coverage of C2C range, single upload (2^12, 2^12, 2^12) for R2C/C2R/R2R. Optimized to have as few memory transfers as possible by using zero padding and merged convolution support of VkFFT

  • Single, double and half precision support. Double precision uses CPU-generated LUT tables. Half precision still does all computations in single and only uses half precision to store data.

  • All transformations are performed in-place with no performance loss. Out-of-place transforms are supported by selecting different input/output buffers.

  • No additional transposition uploads. Note: Data can be reshuffled after the Four Step FFT algorithm with an additional buffer (for big sequences). Doesn’t matter for convolutions - they return to the input ordering (saves memory).

  • Complex to complex (C2C), real to complex (R2C), complex to real (C2R) transformations and real to real (R2R) Discrete Cosine Transformations of types I, II, III and IV. R2R, R2C and C2R are optimized to run up to 2x times faster than C2C and take 2x less memory

  • 1x1, 2x2, 3x3 convolutions with symmetric or nonsymmetric kernel (no register overutilization)

  • Native zero padding to model open systems (up to 2x faster than simply padding input array with zeros). Can specify the range of sequences filled with zeros and the direction where zero padding is applied (read or write stage)

  • WHDCN layout - data is stored in the following order (sorted by increase in strides): the width, the height, the depth, the coordinate (the number of feature maps), the batch number

  • Multiple feature/batch convolutions - one input, multiple kernels

  • Multiple input/output/temporary buffer split. Allows using data split between different memory allocations and mitigates 4GB single allocation limit.

  • Works on Nvidia, AMD and Intel GPUs. And Raspberry Pi 4 GPU.

  • Works on Windows, Linux and macOS

  • VkFFT supports Vulkan, CUDA, HIP and OpenCL as backend to cover wide range of APIs

  • Header-only library with Vulkan interface, which allows appending VkFFT directly to user’s command buffer. Kernels are compiled at run-time

There are three methods to install libvkfft-dev on Debian 12. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libvkfft-dev Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libvkfft-dev using apt-get by running the following command:

sudo apt-get -y install libvkfft-dev

Install libvkfft-dev Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libvkfft-dev using apt by running the following command:

sudo apt -y install libvkfft-dev

Install libvkfft-dev Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libvkfft-dev using aptitude by running the following command:

sudo aptitude -y install libvkfft-dev

How To Uninstall libvkfft-dev on Debian 12

To uninstall only the libvkfft-dev package we can use the following command:

sudo apt-get remove libvkfft-dev

Uninstall libvkfft-dev And Its Dependencies

To uninstall libvkfft-dev and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove libvkfft-dev

Remove libvkfft-dev Configurations and Data

To remove libvkfft-dev configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge libvkfft-dev

Remove libvkfft-dev configuration, data, and all of its dependencies

We can use the following command to remove libvkfft-dev configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libvkfft-dev

Dependencies

libvkfft-dev have the following dependencies:

References

Summary

In this tutorial we learn how to install libvkfft-dev package on Debian 12 using different package management tools: apt, apt-get and aptitude.