We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Some of the examples need slight modifications/generalizations to be able to run on GPU by simply setting dev=GPU().
dev=GPU()
The text was updated successfully, but these errors were encountered:
This issue was brought up by @ranocha in his review.
The main reason for examples failing is plotting: when plotting one needs to bring the arrays on CPU. E.g.,
heatmap(x, y, ζ')
won't work if ζ is a CuArray and instead we need to call
ζ
CuArray
heatmap(x, y, collect(ζ)')
@glwagner any ideas what we can do here? Sprinkle collect() in all plotting commands in examples?
collect()
Sorry, something went wrong.
Or we can overload some plotting functions when we load GeophysicalFlows.jl, e.g.
import Plots.plot, Plots.heatmap, Plots.contourf Plots.plot(x, y::CuArray, args...; kwargs...) = Plots.plot(x, collect(y), args...; kwargs...) Plots.heatmap(x, y, z::CuArray, args...; kwargs...) = Plots.heatmap(x, y, collect(z), args...; kwargs...) Plots.contourf(x, y, z::CuArray, args...; kwargs...) = Plots.contourf(x, y, collect(z), args...; kwargs...)
hm... no, we don't want to do that in GeophysicalFlows.jl perhaps within the examples?
navidcy
Successfully merging a pull request may close this issue.
Some of the examples need slight modifications/generalizations to be able to run on GPU by simply setting
dev=GPU()
.The text was updated successfully, but these errors were encountered: