Catch2 Test Fixes (#2961)

* test fixes

* address PR comment

* PR comment fixing Nvidia pass

* add additional kernel launch checks

* pr comments
Cette révision appartient à :
Paulius Velesko
2022-10-01 01:07:25 +03:00
révisé par GitHub
Parent 609edf1c9e
révision da453211ed
94 fichiers modifiés avec 177 ajouts et 34 suppressions
+3 -2
Voir le fichier
@@ -80,6 +80,7 @@ void test(unsigned testMask, int* C_d, int* C_h, int64_t numElements, hipStream_
HIP_CHECK(hipEventRecord(start, stream));
hipLaunchKernelGGL(HipTest::addCountReverse, dim3(blocks), dim3(threadsPerBlock), 0, stream,
static_cast<const int*>(C_d), C_h, numElements, count);
HIP_CHECK(hipGetLastError());
HIP_CHECK(hipEventRecord(stop, stream));
if (waitStart) {
@@ -111,7 +112,7 @@ void test(unsigned testMask, int* C_d, int* C_h, int64_t numElements, hipStream_
REQUIRE(false);
}
if (e == hipSuccess) assert(t == 0.0f);
if (e == hipSuccess) HIP_ASSERT(t == 0.0f);
// stop usually ready unless we skipped the synchronization (syncNone)
e = hipEventElapsedTime(&t, stop, stop);
@@ -137,7 +138,7 @@ void test(unsigned testMask, int* C_d, int* C_h, int64_t numElements, hipStream_
HIP_ASSERT(hipEventElapsedTime(&t, start, neverCreated) == hipErrorInvalidHandle);
HIP_ASSERT(hipEventElapsedTime(&t, neverRecorded, stop) == hipErrorInvalidHandle);
HIP_ASSERT(hipEventElapsedTime(&t, start, neverRecorded) == hipErrorInvalidHandle);
HIP_ASSERT(hipGetLastError() == hipErrorInvalidHandle);
}
HIP_CHECK(hipEventDestroy(neverRecorded));
+1 -1
Voir le fichier
@@ -65,7 +65,7 @@ TEST_CASE("Unit_hipEventIpc") {
hipLaunchKernelGGL(HipTest::vectorADD, dim3(blocks), dim3(threadsPerBlock), 0, 0,
static_cast<const float*>(A_d), static_cast<const float*>(B_d), C_d, N);
HIP_CHECK(hipGetLastError());
HIP_CHECK(hipEventRecord(stop, NULL));
HIP_CHECK(hipEventSynchronize(stop));
+1 -1
Voir le fichier
@@ -88,7 +88,7 @@ TEST_CASE("Unit_hipEventRecord") {
HipTest::launchKernel<float>(HipTest::vectorADD<float>, blocks, 1, 0, 0,
static_cast<const float*>(A_d), static_cast<const float*>(B_d),
C_d, N);
HIP_CHECK(hipGetLastError());
HIP_CHECK(hipEventRecord(stop, NULL));
HIP_CHECK(hipEventSynchronize(stop));
long long hostStop = HipTest::get_time();