From bdba5b8403fd7816ebf53d2d0634d0dd4724efc4 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Tue, 19 May 2026 21:49:06 -0400 Subject: [PATCH] FFT: use host stack buffer in PlanCreate, not deviceVector Co-Authored-By: Claude Sonnet 4.6 --- Grid/algorithms/FFT.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Grid/algorithms/FFT.h b/Grid/algorithms/FFT.h index 406a49b6..8bacc274 100644 --- a/Grid/algorithms/FFT.h +++ b/Grid/algorithms/FFT.h @@ -275,8 +275,10 @@ public: // GPU backends (cuFFT/hipFFT) ignore the buffer pointer at plan creation. // CPU FFTW with FFTW_ESTIMATE inspects only alignment and never touches data. - deviceVector dummy(2); - FFTW_scalar *buf = (FFTW_scalar *)&dummy[0]; + // Use a host stack buffer: a device allocation here triggers a rocFFT RTC + // bug on ROCm 7 that causes plan creation to fail for small transform sizes. + scalar stack_dummy[2] = {}; + FFTW_scalar *buf = (FFTW_scalar *)stack_dummy; { FFTW_plan p = FFTW::fftw_plan_many_dft(