-
Notifications
You must be signed in to change notification settings - Fork 8
Description
When computing an FFT repeatedly in certain situations, memory usage shoots up at a very fast rate until an FFT_FAILED message pops up. This only happens to me with 2D Complex_to_Complex or 2D Hermitian_to_Real (size is single prec 100 by 81 by 90 by the way). Exact same LabView code but with 3D instead of 2D produces no memory usage increase.
Looking in "clAmdFft.cpp" under "ComputeFFT()":
The issue appears to be with the temporary buffer used in the enqueueTransform function. The buffer is allocated every time the FFT is computed, but it is never deallocated.
Simplest solution is just to never allocate it and let the enqueueTransform allocate its own memory by passing a NULL instead of an allocated buffer. Otherwise it should be allocated only once during FFT plan creation, and it should be deallocated when destroying the plan.