-
Notifications
You must be signed in to change notification settings - Fork 6
Add Statistics in KA, (only mean and var implemented) #64
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
base: main
Are you sure you want to change the base?
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)
end being 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") |
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.
Not removing the last newline character of the file (here and everywhere else) would be nice.
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.
ah yeah
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.