Skip to content

Commit 79b50d7

Browse files
authored
Merge pull request #2547 from RossBrunton/ross/timerstrict
Be less strict with timer test
2 parents afbb289 + cf0c1f0 commit 79b50d7

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

test/conformance/device/urDeviceGetGlobalTimestamps.cpp

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
// - Currently we are saying the error between host/device
1515
// - timers is 0.5%
1616
constexpr double allowedTimerError = 0.005;
17-
constexpr size_t delayTimerMultiplier = 100;
1817

1918
/// @brief Return the absolute difference between two numeric values.
2019
/// @tparam T An numeric type.
@@ -56,17 +55,8 @@ TEST_P(urDeviceGetGlobalTimestampTest, SuccessNoTimers) {
5655
}
5756

5857
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"});
7060

7161
uint64_t deviceStartTime = 0, deviceEndTime = 0;
7262
uint64_t hostStartTime = 0, hostEndTime = 0;
@@ -82,7 +72,7 @@ TEST_P(urDeviceGetGlobalTimestampTest, SuccessSynchronizedTime) {
8272
ASSERT_GE(hostOnlyStartTime, hostStartTime);
8373

8474
// 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));
8676

8777
ASSERT_SUCCESS(
8878
urDeviceGetGlobalTimestamps(device, &deviceEndTime, &hostEndTime));

0 commit comments

Comments
 (0)