14
14
// - Currently we are saying the error between host/device
15
15
// - timers is 0.5%
16
16
constexpr double allowedTimerError = 0.005 ;
17
- constexpr size_t delayTimerMultiplier = 100 ;
18
17
19
18
// / @brief Return the absolute difference between two numeric values.
20
19
// / @tparam T An numeric type.
@@ -56,17 +55,8 @@ TEST_P(urDeviceGetGlobalTimestampTest, SuccessNoTimers) {
56
55
}
57
56
58
57
TEST_P (urDeviceGetGlobalTimestampTest, SuccessSynchronizedTime) {
59
- UUR_KNOWN_FAILURE_ON (uur::CUDA{}, uur::HIP{}, uur::LevelZero{},
60
- uur::LevelZeroV2{}, uur::NativeCPU{},
61
- uur::OpenCL{" Intel(R) FPGA" },
62
- uur::OpenCL{" Intel(R) UHD Graphics 770" });
63
-
64
- // get the timer resolution of the device
65
- size_t deviceTimerResolutionNanoSecs = 0 ;
66
- ASSERT_SUCCESS (uur::GetDeviceProfilingTimerResolution (
67
- device, deviceTimerResolutionNanoSecs));
68
- size_t delayAmountNanoSecs =
69
- delayTimerMultiplier * deviceTimerResolutionNanoSecs;
58
+ // Returns `UR_RESULT_ERROR_INVALID_OPERATION`
59
+ UUR_KNOWN_FAILURE_ON (uur::OpenCL{" Intel(R) FPGA" });
70
60
71
61
uint64_t deviceStartTime = 0 , deviceEndTime = 0 ;
72
62
uint64_t hostStartTime = 0 , hostEndTime = 0 ;
@@ -82,7 +72,7 @@ TEST_P(urDeviceGetGlobalTimestampTest, SuccessSynchronizedTime) {
82
72
ASSERT_GE (hostOnlyStartTime, hostStartTime);
83
73
84
74
// wait for timers to increment
85
- std::this_thread::sleep_for (std::chrono::nanoseconds (delayAmountNanoSecs ));
75
+ std::this_thread::sleep_for (std::chrono::milliseconds ( 16 ));
86
76
87
77
ASSERT_SUCCESS (
88
78
urDeviceGetGlobalTimestamps (device, &deviceEndTime, &hostEndTime));
0 commit comments