Skip to content

Commit

Permalink
Remove call to cudaDeviceSetCacheConfig (#1536)
Browse files Browse the repository at this point in the history
## Summary
No longer set CUDA device cache configuration to prefer L1 cache.  This does
not appear to affect any kernels in a negative way.  With more shared memory
available, reduction functions are faster in some cases.

## Additional background

## Checklist

The proposed changes:
- [ ] fix a bug or incorrect behavior in AMReX
- [ ] add new capabilities to AMReX
- [ ] changes answers in the test suite to more than roundoff level
- [ ] are likely to significantly affect the results of downstream AMReX users
- [ ] are described in the proposed changes to the AMReX documentation, if appropriate
  • Loading branch information
WeiqunZhang authored Nov 12, 2020
1 parent f55a950 commit cdb236e
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Src/Base/AMReX_GpuDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,6 @@ Device::initialize_gpu ()
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(device_prop.major >= 4 || (device_prop.major == 3 && device_prop.minor >= 5),
"Compute capability must be >= 3.5");

// Prefer L1 cache to shared memory (this has no effect on GPUs with a fixed L1 cache size).
AMREX_CUDA_SAFE_CALL(cudaDeviceSetCacheConfig(cudaFuncCachePreferL1));

if (sizeof(Real) == 8) {
AMREX_CUDA_SAFE_CALL(cudaDeviceSetSharedMemConfig(cudaSharedMemBankSizeEightByte));
} else if (sizeof(Real) == 4) {
Expand Down

0 comments on commit cdb236e

Please sign in to comment.