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

Cupy implementation #33

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open

Cupy implementation #33

wants to merge 11 commits into from

Conversation

12rambau
Copy link

@12rambau 12rambau commented Jul 7, 2021

I managed to get the openCL backend to work but I was missing a simple GPU implementation to compare the performances of your implementation with a simple GPU backend.

I also tested the GPU openCL implementation over large datasets in central Africa and in some countries the Python Backend was giving better results, even though it was slower.

Based on the numpy implementation I created this backend using the cupy lib (numpy for GPU).
As you may understand all the modification I made to the numpy backend are the same as in thisone (as Cupy is less tolerant than Numpy). It is curently only 3% slower than the OpenCL implementation available in the develop branch and it's way easier to maintain.

It could be useful for you as an alternative backend and eventually as a reference GPU implementation for further publications.

I'm working on it in the master branch of my fork but I think I can actually merge the Numpy and Cupy implementation using a simple lazy import.

Let me know if you think it's interesting. As long as we are experiencing bugs with openCL implementation, this backend will become the reference backend in the bfast-gpu application of SEPAL.

@mortvest
Copy link
Collaborator

mortvest commented Jul 7, 2021

Great that you got it working. What was the issue?

Could you report the differences between the results of the backends as an issue (maybe with a small-ish dataset)? That should definitely be looked into.

There is problem with tuning thresholds with the OpenCL backend, which makes it perform much slower than it should. I am currently looking into that. Our experiments show that up to 5x speedup can be possible.

We are currently not interested in the cupy backend.

@12rambau
Copy link
Author

12rambau commented Jul 7, 2021

The dataset is a SEPAL time series over Gabon so it cannot be used as it is. I'll try to cut it into smaller pieces to find a small dataset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants