Skip to content

Commit 15a0bb9

Browse files
authored
SYCL: Use get_multi_ptr instead of get_pointer (AMReX-Codes#3630)
The latter has been deprecated in SYCL 2020.
1 parent af1e1be commit 15a0bb9

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

.github/workflows/intel.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,9 @@ jobs:
226226
-DCMAKE_VERBOSE_MAKEFILE=ON \
227227
-DAMReX_EB=ON \
228228
-DAMReX_ENABLE_TESTS=ON \
229-
-DAMReX_FORTRAN=ON \
229+
-DAMReX_FORTRAN=OFF \
230230
-DCMAKE_C_COMPILER=$(which icc) \
231231
-DCMAKE_CXX_COMPILER=$(which icpc) \
232-
-DCMAKE_Fortran_COMPILER=$(which ifort) \
233232
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
234233
cmake --build build --parallel 2
235234
cmake --build build --target install

Src/Base/AMReX_GpuLaunchFunctsG.H

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void launch (int nblocks, int nthreads_per_block, std::size_t shared_mem_bytes,
3636
[=] (sycl::nd_item<1> item)
3737
[[sycl::reqd_sub_group_size(Gpu::Device::warp_size)]]
3838
{
39-
f(Gpu::Handler{&item,shared_data.get_pointer()});
39+
f(Gpu::Handler{&item,shared_data.get_multi_ptr<sycl::access::decorated::yes>().get()});
4040
});
4141
});
4242
} catch (sycl::exception const& ex) {
@@ -82,7 +82,7 @@ void launch (int nblocks, std::size_t shared_mem_bytes, gpuStream_t stream,
8282
[[sycl::reqd_work_group_size(1,1,MT)]]
8383
[[sycl::reqd_sub_group_size(Gpu::Device::warp_size)]]
8484
{
85-
f(Gpu::Handler{&item,shared_data.get_pointer()});
85+
f(Gpu::Handler{&item,shared_data.get_multi_ptr<sycl::access::decorated::yes>().get()});
8686
});
8787
});
8888
} catch (sycl::exception const& ex) {
@@ -210,7 +210,7 @@ void ParallelFor (Gpu::KernelInfo const& info, T n, L&& f) noexcept
210210
i < n; i += stride) {
211211
int n_active_threads = amrex::min(n-i+(T)item.get_local_id(0),
212212
(T)item.get_local_range(0));
213-
detail::call_f(f, i, Gpu::Handler{&item, shared_data.get_pointer(),
213+
detail::call_f(f, i, Gpu::Handler{&item, shared_data.get_multi_ptr<sycl::access::decorated::yes>().get(),
214214
n_active_threads});
215215
}
216216
});
@@ -269,7 +269,7 @@ void ParallelFor (Gpu::KernelInfo const& info, Box const& box, L&& f) noexcept
269269
k += lo.z;
270270
int n_active_threads = amrex::min(ncells-icell+(int)item.get_local_id(0),
271271
(int)item.get_local_range(0));
272-
detail::call_f(f, i, j, k, Gpu::Handler{&item, shared_data.get_pointer(),
272+
detail::call_f(f, i, j, k, Gpu::Handler{&item, shared_data.get_multi_ptr<sycl::access::decorated::yes>().get(),
273273
n_active_threads});
274274
}
275275
});
@@ -335,7 +335,7 @@ void ParallelFor (Gpu::KernelInfo const& info, Box const& box, T ncomp, L&& f) n
335335
int n_active_threads = amrex::min(ncells-icell+(int)item.get_local_id(0),
336336
(int)item.get_local_range(0));
337337
detail::call_f(f, i, j, k, ncomp,
338-
Gpu::Handler{&item, shared_data.get_pointer(),
338+
Gpu::Handler{&item, shared_data.get_multi_ptr<sycl::access::decorated::yes>().get(),
339339
n_active_threads});
340340
}
341341
});

0 commit comments

Comments
 (0)