Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added --verify flag in the makefile to enable result verification and… #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions HIP-Examples-Applications/BinomialOption/BinomialOption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion HIP-Examples-Applications/BinomialOption/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS)


test: $(EXECUTABLE)
$(EXECUTABLE)
$(EXECUTABLE) --verify


clean:
Expand Down
4 changes: 2 additions & 2 deletions HIP-Examples-Applications/BitonicSort/BitonicSort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion HIP-Examples-Applications/BitonicSort/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS)


test: $(EXECUTABLE)
$(EXECUTABLE)
$(EXECUTABLE) --verify


clean:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion HIP-Examples-Applications/FastWalshTransform/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS)


test: $(EXECUTABLE)
$(EXECUTABLE)
$(EXECUTABLE) --verify


clean:
Expand Down
4 changes: 2 additions & 2 deletions HIP-Examples-Applications/FloydWarshall/FloydWarshall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion HIP-Examples-Applications/FloydWarshall/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS)


test: $(EXECUTABLE)
$(EXECUTABLE)
$(EXECUTABLE) --verify


clean:
Expand Down
2 changes: 1 addition & 1 deletion HIP-Examples-Applications/HelloWorld/HelloWorld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ int main(int argc, char* argv[])

free(output);

std::cout<<"Passed!\n";
std::cout<<"PASSED!\n";
return SUCCESS;
}
2 changes: 1 addition & 1 deletion HIP-Examples-Applications/HelloWorld/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS)


test: $(EXECUTABLE)
$(EXECUTABLE)
$(EXECUTABLE) --verify


clean:
Expand Down
4 changes: 2 additions & 2 deletions HIP-Examples-Applications/Histogram/Histogram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion HIP-Examples-Applications/Histogram/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS)


test: $(EXECUTABLE)
$(EXECUTABLE)
$(EXECUTABLE) --verify


clean:
Expand Down
2 changes: 1 addition & 1 deletion HIP-Examples-Applications/MatrixMultiplication/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS)


test: $(EXECUTABLE)
$(EXECUTABLE)
$(EXECUTABLE) --verify


clean:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion HIP-Examples-Applications/PrefixSum/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS)


test: $(EXECUTABLE)
$(EXECUTABLE)
$(EXECUTABLE) --verify


clean:
Expand Down
4 changes: 2 additions & 2 deletions HIP-Examples-Applications/PrefixSum/PrefixSum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion HIP-Examples-Applications/RecursiveGaussian/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS)


test: $(EXECUTABLE)
$(EXECUTABLE)
$(EXECUTABLE) --verify


clean:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion HIP-Examples-Applications/SimpleConvolution/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS)


test: $(EXECUTABLE)
$(EXECUTABLE)
$(EXECUTABLE) --verify


clean:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,24 +545,24 @@ int SimpleConvolution::verifyResults()
// compare the results and see if they match
if(memcmp(output, verificationOutput, height*width*sizeof(int)) == 0)
{
std::cout<<"Passed!\n" << std::endl;
std::cout<<"PASSED!\n" << std::endl;
}
else
{
std::cout<<"Failed\n" << std::endl;
std::cout<<"FAILED\n" << std::endl;
return SDK_FAILURE;
}

std::cout << "Verifying Separable Convolution Kernel result - ";
// compare the results and see if they match
if(memcmp(outputSep, verificationOutput, height*width*sizeof(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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion HIP-Examples-Applications/dct/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS)


test: $(EXECUTABLE)
$(EXECUTABLE)
$(EXECUTABLE) --verify


clean:
Expand Down
4 changes: 2 additions & 2 deletions HIP-Examples-Applications/dct/dct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,12 +640,12 @@ int DCT::verifyResults()
// compare the results and see if they match
if(compare(output, verificationOutput, width*height))
{
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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion HIP-Examples-Applications/dwtHaar1D/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $(EXECUTABLE): $(OBJECTS)


test: $(EXECUTABLE)
$(EXECUTABLE)
$(EXECUTABLE) --verify


clean:
Expand Down
4 changes: 2 additions & 2 deletions HIP-Examples-Applications/dwtHaar1D/dwtHaar1D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -625,12 +625,12 @@ DwtHaar1D::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;
}
}
Expand Down