Skip to content

Commit

Permalink
Merge branch 'AMReX-Codes:development' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
siddanib authored Mar 19, 2024
2 parents 162ae84 + 5501f73 commit 7bf84c8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Src/Base/AMReX_GpuDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,13 @@ Device::initialize_gpu ()
cudaDeviceGetAttribute(&memory_pools_supported, cudaDevAttrMemoryPoolsSupported, device_id);
#endif

#if (__CUDACC_VER_MAJOR__ < 12) || ((__CUDACC_VER_MAJOR__ == 12) && (__CUDACC_VER_MINOR__ < 4))
if (sizeof(Real) == 8) {
AMREX_CUDA_SAFE_CALL(cudaDeviceSetSharedMemConfig(cudaSharedMemBankSizeEightByte));
} else if (sizeof(Real) == 4) {
AMREX_CUDA_SAFE_CALL(cudaDeviceSetSharedMemConfig(cudaSharedMemBankSizeFourByte));
}
#endif

for (int i = 0; i < max_gpu_streams; ++i) {
AMREX_CUDA_SAFE_CALL(cudaStreamCreate(&gpu_stream_pool[i]));
Expand Down

0 comments on commit 7bf84c8

Please sign in to comment.