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

Random number generator: cpu/gpu #97

Closed
navidcy opened this issue Aug 27, 2020 · 2 comments
Closed

Random number generator: cpu/gpu #97

navidcy opened this issue Aug 27, 2020 · 2 comments
Labels

Comments

@navidcy
Copy link
Member

navidcy commented Aug 27, 2020

If dev=GPU() I think what this does is that it creates random numbers on CPU and transfers then to GPU

ξ = ArrayType(dev)(exp.(2π*im*rand(eltype(grid), size(sol)))/sqrt(clock.dt))

Is this true? If so, we want to be creating the random numbers on the GPU itself, e.g.,

Random.rand(CURAND.default_rng(), Float32, 1)

?

@glwagner
Copy link
Member

Yes definitely. When this example was written, random number generators on the GPU were not available. Let's update it.

@navidcy
Copy link
Member Author

navidcy commented Apr 14, 2021

Closed by #225.

@navidcy navidcy closed this as completed Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants