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

[Bit identity] Introducing tester3 #124

Closed
wants to merge 7 commits into from
Closed

Conversation

shibatch
Copy link
Owner

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

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.
Copy link
Collaborator

@fpetrogalli fpetrogalli left a 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.
Copy link
Collaborator

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.

Copy link
Owner Author

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.

Copy link
Owner Author

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.

https://travis-ci.org/shibatch/sleef/jobs/317591746

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)
Copy link
Collaborator

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?

Copy link
Owner Author

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.

Copy link
Owner Author

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 fpetrogalli mentioned this pull request Jan 18, 2018
@shibatch
Copy link
Owner Author

@fpetrogalli-arm Do you still have any concern in introducing tester3?
This implementation of tester3 only checks small arguments for trigonometric functions, but this limitation will be removed once the scalar functions based on SIMD implementation will be implemented.

Is it better to start discussing development plan for version 3.3?
I think the plan towards 3.3 will be pretty complicated.

@shibatch shibatch closed this Jul 8, 2018
@shibatch shibatch deleted the Introducing_tester3 branch July 20, 2018 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants