Catch2 Test Fixes (#2961)

* test fixes

* address PR comment

* PR comment fixing Nvidia pass

* add additional kernel launch checks

* pr comments
This commit is contained in:
Paulius Velesko
2022-10-01 01:07:25 +03:00
zatwierdzone przez GitHub
rodzic 2c35e99c9d
commit c02b15fc7c
97 zmienionych plików z 183 dodań i 40 usunięć
@@ -26,7 +26,7 @@ THE SOFTWARE.
#include <fstream>
#include <regex>
#include <type_traits>
#define TOL 0.001
#define guarantee(cond, str) \
{ \
if (!(cond)) { \
@@ -45,7 +45,7 @@ size_t checkVectors(T* A, T* B, T* Out, size_t N, T (*F)(T a, T b), bool expectM
size_t mismatchesToPrint = 10;
for (size_t i = 0; i < N; i++) {
T expected = F(A[i], B[i]);
if (Out[i] != expected) {
if (std::fabs(Out[i] - expected) > TOL) {
if (mismatchCount == 0) {
firstMismatch = i;
}
@@ -270,6 +270,7 @@ void launchKernel(K kernel, Dim numBlocks, Dim numThreads, std::uint32_t memPerB
launchRTCKernel<Typenames...>(kernel, numBlocks, numThreads, memPerBlock, stream,
std::forward<Args>(packedArgs)...);
#endif
HIP_CHECK(hipGetLastError());
}
//---