-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47325 from fwyzard/RecoLocalTracker_SiPixelCluste…
…rizer_GPU_DEBUG Fix `SiPixelClusterizer` alpaka code when `GPU_DEBUG` is defined
- Loading branch information
Showing
3 changed files
with
41 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef FWCore_Utilities_DeviceGlobal_h | ||
#define FWCore_Utilities_DeviceGlobal_h | ||
|
||
// FIXME alpaka provides ALPAKA_STATIC_ACC_MEM_GLOBAL to declare device global | ||
// variables, but it is currently not working as expected. Improve its behaviour | ||
// and syntax and migrate to that. | ||
|
||
#if defined(__SYCL_DEVICE_ONLY__) | ||
|
||
// The SYCL standard does not support device global variables. | ||
// oneAPI defines the sycl_ext_oneapi_device_global extension, but with an awkward syntax | ||
// that is not easily compatible with CUDA, HIP and regular C++ global variables. | ||
#error "The SYCL backend does not support device global variables" | ||
#define DEVICE_GLOBAL | ||
|
||
#elif defined(__CUDA_ARCH__) or defined(__HIP_DEVICE_COMPILE__) | ||
|
||
// CUDA and HIP/ROCm device compilers use the __device__ attribute. | ||
#define DEVICE_GLOBAL __device__ | ||
|
||
#else | ||
|
||
// host compilers do not need any special attributes. | ||
#define DEVICE_GLOBAL | ||
|
||
#endif | ||
|
||
#endif // FWCore_Utilities_DeviceGlobal_h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters