You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as i know, the 'UNALIGNED' flag changes nothing when using MKL's fftw3 wrapper, as the low level DFTI API uses no pointer information until call the DftiComputeForward or DftiComputeBackward.
Some 1d-fft benchmark:
using FFTW, BenchmarkTools, LinearAlgebra
const memory =zeros(Int8,8*2048*20000+15) # memory pool for arbitrary alignmentpickalign(::Type{T}, sz, align::Int) where{T} =begin
data =@view memory[align .+ (1:sizeof(T)*prod(sz))]
dataᵀ =reinterpret(T,data)
reshape(dataᵀ,sz)
endusing Random
a =pickalign(ComplexF32,(2048,100), 0)
randn!(a)
b =similar(a)
plan =plan_fft(a,1)
plan_unaligned =plan_fft(a,1,flags = FFTW.ESTIMATE | FFTW.UNALIGNED)
@btime FFTW.mul!(b,plan,a) #fftw:58.600 μs mkl::34.200 μs@btime FFTW.mul!(b,plan_unaligned,a) #fftw:153.800 μs mkl::34.200 μs
a =pickalign(ComplexF32,(2048,100), 1)
randn!(a)
@btime FFTW.mul!(b,plan_unaligned,a) #fftw:152.700 μs mkl::35.600 μs
a =pickalign(ComplexF32,(2048,100), 8)
randn!(a)
@btime FFTW.mul!(b,plan_unaligned,a) #fftw:152.100 μs mkl::35.700 μs
Although only a few cases have been benched, it seems that the alignment doesn't affect MKL's performance, and the default flags could be settled as ESTIMATE | UNALIGNED.
The text was updated successfully, but these errors were encountered:
Well I found this in MKL's developer reference [p2643]:
The flags parameter in plan creation functions is always ignored. The same algorithm is used regardless of the value of this parameter.
As far as i know, the 'UNALIGNED' flag changes nothing when using MKL's fftw3 wrapper, as the low level DFTI API uses no pointer information until call the
DftiComputeForward
orDftiComputeBackward
.Some 1d-fft benchmark:
Although only a few cases have been benched, it seems that the alignment doesn't affect MKL's performance, and the default flags could be settled as
ESTIMATE | UNALIGNED
.The text was updated successfully, but these errors were encountered: