-
Notifications
You must be signed in to change notification settings - Fork 86
generate_terrain: cupy case, dask numpy case #555
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
Conversation
@kiliakis I've refactored the code and added some tests. It happened that the results when running with vanilla numpy, dask numpy, and cupy backed DataArrays are not the same. Similar things happened when running with the original code you added. Can you investigate and make sure the results match? I can help to take a look into the dask case. |
@thuydotm The perlin noise function (that is also used by generate terrain) uses a random number generator (see here for example: https://github.com/makepath/xarray-spatial/pull/555/files?file-filters%5B%5D=.md&file-filters%5B%5D=.py#diff-4599a7f9c05a7872e774fd7d4fa503515a3e5eecbed9d36ed379bb2266491a62R71). |
* Fixes bug in perlin gpu * uses cuda_args to configure block and grid size * Using numpy for permutation makes the Cuy implementation 4-5x slower * typo fix
@kiliakis I merged your PR and made code changes to ensure the same results when running with numpy, dask and cupy. Going to merge this PR to main branch. Please feel free to open new PRs if you see anything to improve. |
No description provided.