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

Relhum function on GPU using CuPy #227

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Conversation

haniyeka
Copy link

@haniyeka haniyeka commented Jul 8, 2022

geocat_cupy.yml: Created an export from the geocat Conda environment, including the required packages.

meteorology.py: The Relhum function and its helper functions _relhum, and _xrelhum are ported to do the computation on GPU using CuPy. They have a new input variable, "use_gpu", which its default value is set to "False", but when the user sets it to "True", the computation of the Relhum function will be done on GPU.

test_meteorology.py: The Test_Relhum class is changed according to the changes in meteolorogy.py. They also have a new input variable, the "use_gpu", which is set to "False" by default.

Note: The current ported version works on a single GPU device, but the next step is to try running the function on multiple GPUs.

haniyeka added 3 commits July 8, 2022 12:53
…including the required packages.

meteorology.py: The Relhum function and its helper functions _relhum and _xrelhum have a new input variable "use_gpu" which its default value is set to "False", but when the user sets it to "True", the computation of Relhum function will be done on GPU.
test_meteorology.py: The Test_Relhum class is changed using the same "use_gpu" function.
The current ported version works on single GPU.
@haniyeka
Copy link
Author

@anissa111 @erogluorhan

@erogluorhan
Copy link
Collaborator

@haniyeka Thanks very much for putting this together! I will give it a review as soon as I have time.

@erogluorhan
Copy link
Collaborator

@haniyeka did you have a chance to explore the lightweight cupy-xarray interface during this work?

@haniyeka
Copy link
Author

@haniyeka did you have a chance to explore the lightweight cupy-xarray interface during this work?

Hi Orhan,
Actually, I investigated this package first weeks of the summer, and the reason that I didn't used it is that the package is in "Experimental" phase. So, I implemented the code by converting the numpy array inside xarray to cupy.

https://github.com/haniyeka/geocat_test_scripts/blob/main/smalltests/xarray-cupy-v2.ipynb

@dcherian
Copy link
Contributor

package is in "Experimental" phase.

This just means it needs someone talented (like you!) to step in and contribute =)

@haniyeka
Copy link
Author

haniyeka commented Aug 9, 2022

package is in "Experimental" phase.

This just means it needs someone talented (like you!) to step in and contribute =)

Hi! I am willing! How can I be part of this? Can you add me to the repo?

@haniyeka haniyeka closed this Aug 9, 2022
@haniyeka haniyeka reopened this Aug 9, 2022
@dcherian
Copy link
Contributor

dcherian commented Aug 9, 2022

Hi! I am willing! How can I be part of this? Can you add me to the repo?

Great! The only thing to do is to contribute when and where you can.

For example, given your work here, are there other helper functions that would be useful in that repo? If so, please open an issue there to discuss.

I wrote some quick docs. Is there something else that you think would be useful to demonstrate there?

@kafitzgerald kafitzgerald marked this pull request as draft November 21, 2023 23:13
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.

3 participants