SWDEV-453145 - Enable _sync tests on nvidia
* _sync tests that use warp match functions (__match_any_sync and __match_all_sync) were disabled for nvidia because those functions are supported only on devices with compute capability 7.x or higher. In this solution, tests are always build (with specifying appropriate compile flag) and in in the runtime it is decided weather they should be skipped or not.
Change-Id: Ifa9e55f3b47aa3a00027cb986cd6ae46aed45ebd
[ROCm/hip-tests commit: 9893726343]
Bu işleme şunda yer alıyor:
işlemeyi yapan:
Rakesh Roy
ebeveyn
dcdfa4c367
işleme
0c255ac97f
@@ -313,6 +313,20 @@ inline bool isImageSupported() {
|
||||
return imageSupport != 0;
|
||||
}
|
||||
|
||||
inline bool areWarpMatchFunctionsSupported() {
|
||||
int matchFunctionsSupported = 1;
|
||||
#if HT_NVIDIA
|
||||
int device;
|
||||
hipDeviceProp_t prop;
|
||||
HIP_CHECK(hipGetDevice(&device));
|
||||
HIP_CHECK(hipGetDeviceProperties(&prop, device));
|
||||
if (prop.major < 7) {
|
||||
matchFunctionsSupported = 0;
|
||||
}
|
||||
#endif
|
||||
return matchFunctionsSupported != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Causes the test to stop and be skipped at runtime.
|
||||
* reason: Message describing the reason the test has been skipped.
|
||||
@@ -485,6 +499,14 @@ class BlockingContext {
|
||||
return; \
|
||||
}
|
||||
|
||||
// This must be called in the beginning of warp test app's main() to indicate warp match functions
|
||||
// are supported.
|
||||
#define CHECK_WARP_MATCH_FUNCTIONS_SUPPORT \
|
||||
if (!HipTest::areWarpMatchFunctionsSupported()) { \
|
||||
INFO("Warp Match Functions are not support on the device. Skipped."); \
|
||||
return; \
|
||||
}
|
||||
|
||||
// Call GENERATE_CAPTURE macro at the start of the test, before using BEGIN/END_CAPTURE.
|
||||
// Use BEGIN/END_CAPTURE macros to execute APIs in both stream capturing and non-capturing modes.
|
||||
// Place BEGIN_CAPTURE before the API call and END_CAPTURE after the call.
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle