-
Notifications
You must be signed in to change notification settings - Fork 133
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
[Bit identity] Introducing tester3 #124
Conversation
This tester checks if the returned values from two implementations are bit-identical. This test is quick since it does not need libmpfr. This patch is a part of implemention of #47 In the future patches, some tests with tester will be substituted with testing with tester3. For example, once the AVX2 implementation is tested with tester, AVX2128 can be testing with tester3.
…ll be substituted with tester3. By turning on SLEEF_TEST_ALL_IUT option, all implementations are tested against libmpfr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be activate on Travis. Could you please make sure it runs on it?
@@ -0,0 +1,27 @@ | |||
// Copyright Naoki Shibata 2010 - 2017. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why splitting this into main file and separate file? There is no I/O going on here as far as I can tell.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since tester3.c is compiled with options for enabling usage of vector extensions turned on, there is always possibility that the compiler generates instructions with that vector extension even without using intrinsics. In that case, the whole program crashes if that extension is not available on the computer. In our case, we want to make the testing succeed in that case, so the main function has to be separated and compiled without vector extension.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is already running on travis.
add_test(NAME ${TARGET_IUT${SIMD}} | ||
COMMAND ${TARGET_TESTER} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TARGET_IUT${SIMD}}) | ||
list(FIND SKIP_TEST ${SIMD} INDEX_SKIP_TEST) | ||
if (INDEX_SKIP_TEST EQUAL -1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is going on here? Why do you want to turn off the regular tester when you are building the tester3 executables? Is this something you just did for debug, to skip running the iutsimd tests because it takes too long for them to complete?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since tester3 checks if the computation of the given two implementations are all same, it should be enough to check only one of them using the original tester. I am going to add more implementations with different bit lengths, and I think testing will take too much time without doing like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you see, there is an option SLEEF_TEST_ALL_IUT. By turning this on, all implementations are checked by the original tester. I believe it is reasonable to test all of them only occasionally.
@fpetrogalli-arm Do you still have any concern in introducing tester3? Is it better to start discussing development plan for version 3.3? |
This tester checks if the returned values from two implementations are bit-identical. This test is quick since it does not need libmpfr.
This patch is a part of implemention of #47