Skip to content

Commit

Permalink
Fix sycl
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Nov 10, 2024
1 parent 6ca85fc commit ec494bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Src/FFT/AMReX_FFT_Helper.H
Original file line number Diff line number Diff line change
Expand Up @@ -1219,12 +1219,13 @@ void Plan<T>::init_r2c (IntVectND<M> const& fft_size, void* buffer, bool cache)
for (int i = M-1; i >= 1; --i) {
strides[i] = strides[i+1] * fft_size[M-1-i];
}

#ifndef AMREX_USE_MKL_DFTI_2024
pp->set_value(oneapi::mkl::dft::config_param::FWD_STRIDES, strides);
pp->set_value(oneapi::mkl::dft::config_param::BWD_STRIDES, strides);
#else
pp->set_value(oneapi::mkl::dft::config_param::FWD_STRIDES, strides.data());
pp->set_value(oneapi::mkl::dft::config_param::BWD_STRIDES, strides.data());
// Do not set BWD_STRIDES
#endif
pp->set_value(oneapi::mkl::dft::config_param::WORKSPACE,
oneapi::mkl::dft::config_value::WORKSPACE_EXTERNAL);
Expand Down

0 comments on commit ec494bf

Please sign in to comment.