Descriptor format#
The bbfft-aot-generate
and bbfft-offline-generate
tools use a short FFT descriptor format.
The general form of a FFT descriptor is (in ABNF syntax):
fft_descriptor = precision domain direction placement shape [istride] [ostride]
precision = "s" / "d"
domain = "c" / "r"
direction = "f" / "b"
placement = "i" / "o"
shape = [number "."] number *2("x" number) ["*" number]
number = 1*DIGIT
istride = "i" stride
ostride = "o" stride
stride = number 2*4("," number)
The precision, domain, direction, and placement options are:
Option |
Meaning |
---|---|
s |
Single precision |
d |
Double precision |
c |
Complex input and complex output |
r |
Real input and complex output in forward direction; complex input and real output in backward direction |
f |
Forward direction |
b |
Backward direction |
i |
In-place |
o |
Out-of-place |
The shape rule defines the shape of the
The numbers before and after “x” correspond to
The last number, after “*”, is the right-batch size
The istride and ostride rules can be used to override the default strides of the input and output tensor.
The sequence of numbers corresponds to
Note
Custom strides for in-place transforms need to be repeated, i.e. both istride and ostride need to be given.
Examples#
Gibberish |
English |
---|---|
srfi5 |
Single precision real-to-complex 5-point FFT with in-place data layout. |
dcbi4*5 |
Double precision complex-to-complex 4-point FFT in backward direction with in-place data layout and right-batch size of 5. |
dcbi4.5 |
Double precision complex-to-complex 5-point FFT in backward direction with in-place data layout and left-batch size of 4. |
drfo5x6x7 |
Double precision real-to-complex 3-D FFT on |
srbo4.5x6*7 |
Double precision complex-to-real 2-D FFT on |
scfo16*32i1,1,20 |
Single precision complex-to-complex 16-point FFT with right-batch size 32 with out-place data-layout and input stride override (20 complex numbers between batch elements in input tensor). |