Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RAII issue by introducing wrapper classes for backend plans #208

Merged
merged 66 commits into from
Jan 7, 2025
Merged
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
8fb15ac
fix: conflicts
Dec 5, 2024
737f3ca
Fix and wrapper for FFTW handle
Dec 3, 2024
95419cb
Wrapper for cufft handle
Dec 3, 2024
9baa59d
fix: conflicts
Dec 5, 2024
8d952e5
Wrapper for rocfft handle
Dec 3, 2024
dd907a8
fix: conflicts
Dec 3, 2024
6b1059b
Cleanup plan class based on the introduction of wrappers
Dec 3, 2024
f46c56d
fix: conflicts
Dec 5, 2024
5116c1c
fix: conflicts
Dec 5, 2024
b93c07c
fix: unused variable
Dec 3, 2024
1b908fe
fix: work buffer allocation
Dec 3, 2024
4010401
remove unused variable
Dec 3, 2024
ac5b34d
remove unused lines
Dec 3, 2024
734a55a
Add missing include header file in KokkosFFT_ROCM_types.hpp
Dec 3, 2024
f161d46
fix: fftwHandle type in SYCL types
Dec 4, 2024
31cd597
Do not return const plan type for fftw
Dec 4, 2024
2030d04
fix: remove const
Dec 4, 2024
a8741bd
fix: fftw plan creation
Dec 4, 2024
a3c94e3
fix: set created
Dec 4, 2024
0d8a616
fix: cleanup
Dec 4, 2024
f1f4f30
fix constructor of fftw wrapper
Dec 4, 2024
2b75678
fix: conflicts
Dec 5, 2024
88310c9
Remove non-default constructors from FFTW wrapper
Dec 5, 2024
995bb4a
Remove non-default constructors from cufft wrapper
Dec 5, 2024
751810c
Remove non-default constructors from hipfft wrapper
Dec 5, 2024
4ba04f0
Remove non-default constructors from rocfft wrapper
Dec 5, 2024
2eac65c
update FFTW wrapper class name
Dec 5, 2024
35afb3d
fix: host plan type
Dec 5, 2024
5c25bce
fix: fftw rapper name in ROCM_types
Dec 5, 2024
c363d3d
update cuda backed based on reviews
Dec 17, 2024
975b2f1
update hip backend based on reviews
Dec 17, 2024
405b36f
update rocm backend based on reviews
Dec 17, 2024
d394672
update host backend based on revies
Dec 17, 2024
7c085eb
fix: Rocm types
Dec 17, 2024
a6ccd56
fix: ROCM types
Dec 17, 2024
701136e
fix: Rocm types
Dec 17, 2024
622ac0e
fix: header files
Dec 17, 2024
1d33d7a
fix: rocm types
Dec 17, 2024
34ed2b3
fix: rocm types
Dec 18, 2024
45c489b
remove unused lines
Dec 18, 2024
3fdd5bf
fix: rocm types
Dec 18, 2024
645696c
Improve the cleanup logic for cufft plan
Dec 19, 2024
a350598
Improve the cleanup logic for hipfft plan
Dec 19, 2024
27501ac
Improve the cleanup logic for rocfft plan
Dec 19, 2024
4bde4d2
simplify fftw plan wrapper
Dec 19, 2024
6f3c535
fix: rocm types
Dec 19, 2024
5e81354
fix: scoped rocfft plan type
Dec 19, 2024
0d9119d
return execution_info by value in scoped rocfft plan
Dec 19, 2024
f181066
Add commit method to scoped cufft plan
Dec 20, 2024
f7944c8
Add commit method to scoped hipfft plan
Dec 20, 2024
0c6b33b
Add commit method to scoped rocfft plan
Dec 20, 2024
944f246
Add const qualifer for host transforms
Dec 20, 2024
eaf5354
fix: ROCM types
Dec 20, 2024
b405320
fix cleanup of ScopedCufft and ScopedHIPfft plan
Jan 2, 2025
28d9891
Add ScopedExecutionInfo for rocm backend
Jan 2, 2025
c7dd94d
fix KokkosFFT_ROCM_types.hpp
Jan 2, 2025
e3e7f0e
fix: KokkosFFT_ROCM_types.hpp
Jan 2, 2025
88d4c43
make commit method const
Jan 6, 2025
46d2faf
call fftw_cleanup_threads only once
Jan 6, 2025
edab676
remove static from init and cleanup methods
Jan 6, 2025
154c12d
use local static object for global initialization and finalization
Jan 6, 2025
e8aa2ec
remove cleanup threads for safety
Jan 7, 2025
c03d035
remove unused header from KokkosFFT_FFTW_Types.hpp
Jan 7, 2025
8df33b0
delete non-default constructors for Rocfft wrappers
Jan 7, 2025
c891b7a
fix: KokkosFFT_ROCM_types.hpp
Jan 7, 2025
0119961
Add Thomas as a co-author
Jan 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make commit method const
Yuuichi Asahi committed Jan 6, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 88d4c43a08ea49cfcb6da9c2a098b0c3d69e7965
2 changes: 1 addition & 1 deletion fft/src/KokkosFFT_Cuda_types.hpp
Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@ struct ScopedCufftPlan {
ScopedCufftPlan(ScopedCufftPlan &&) = delete;

cufftHandle plan() const noexcept { return m_plan; }
void commit(const Kokkos::Cuda &exec_space) {
void commit(const Kokkos::Cuda &exec_space) const {
cufftResult cufft_rt = cufftSetStream(m_plan, exec_space.cuda_stream());
KOKKOSFFT_THROW_IF(cufft_rt != CUFFT_SUCCESS, "cufftSetStream failed");
}
2 changes: 1 addition & 1 deletion fft/src/KokkosFFT_HIP_types.hpp
Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@ struct ScopedHIPfftPlan {
ScopedHIPfftPlan(ScopedHIPfftPlan &&) = delete;

hipfftHandle plan() const noexcept { return m_plan; }
void commit(const Kokkos::HIP &exec_space) {
void commit(const Kokkos::HIP &exec_space) const {
hipfftResult hipfft_rt = hipfftSetStream(m_plan, exec_space.hip_stream());
KOKKOSFFT_THROW_IF(hipfft_rt != HIPFFT_SUCCESS, "hipfftSetStream failed");
}