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 à :
@@ -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));
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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();
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur