Add __device__ specifier to HIP's warpSize constexpr variable
The warpSize variable is set to the value of the __AMDGCN_WAVEFRONT_SIZE macro, which is a meaningless default in host code. The resolution for SWDEV-449015 will introduce diagnostics for uses of this macro in host code, which includes the current definition of the warpSize variable. With the __device__ specifier, the definition of the warpSize variable will not cause these diagnostics. This change does not stop the variable from being used in host code since clang intentionally does not diagnose uses of __device__ constexpr variables in host code. Change-Id: I0317217affe94fdf2dfd9ad0f134e68f5173245f
This commit is contained in:
zatwierdzone przez
Konstantin Zhuravlyov
rodzic
fa4c1a0206
commit
819e537dc5
@@ -73,6 +73,7 @@ __device__ static inline int __hip_move_dpp_N(int src) {
|
||||
bound_ctrl);
|
||||
}
|
||||
|
||||
__device__
|
||||
static constexpr int warpSize = __AMDGCN_WAVEFRONT_SIZE;
|
||||
|
||||
// warp vote function __all __any __ballot
|
||||
|
||||
Reference in New Issue
Block a user