Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

Specialized _var and _std functions #612

Merged
merged 4 commits into from
Mar 13, 2020
Merged

Conversation

jumerckx
Copy link
Contributor

I tried writing a CuArrays version for _var and _std which fixes #411.
@kshyatt mentioned the issue actually lies in centralize_sumabs2! but I'm not quite sure what that function does or how it should be done on gpu.
Perhaps this solution suffices?

@maleadt
Copy link
Member

maleadt commented Mar 9, 2020

Thanks! These definitions seems OK, if they execute without scalar iteration of course. Could you add some tests comparing against results with Base.Array?

@jumerckx
Copy link
Contributor Author

I added some, please let me know if these need changes or need to be expanded.

@@ -0,0 +1,16 @@
@testset "Statistics" begin

using CuArrays
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this import.

test/statistics.jl Outdated Show resolved Hide resolved
test/statistics.jl Show resolved Hide resolved
@jumerckx
Copy link
Contributor Author

I made the changes and also realized the tests hadn't actually been added to the runtests.jl so that's fixed as well 😅.
Let me know if it needs further changes.
Thanks for the guidance!

@maleadt
Copy link
Member

maleadt commented Mar 13, 2020

bors try

bors bot added a commit that referenced this pull request Mar 13, 2020
@bors
Copy link
Contributor

bors bot commented Mar 13, 2020

try

Build succeeded

@maleadt
Copy link
Member

maleadt commented Mar 13, 2020

Great, let's merge this. Thanks for the PR!

@maleadt maleadt merged commit 98ee4b3 into JuliaGPU:master Mar 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Statistics functions (var,std) slow
2 participants