SWDEV-453422: introduce warp sync tests
The following builtins are tested:
- __all_sync, __any_sync, __ballot_sync and __activemask
- __match_any_sync and __match_all_sync
- __shfl_sync, __shfl_up_sync, __shfl_down_sync, and __shfl_xor_sync
The tests for shfl (all variants) were manually validated on a CUDA setup.
NOTE:
- Unit_hipVoteSync_All temporarily disabled on Windows (SWDEV-452308).
- All new tests temporarily disabled on CUDA (SWDEV-453145).
Change-Id: I84b205a88aa24219d199c760793e2f19f0cf8f13
[ROCm/hip-tests commit: 53f0a9bd01]
This commit is contained in:
کامیت شده توسط
Rakesh Roy
والد
a27e1a5aa1
کامیت
ec1f43cd05
@@ -170,6 +170,21 @@ static void initHipCtx(hipCtx_t* pcontext) {
|
||||
#define HIP_ARRAY hipArray_t
|
||||
#endif
|
||||
|
||||
static inline int getWarpSize() {
|
||||
#if HT_NVIDIA
|
||||
return 32;
|
||||
#elif HT_AMD
|
||||
int device = -1;
|
||||
int warpSize = -1;
|
||||
HIP_CHECK(hipGetDevice(&device));
|
||||
HIP_CHECK(hipDeviceGetAttribute(&warpSize, hipDeviceAttributeWarpSize, device));
|
||||
return warpSize;
|
||||
#else
|
||||
std::cout<<"Have to be either Nvidia or AMD platform, asserting"<<std::endl;
|
||||
assert(false);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool IsGfx11() {
|
||||
#if HT_NVIDIA
|
||||
return false;
|
||||
|
||||
مرجع در شماره جدید
Block a user