From 80d96ae769bc5bc1048d733f75b392dc2e856a77 Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Thu, 21 Jul 2022 09:19:52 -0700 Subject: [PATCH] HIP: Remove the call to hipDeviceSetSharedMemConfig AMD devices do not support shared cache banking. Thanks @afanfa for reporting this. (#2883) --- Src/Base/AMReX_GpuDevice.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Src/Base/AMReX_GpuDevice.cpp b/Src/Base/AMReX_GpuDevice.cpp index 8d42363f0a7..c0e9b3e6785 100644 --- a/Src/Base/AMReX_GpuDevice.cpp +++ b/Src/Base/AMReX_GpuDevice.cpp @@ -397,11 +397,7 @@ Device::initialize_gpu () // check compute capability - if (sizeof(Real) == 8) { - AMREX_HIP_SAFE_CALL(hipDeviceSetSharedMemConfig(hipSharedMemBankSizeEightByte)); - } else if (sizeof(Real) == 4) { - AMREX_HIP_SAFE_CALL(hipDeviceSetSharedMemConfig(hipSharedMemBankSizeFourByte)); - } + // AMD devices do not support shared cache banking. AMREX_HIP_SAFE_CALL(hipStreamCreate(&gpu_default_stream)); for (int i = 0; i < max_gpu_streams; ++i) {