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

SIMD regression tests #13777

Closed
wants to merge 6 commits into from
Closed

Conversation

damiendr
Copy link
Contributor

Implements the following:

@pao pao changed the title Damiendr/simdtests SIMD regression tests Oct 26, 2015
@kshyatt kshyatt added the test This change adds or pertains to unit tests label Oct 26, 2015
@simonster
Copy link
Member

One possible problem here is that, if these tests are run on an architecture without SIMD instructions, or where LLVM thinks use of SIMD for some of these cases is possible but not profitable, they will fail. I'm not sure what the right solution is here.

@jrevels jrevels mentioned this pull request Nov 6, 2015
4 tasks
@jrevels jrevels added the potential benchmark Could make a good benchmark in BaseBenchmarks label Nov 17, 2015
jrevels added a commit to JuliaCI/BaseBenchmarks.jl that referenced this pull request Jan 26, 2016
@jrevels jrevels removed the potential benchmark Could make a good benchmark in BaseBenchmarks label Jan 26, 2016
@KristofferC
Copy link
Member

Can someone remind me what the problem here was?

Basically every time there is a performance regression the generated code explodes in size. Being able to check generated code seems like it could catch many problems at C.I time instead of "when someone notices it weeks down the road"-time. Issues like: #15274, #16185 should in my view have codegen tests.

@StefanKarpinski
Copy link
Member

+1 to codegen tests. The simplest thing I can think of is having a test that the number of instructions emitted is less than some fixed threshold. If that fails, then we can investigate and either fix the issue or bump the limit if the generated code is still ok just unexpectedly verbose (e.g. some kind of unrolling).

@damiendr
Copy link
Contributor Author

damiendr commented May 5, 2016

@KristofferC In that particular case the test was to check for a "vector" keyword in the LLVM IR returned by code_llvm. The problem was that the IR varied depending on the processor type, causing some of the tests to fail on some of the (older) CI machines.
At the time I did not investigate further because it seemed like all SIMD codegen tests would need a whitelist of CPU types and that seemed hard to write and maintain. But for other types of codegen tests it might be possible to find a suitable invariant feature to test for, I suppose!

@mbauman mbauman added the compiler:simd instruction-level vectorization label Apr 24, 2018
@musm
Copy link
Contributor

musm commented Dec 11, 2020

According to #13686 (comment) it sounds like the current test suite is sufficient.

@musm musm closed this Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:simd instruction-level vectorization test This change adds or pertains to unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants