EXSWHTEC-15 - Implement additional HipEventElapsedTime tests (#2903)

- Fix minor bug in helper test function in Unit_hipEvent.cc
- Move negative test from Unit_hipEventElapsedTime_DifferentDevices to Unit_hipEventRecord_Negative
- Add Unit_hipEventElapsedTime_NotReady_Negative test when function is called on event that has not been completed
This commit is contained in:
nives-vukovic
2022-09-26 10:17:12 +02:00
committed by GitHub
parent 51a22bb085
commit f72a34b807
3 changed files with 63 additions and 9 deletions
+2 -1
View File
@@ -114,7 +114,8 @@ void test(unsigned testMask, int* C_d, int* C_h, int64_t numElements, hipStream_
if (e == hipSuccess) assert(t == 0.0f);
// stop usually ready unless we skipped the synchronization (syncNone)
HIP_ASSERT(hipEventElapsedTime(&t, stop, stop) == expectedStopError);
e = hipEventElapsedTime(&t, stop, stop);
HIP_ASSERT(e == expectedStopError);
if (e == hipSuccess) assert(t == 0.0f);
e = hipEventElapsedTime(&t, start, stop);