-
Notifications
You must be signed in to change notification settings - Fork 10
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
Make FIELD%DEVPTR
LBOUNDS always one
#69
Conversation
DEVPTR
always start from oneFIELD%DEVPTR
LBOUNDS always one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many many thanks @wertysas for this very neatly implemented first step of #68 👌 This is good to go from my side, but as this is quite a fundamental change, testing this thoroughly is essential. @mlange05 could you please confirm this branch doesn't break ecPhys offload? @dareg could you also please confirm these changes are safe on your end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me and I can confirm that EC-physics regression test works fine with this on GPU.
Hello, I would like this to be an option, as we already rely on %DEVPTR having the same bounds as %PTR in our physics. Or would not it be possible to create a local pointer with lower bounds equal to 1 and make the transfer with this pointer ? |
Ah, I didn't know we had use cases where external code could access |
The best solution would be to use a local pointer with lower bounds equal to one; is not that possible ? Because making DEVPTR with lb =1 optional looks quite complicated. It is hard for me to understand why a pointer with lower bounds = 1 is required, as long as it is contiguous. I also understand that the purpose of this is to be able to run calculations with datasets so large that they cannot fit on the device, which is a very questionable purpose, as the recommended approach is to keep data on the device, which we now know is possible (we did it with ARPEGE). That being said, if you manage to make it simple and not too complicated, I will approve it. |
Hi Phillipe, There's two features we are hoping to add:
If we are to use the I assumed the storage pointer was not part of the external API (in fact I wondered why we haven't marked it as private) so I advised Johan to go with the simplest solution: assume If I am understanding your proposal correctly, you are suggesting to place a device storage pointer in user code outside of F-API and use that to do the copy? If so, we could achieve point 1 with that approach, although for fields used in multiple kernels (e.g. With the new knowledge of your physics use-case, @wertysas and I will sit together offline and come up with a clean workaround. |
5ddc7a6
to
a8353a3
Compare
Hello Ahmad, Clearly, PTR and DEVPTR management (allocation/deallocation/synchronization) are field_api purpose, and the user should not interfere with this. That being said, and assuming proper synchronization has taken place, the data pointed to by PTR and DEVPTR can be accessed. This is what we do in our physics/dynamics. I still do not understand why you need to have lower bounds of DEVPTR equal to 1. Maybe you could try to explain ? |
Hi Philipe, We want to remove the limitation that |
647afa8
to
cd763dc
Compare
Thanks a lot @wertysas for addressing the comments 🙏 @pmarguinaud this is now ready for review again, please have a look whenever you can. |
cd763dc
to
d151763
Compare
Hello, |
Hi @dareg , yes we'll make sure we get tests green first. The current |
Okay, thanks. Sorry to be nit-picking like that. I'm afraid that if we allow a PR with a failing test today, we might have PR with multiple failing tests in a year. |
Hi @dareg, I fully agree. The runners have been fixed now and all tests are passing. |
This PR is the first in a series of PR's related to the issue Add support for partial offloading of field API fields to device #68.
This PR decouples the bounds of
FIELD%DEVPTR
fromFIELD%PTR
member, by always making theFIELDS%DEVPTR
lower bound be one. The decoupling of the device and host pointers is the first step towards partial field offloads, as outlined in the issue linked above.