Astaroth  3.1
Scalable Multi-GPU Stencil Computations
Loading...
Searching...
No Matches
device_details.h
Go to the documentation of this file.
1#if !AC_USE_HIP || AC_CPU_BUILD
2// OM: I used the same value as is used in stencil_accesses.cpp because I don't have the time now
3// to figure out how to de-duplicate that particular bit of code.
4#define rocprim__warpSize() 64
5#endif
6
7#define rocprim__warpId() rocprim::warp_id()
8#define rocprim__warp_shuffle_down rocprim::warp_shuffle_down
9#define rocprim__warp_shuffle rocprim::warp_shuffle
10
11#if !AC_CPU_BUILD
12
13#if AC_USE_HIP
14#include <string.h> // OM: At least with ROCm 7.2.1 and rocPRIM 7.2.0 on Fedora 44 rocPRIM sources
15 // fail to compile due to missing declaration of memset. The error is quite
16 // curious because the header does correctly include <cstring> but seems like
17 // including the C header is necessary.
18#include <hip/hip_runtime.h> // Needed in files that include kernels
19#include <rocprim/rocprim.hpp>
20#include <hip/hip_cooperative_groups.h>
21
22#include <rocprim/rocprim_version.hpp>
23#if ROCPRIM_VERSION >= 400000
24#define rocprim__warpSize() rocprim::arch::wavefront::min_size()
25#else
26#define rocprim__warpSize() rocprim::device_warp_size()
27#endif
28#else
29#include <cooperative_groups.h>
30#endif
31
32#endif