From 1e8292733cc4897238f5d868e255cb7dc1ddf526 Mon Sep 17 00:00:00 2001 From: lthakur007 Date: Mon, 16 Mar 2020 14:55:19 +0530 Subject: [PATCH] Added --verify flag in the makefile to enable result verification and changed Passed/Failed to PASSED/FAILED for local log analysis requirement. --- .../BinomialOption/BinomialOption.cpp | 4 ++-- .../BinomialOption/Makefile | 2 +- .../BitonicSort/BitonicSort.cpp | 4 ++-- .../BitonicSort/Makefile | 2 +- .../FastWalshTransform/FastWalshTransform.cpp | 4 ++-- .../FastWalshTransform/Makefile | 2 +- .../FloydWarshall/FloydWarshall.cpp | 4 ++-- .../FloydWarshall/Makefile | 2 +- .../HelloWorld/HelloWorld.cpp | 2 +- HIP-Examples-Applications/HelloWorld/Makefile | 2 +- .../Histogram/Histogram.cpp | 4 ++-- HIP-Examples-Applications/Histogram/Makefile | 2 +- .../MatrixMultiplication/Makefile | 2 +- .../MatrixMultiplication.cpp | 4 ++-- HIP-Examples-Applications/PrefixSum/Makefile | 2 +- .../PrefixSum/PrefixSum.cpp | 4 ++-- .../RecursiveGaussian/Makefile | 2 +- .../RecursiveGaussian/RecursiveGaussian.cpp | 4 ++-- .../RecursiveGaussian_Output.bmp | Bin 786486 -> 786486 bytes .../SimpleConvolution/Makefile | 2 +- .../SimpleConvolution/SimpleConvolution.cpp | 8 ++++---- HIP-Examples-Applications/dct/Makefile | 2 +- HIP-Examples-Applications/dct/dct.cpp | 4 ++-- HIP-Examples-Applications/dwtHaar1D/Makefile | 2 +- .../dwtHaar1D/dwtHaar1D.cpp | 4 ++-- 25 files changed, 37 insertions(+), 37 deletions(-) diff --git a/HIP-Examples-Applications/BinomialOption/BinomialOption.cpp b/HIP-Examples-Applications/BinomialOption/BinomialOption.cpp index 1b9bc10..035ffb4 100644 --- a/HIP-Examples-Applications/BinomialOption/BinomialOption.cpp +++ b/HIP-Examples-Applications/BinomialOption/BinomialOption.cpp @@ -560,12 +560,12 @@ int BinomialOption::verifyResults() // compare the results and see if they match if(compare(output, refOutput, numSamples, 0.001f)) { - std::cout << "Passed!\n" << std::endl; + std::cout << "PASSED!\n" << std::endl; return SDK_SUCCESS; } else { - std::cout <<" Failed\n" << std::endl; + std::cout <<" FAILED\n" << std::endl; std::cout <<"\n\n\nNo. Output Output(hex) Refoutput Refoutput(hex)\n"; for(int i = 0; i < numSamples; ++i) diff --git a/HIP-Examples-Applications/BinomialOption/Makefile b/HIP-Examples-Applications/BinomialOption/Makefile index 2f11d87..755ca82 100644 --- a/HIP-Examples-Applications/BinomialOption/Makefile +++ b/HIP-Examples-Applications/BinomialOption/Makefile @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS) test: $(EXECUTABLE) - $(EXECUTABLE) + $(EXECUTABLE) --verify clean: diff --git a/HIP-Examples-Applications/BitonicSort/BitonicSort.cpp b/HIP-Examples-Applications/BitonicSort/BitonicSort.cpp index cdfda90..9d7a896 100644 --- a/HIP-Examples-Applications/BitonicSort/BitonicSort.cpp +++ b/HIP-Examples-Applications/BitonicSort/BitonicSort.cpp @@ -567,12 +567,12 @@ int BitonicSort::verifyResults() // compare the results and see if they match if(memcmp(input, verificationInput, length*sizeof(unsigned int)) == 0) { - std::cout<<"Passed!\n" << std::endl; + std::cout<<"PASSED!\n" << std::endl; return SDK_SUCCESS; } else { - std::cout<<"Failed\n" << std::endl; + std::cout<<"FAILED\n" << std::endl; return SDK_FAILURE; } diff --git a/HIP-Examples-Applications/BitonicSort/Makefile b/HIP-Examples-Applications/BitonicSort/Makefile index 6c62bad..e90b006 100644 --- a/HIP-Examples-Applications/BitonicSort/Makefile +++ b/HIP-Examples-Applications/BitonicSort/Makefile @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS) test: $(EXECUTABLE) - $(EXECUTABLE) + $(EXECUTABLE) --verify clean: diff --git a/HIP-Examples-Applications/FastWalshTransform/FastWalshTransform.cpp b/HIP-Examples-Applications/FastWalshTransform/FastWalshTransform.cpp index 68ffe56..fee9236 100644 --- a/HIP-Examples-Applications/FastWalshTransform/FastWalshTransform.cpp +++ b/HIP-Examples-Applications/FastWalshTransform/FastWalshTransform.cpp @@ -390,12 +390,12 @@ FastWalshTransform::verifyResults() // compare the results and see if they match if(compare(output, verificationInput, length)) { - std::cout << "Passed!\n" << std::endl; + std::cout << "PASSED!\n" << std::endl; return SDK_SUCCESS; } else { - std::cout << "Failed\n" << std::endl; + std::cout << "FAILED\n" << std::endl; return SDK_FAILURE; } } diff --git a/HIP-Examples-Applications/FastWalshTransform/Makefile b/HIP-Examples-Applications/FastWalshTransform/Makefile index ee7c21a..6eb618e 100644 --- a/HIP-Examples-Applications/FastWalshTransform/Makefile +++ b/HIP-Examples-Applications/FastWalshTransform/Makefile @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS) test: $(EXECUTABLE) - $(EXECUTABLE) + $(EXECUTABLE) --verify clean: diff --git a/HIP-Examples-Applications/FloydWarshall/FloydWarshall.cpp b/HIP-Examples-Applications/FloydWarshall/FloydWarshall.cpp index 3fa9f1d..b8564a2 100644 --- a/HIP-Examples-Applications/FloydWarshall/FloydWarshall.cpp +++ b/HIP-Examples-Applications/FloydWarshall/FloydWarshall.cpp @@ -584,12 +584,12 @@ int FloydWarshall::verifyResults() if(memcmp(pathDistanceMatrix, verificationPathDistanceMatrix, numNodes*numNodes*sizeof(unsigned int)) == 0) { - std::cout << "Passed!\n" << std::endl; + std::cout << "PASSED!\n" << std::endl; return SDK_SUCCESS; } else { - std::cout << "Failed\n" << std::endl; + std::cout << "FAILED\n" << std::endl; return SDK_FAILURE; } } diff --git a/HIP-Examples-Applications/FloydWarshall/Makefile b/HIP-Examples-Applications/FloydWarshall/Makefile index 30a5f98..0cd94f7 100644 --- a/HIP-Examples-Applications/FloydWarshall/Makefile +++ b/HIP-Examples-Applications/FloydWarshall/Makefile @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS) test: $(EXECUTABLE) - $(EXECUTABLE) + $(EXECUTABLE) --verify clean: diff --git a/HIP-Examples-Applications/HelloWorld/HelloWorld.cpp b/HIP-Examples-Applications/HelloWorld/HelloWorld.cpp index 07c07a4..6180287 100644 --- a/HIP-Examples-Applications/HelloWorld/HelloWorld.cpp +++ b/HIP-Examples-Applications/HelloWorld/HelloWorld.cpp @@ -80,6 +80,6 @@ int main(int argc, char* argv[]) free(output); - std::cout<<"Passed!\n"; + std::cout<<"PASSED!\n"; return SUCCESS; } diff --git a/HIP-Examples-Applications/HelloWorld/Makefile b/HIP-Examples-Applications/HelloWorld/Makefile index 216762a..8f936db 100644 --- a/HIP-Examples-Applications/HelloWorld/Makefile +++ b/HIP-Examples-Applications/HelloWorld/Makefile @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS) test: $(EXECUTABLE) - $(EXECUTABLE) + $(EXECUTABLE) --verify clean: diff --git a/HIP-Examples-Applications/Histogram/Histogram.cpp b/HIP-Examples-Applications/Histogram/Histogram.cpp index 6c6a07b..7167e33 100644 --- a/HIP-Examples-Applications/Histogram/Histogram.cpp +++ b/HIP-Examples-Applications/Histogram/Histogram.cpp @@ -419,12 +419,12 @@ Histogram::verifyResults() if(result) { - std::cout << "Passed!\n" << std::endl; + std::cout << "PASSED!\n" << std::endl; return SDK_SUCCESS; } else { - std::cout << "Failed\n" << std::endl; + std::cout << "FAILED\n" << std::endl; return SDK_FAILURE; } } diff --git a/HIP-Examples-Applications/Histogram/Makefile b/HIP-Examples-Applications/Histogram/Makefile index 836b6d0..9ece147 100644 --- a/HIP-Examples-Applications/Histogram/Makefile +++ b/HIP-Examples-Applications/Histogram/Makefile @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS) test: $(EXECUTABLE) - $(EXECUTABLE) + $(EXECUTABLE) --verify clean: diff --git a/HIP-Examples-Applications/MatrixMultiplication/Makefile b/HIP-Examples-Applications/MatrixMultiplication/Makefile index 8b89dd4..713a9d8 100644 --- a/HIP-Examples-Applications/MatrixMultiplication/Makefile +++ b/HIP-Examples-Applications/MatrixMultiplication/Makefile @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS) test: $(EXECUTABLE) - $(EXECUTABLE) + $(EXECUTABLE) --verify clean: diff --git a/HIP-Examples-Applications/MatrixMultiplication/MatrixMultiplication.cpp b/HIP-Examples-Applications/MatrixMultiplication/MatrixMultiplication.cpp index d1cbaed..9f023d3 100644 --- a/HIP-Examples-Applications/MatrixMultiplication/MatrixMultiplication.cpp +++ b/HIP-Examples-Applications/MatrixMultiplication/MatrixMultiplication.cpp @@ -557,12 +557,12 @@ MatrixMultiplication::verifyResults() // compare the results and see if they match if(compare(output, verificationOutput, height0*width1)) { - std::cout<<"Passed!\n" << std::endl; + std::cout<<"PASSED!\n" << std::endl; return SDK_SUCCESS; } else { - std::cout<<"Failed\n" << std::endl; + std::cout<<"FAILED\n" << std::endl; return SDK_FAILURE; } } diff --git a/HIP-Examples-Applications/PrefixSum/Makefile b/HIP-Examples-Applications/PrefixSum/Makefile index 2119cb5..dddbc0c 100644 --- a/HIP-Examples-Applications/PrefixSum/Makefile +++ b/HIP-Examples-Applications/PrefixSum/Makefile @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS) test: $(EXECUTABLE) - $(EXECUTABLE) + $(EXECUTABLE) --verify clean: diff --git a/HIP-Examples-Applications/PrefixSum/PrefixSum.cpp b/HIP-Examples-Applications/PrefixSum/PrefixSum.cpp index dd7ab2b..5c62fee 100644 --- a/HIP-Examples-Applications/PrefixSum/PrefixSum.cpp +++ b/HIP-Examples-Applications/PrefixSum/PrefixSum.cpp @@ -549,12 +549,12 @@ int PrefixSum::verifyResults() float epsilon = length * 1e-7f; if(compare(out, verificationOutput, length, epsilon)) { - std::cout << "Passed!\n" << std::endl; + std::cout << "PASSED!\n" << std::endl; status = SDK_SUCCESS; } else { - std::cout << "Failed\n" << std::endl; + std::cout << "FAILED\n" << std::endl; status = SDK_FAILURE; } diff --git a/HIP-Examples-Applications/RecursiveGaussian/Makefile b/HIP-Examples-Applications/RecursiveGaussian/Makefile index defa4c9..0530a9e 100644 --- a/HIP-Examples-Applications/RecursiveGaussian/Makefile +++ b/HIP-Examples-Applications/RecursiveGaussian/Makefile @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS) test: $(EXECUTABLE) - $(EXECUTABLE) + $(EXECUTABLE) --verify clean: diff --git a/HIP-Examples-Applications/RecursiveGaussian/RecursiveGaussian.cpp b/HIP-Examples-Applications/RecursiveGaussian/RecursiveGaussian.cpp index 7e99bae..8f2a8de 100644 --- a/HIP-Examples-Applications/RecursiveGaussian/RecursiveGaussian.cpp +++ b/HIP-Examples-Applications/RecursiveGaussian/RecursiveGaussian.cpp @@ -680,14 +680,14 @@ RecursiveGaussian::verifyResults() width * height, (float)0.0001)) { - std::cout <<"Passed!\n" << std::endl; + std::cout <<"PASSED!\n" << std::endl; delete[] outputDevice; delete[] outputReference; return SDK_SUCCESS; } else { - std::cout << "Failed\n" << std::endl; + std::cout << "FAILED\n" << std::endl; delete[] outputDevice; delete[] outputReference; return SDK_FAILURE; diff --git a/HIP-Examples-Applications/RecursiveGaussian/RecursiveGaussian_Output.bmp b/HIP-Examples-Applications/RecursiveGaussian/RecursiveGaussian_Output.bmp index a2198f7e95f6146981d860596ff38e950d9422dd..8cee66251692d8a2fb4db9aa0428f11a3527cee9 100644 GIT binary patch delta 728 zcmXBSTS$`u6bEq5_U-$&eVW5mRJ_czn!9)pN~wvL2RC&~=e%rg+RWO#g?O1$r@4e& zxpLD!v@lcDh%95`5z4}#9_lF(gy=%qV?sel5>(#`ew>H%@aGTbtPZBF4yG;d7@^$% z#pnzHgWuBZ2!Uz;hu+=;Q01?2KgxxCU&7KsfBb6&>C4{<^_$+5hC;o6X=hsuJvdB& z@gjKf^Dt;AIFA{l@HQN-WAGg0rGf*so6s5uZhZC)5=e03r#(0&g#i>Na9V^=%Xnm* zR5*iAWt;-jq3ZS`L%Z705l|aYT-#A%>MSvLmHwlt!z4Gy6bWi{&2lEA;S$EKb7F^} zp2<;i6QKdkO0L@;eAhL;=<+SNy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