Skip to content

Commit

Permalink
SYCL: Allocate 3/4 of total global memory by default (#3431)
Browse files Browse the repository at this point in the history
In the past, we had issues with allocating too big a chunk of memory on
Intel GPUs, so we only allocated 1 GB by default. This is no longer the
case.
  • Loading branch information
WeiqunZhang authored Jul 27, 2023
1 parent f5bf0e4 commit b459e58
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Src/Base/AMReX_Arena.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,10 @@ Arena::Initialize ()
BL_ASSERT(the_comms_arena == nullptr || the_comms_arena == The_BArena());

#ifdef AMREX_USE_GPU
#ifdef AMREX_USE_SYCL
the_arena_init_size = 1024L*1024L*1024L; // xxxxx SYCL: todo
#else
the_arena_init_size = Gpu::Device::totalGlobalMem() / Gpu::Device::numDevicePartners() / 4L * 3L;
#ifdef AMREX_USE_SYCL
the_arena_init_size = std::min(the_arena_init_size, Gpu::Device::maxMemAllocSize());
#endif

the_pinned_arena_release_threshold = Gpu::Device::totalGlobalMem();
#endif

Expand Down

0 comments on commit b459e58

Please sign in to comment.