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

Work buffer size too big for the rocfft backend #218

Closed
tpadioleau opened this issue Jan 2, 2025 · 0 comments · Fixed by #219
Closed

Work buffer size too big for the rocfft backend #218

tpadioleau opened this issue Jan 2, 2025 · 0 comments · Fixed by #219

Comments

@tpadioleau
Copy link
Member

I think we allocate too much memory in the rocfft backend. The function rocfft_plan_get_work_buffer_size https://rocm.docs.amd.com/projects/rocFFT/en/latest/reference/api.html#_CPPv432rocfft_plan_get_work_buffer_sizeK11rocfft_planP6size_t returns a size in bytes.

If I am not mistaken we allocate a buffer of type Kokkos::complex<float_type*> in

std::size_t workbuffersize = 0;
status = rocfft_plan_get_work_buffer_size(*plan, &workbuffersize);
KOKKOSFFT_THROW_IF(status != rocfft_status_success,
"rocfft_plan_get_work_buffer_size failed");
if (workbuffersize > 0) {
buffer = BufferViewType("work_buffer", workbuffersize);
status = rocfft_execution_info_set_work_buffer(
execution_info, (void*)buffer.data(), workbuffersize);
KOKKOSFFT_THROW_IF(status != rocfft_status_success,
"rocfft_execution_info_set_work_buffer failed");
}
because BufferViewType is given by
using BufferViewType =
Kokkos::View<Kokkos::complex<float_type>*, layout_type, execSpace>;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant