Skip to content

Memory Leak in FFT computation #37

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions