diff --git a/tests/src/runtimeApi/event/hipEventElapsedTime.cpp b/tests/src/runtimeApi/event/hipEventElapsedTime.cpp index 36e37d21fb..d4207332e1 100644 --- a/tests/src/runtimeApi/event/hipEventElapsedTime.cpp +++ b/tests/src/runtimeApi/event/hipEventElapsedTime.cpp @@ -61,14 +61,14 @@ void NegativeTests(){ hipEvent_t start; HIPCHECK(hipEventCreate(&start)); + HIPCHECK(hipEventRecord(start, nullptr)); + HIPCHECK(hipEventSynchronize(start)); + // create event on dev=1 HIPCHECK(hipSetDevice(1)); hipEvent_t stop; HIPCHECK(hipEventCreate(&stop)); - HIPCHECK(hipEventRecord(start, nullptr)); - HIPCHECK(hipEventSynchronize(start)); - HIPCHECK(hipEventRecord(stop, nullptr)); HIPCHECK(hipEventSynchronize(stop));