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

Turbo over Vector of DateTimes #340

Merged
merged 3 commits into from
Sep 24, 2021
Merged

Conversation

hayesall
Copy link
Contributor

Image previewing below.


image

@codecov
Copy link

codecov bot commented Sep 24, 2021

Codecov Report

Merging #340 (a9251a9) into master (17bd1ed) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #340      +/-   ##
==========================================
- Coverage   89.07%   89.06%   -0.02%     
==========================================
  Files          38       38              
  Lines        9275     9275              
==========================================
- Hits         8262     8261       -1     
- Misses       1013     1014       +1     
Impacted Files Coverage Δ
src/codegen/lower_compute.jl 91.58% <0.00%> (-0.25%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 17bd1ed...a9251a9. Read the comment docs.

@chriselrod
Copy link
Member

I think this looks good.
I'd just like to see an @inbounds on the sequential version and updated benchmarks.
If you don't have AVX512, I don't expect to see too much of an improvement from @inbounds because LLVM does not handle the conversion from Int64 to Float64 well.

@hayesall
Copy link
Contributor Author

Benchmarks ran on my i7-4770k, which (I'm pretty sure) has AVX instructions.

By the way, what did you use for generating the GFLOPS vs. size plots (like this one)?

@chriselrod
Copy link
Member

chriselrod commented Sep 24, 2021

Benchmarks ran on my i7-4770k, which (I'm pretty sure) has AVX instructions.

Yes, AVX, FMA, and AVX2.

By the way, what did you use for generating the GFLOPS vs. size plots (like this one)?

The code is in the benchmark directory. The script to run the benchmarks is in driver.jl
plotbenchmark.jl has the code calling plot and specifying colors to be consistant.

For actually counting flops, I just did that analytically.
Integer subtraction technically isn't a floating point operation, but you could just use 2*length(data) (subtract, divide/multiply) or 3*length(data) (also count the conversion) and call it something like "OPS" (leaving off the "F").

The code running the benchmarks and recording the flops is here:
https://github.com/JuliaSIMD/LoopVectorization.jl/blob/master/benchmark/benchmarkflops.jl
but it is a mess / not something I'd recommend emulating.

More generally, you could measure GFLOPS by removing @turbo and using https://github.com/triscale-innov/GFlops.jl (noting again that it probably won't count things like integer ops).

@chriselrod chriselrod enabled auto-merge (squash) September 24, 2021 19:41
@chriselrod chriselrod merged commit 74c0093 into JuliaSIMD:master Sep 24, 2021
@hayesall hayesall deleted the time_docs branch September 24, 2021 20:32
@chriselrod
Copy link
Member

You're welcome to make another PR to add a GFLOPS plot, but I figured there was no reason to hold this one up.

Thanks for the contribution!

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