-
Notifications
You must be signed in to change notification settings - Fork 141
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
Add docs and regressions tests for SIMD vectorization of simple dual number operations #152
Conversation
@@ -34,3 +34,10 @@ println("Testing miscellaneous functionality...") | |||
tic() | |||
include("MiscTest.jl") | |||
println("done (took $(toq()) seconds).") | |||
|
|||
if Base.JLOptions().opt_level >= 3 && VERSION >= v"0.5" |
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.
@KristofferC Do you know what I should add to this conditional to disable these tests for users who won't get SIMD in the LLVM IR?
Also is there any point to me getting this to run on Travis, since Travis just downloads Julia binaries, or are these tests doomed to be local only?
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.
Could try to run the build sysimg.jl script first in .travis.yml file and then start the actual tests?
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.
Alright, attempted what you suggested. Let's see if Travis's infrastructure works for this...
@@ -8,6 +8,7 @@ notifications: | |||
sudo: false | |||
script: | |||
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi | |||
- julia -e 'Pkg.clone(pwd()); Pkg.build("ForwardDiff"); Pkg.test("ForwardDiff"; coverage=true)'; | |||
- if (julia -e 'VERSION < v"0.5" && exit(1)'); then julia -e 'include(joinpath(JULIA_HOME, Base.DATAROOTDIR, "julia", "build_sysimg.jl")); build_sysimg(force=true)'; fi | |||
- if (julia -e 'VERSION < v"0.5" && exit(1)'); then julia -O3 -e 'Pkg.clone(pwd()); Pkg.build("ForwardDiff"); Pkg.test("ForwardDiff"; coverage=true)'; else julia -O3 -e 'Pkg.clone(pwd()); Pkg.build("ForwardDiff"); Pkg.test("ForwardDiff"; coverage=true)'; fi |
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.
Is there a way to do a multiline command here to tidy this up, or would I have to call out to an external script to accomplish that?
EDIT: Looks like multiline conditionals in Travis scripts "just work": https://github.com/JuliaLang/julia/blob/master/.travis.yml#L65
d86480b
to
5dd63dd
Compare
Seems to work? Cool. Maybe the sysimg.jl build should be mentioned for users to get full benefit? |
Not yet, it's not actually hitting the SIMD tests :( It seems that
That's a good idea. |
Guess I should just do these things, but preserve the optimization level. |
If you want to see what Pkg.test does you can see it here: https://github.com/JuliaLang/julia/blob/3b5c9755b7e2b8f7b4e202ff2d4d3dc07d6decca/base/pkg/entry.jl#L714. Perhaps the -O option from the julia process calling |
To be explicit, it seems that you should use |
Beat you to it 😛 It'd be nice if |
a9b5741
to
27a4a92
Compare
Well at least now the SIMD tests are running. It seems like the CPU the job is running on supports SIMD, but it's not passing because it doesn't work with inlining off. Maybe we can do two separate runs, then, with the second one being just the SIMD tests and inlining on. |
Awesome, SIMD tests now run and pass on Travis! |
Great stuff. |
Closes #98.