Add Statistics in KA, (only mean and var implemented)#64
Add Statistics in KA, (only mean and var implemented)#64yolhan83 wants to merge 23 commits intoJuliaGPU:mainfrom
Conversation
|
note : some backend don't support f64, need to differ from Statistics in promoting integers |
|
could we have a preffered_float(backend) ? |
|
OneAPI 1.10 seems unrelated, var extremly slow on Metal ? |
|
Metal perf fixed |
|
sorry for all the commits I think its ok now |
|
cpu var is really slow, mainly due to for sl in eachslice(src,dims=dims)
sl .-= selectdim(m,dims,1)
endbeing slow when the dimension of the reduced dim is high. |
|
ok only thing missnig is nice cpu handling, gpu support any dimension now (even though feels bad to not use shared mem for this problem, we access |
|
fix #62 I guess |
|
yes trying to go through the CPU bad var before its ok to review |
|
changing var alg completly to use https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Parallel_algorithm |
|
ok now ready to review :) |
test/runtests.jl
Outdated
| include("accumulate.jl") | ||
| include("predicates.jl") | ||
| include("binarysearch.jl") | ||
| include("binarysearch.jl") No newline at end of file |
There was a problem hiding this comment.
Not removing the last newline character of the file (here and everywhere else) would be nice.
There was a problem hiding this comment.
If you look at https://github.com/JuliaGPU/AcceleratedKernels.jl/pull/64/files you'll easily spot other files with missing ending newline (github highlights them with a special symbol). I believe vscode by default does this idiotic thing of removing the last newline, which makes very easy to guess that someone is using that editor. I hope there's an option to stop it doing stupid things.
There was a problem hiding this comment.
no more symbols, I also removed non implemented statistics files for now, we will add them as they are implemented I think
This PR adds mean and var to KA, I also added the files for implementing the rest if you don't think it should be there don't hesitate.
PS : to implement median, we should first implement partialsort (and even multi dim partialsort), hopping the sort-pro here can do it.