From 9e2cf2f2e0624d9b98f40d4f2733f8b70a7574d6 Mon Sep 17 00:00:00 2001 From: Yuuichi Asahi Date: Wed, 4 Dec 2024 00:10:54 +0900 Subject: [PATCH] fix: HIP plans --- fft/src/KokkosFFT_HIP_plans.hpp | 2 ++ fft/src/KokkosFFT_HIP_types.hpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fft/src/KokkosFFT_HIP_plans.hpp b/fft/src/KokkosFFT_HIP_plans.hpp index ea06078..f230c3e 100644 --- a/fft/src/KokkosFFT_HIP_plans.hpp +++ b/fft/src/KokkosFFT_HIP_plans.hpp @@ -80,6 +80,8 @@ auto create_plan(const ExecutionSpace& exec_space, plan = std::make_unique(); // hipfftResult hipfft_rt = hipfftCreate(&(*plan)); // KOKKOSFFT_THROW_IF(hipfft_rt != HIPFFT_SUCCESS, "hipfftCreate failed"); + + hipStream_t stream = exec_space.hip_stream(); hipfftResult hipfft_rt = hipfftSetStream((*plan).plan(), stream); KOKKOSFFT_THROW_IF(hipfft_rt != HIPFFT_SUCCESS, "hipfftSetStream failed"); diff --git a/fft/src/KokkosFFT_HIP_types.hpp b/fft/src/KokkosFFT_HIP_types.hpp index bda0a19..0005d38 100644 --- a/fft/src/KokkosFFT_HIP_types.hpp +++ b/fft/src/KokkosFFT_HIP_types.hpp @@ -31,7 +31,7 @@ struct ScopedHIPfftPlanType { ScopedHIPfftPlanType() { hipfftCreate(&m_plan); } ~ScopedHIPfftPlanType() { hipfftDestroy(m_plan); } - ScopedHIPfftPlanType &plan() { return m_plan; } + hipfftHandle &plan() { return m_plan; } }; #if defined(ENABLE_HOST_AND_DEVICE)