[Feature] Implement direct getter/setter for Quantity#431
[Feature] Implement direct getter/setter for Quantity#431FlorianDeconinck wants to merge 21 commits intoNOAA-GFDL:developfrom
Quantity#431Conversation
…est to confirm data is modified
romanc
left a comment
There was a problem hiding this comment.
Looks good to me - just a question about some test asserts.
twicki
left a comment
There was a problem hiding this comment.
If we have direct access without .field should we at least deprecate it here so we can remove it in the release after that?
And for my own edification: I thought we specifically put in the .field and .data functions because that was the only way we could tell orchestration to overwrite the calls for the accesses to work. Why / How did that change? Or do I misremember something here?
This doesn't really deprecate those access, what it does is make orchestration possible because those access break orchestration. Now - as I said in the PR - what is missing here is a way to forbid those access from being used in orchestrated code path. I tried a few things, it's non-trivial. This alone could warrant a deprecation and removal of the specific accessors. The counterpoint being that
No, we failed to do so. We couldn't make |
|
sorry, I mistyped in my comment. I ment deprecating |
Yes - that we should. We do need an access, so we'll probably (re)introduce a |
oelbert
left a comment
There was a problem hiding this comment.
1 minor correction. I do think we should deprecate quantity.data but ideally over multiple releases, and as long as we keep quantity.field.
The problem with keeping Unsolved issue. |
|
Regarding deprecating |
oelbert
left a comment
There was a problem hiding this comment.
I don't know what to say about the field issue beyond just telling people "don't use it at runtime!"
|
Holding merge to figure out if we can do something clever for |
|
Drafting: I need to go clean up all the |
|
Further cleanup:
|
…r better cachsing
|
Description
Dear all,
We have reached this moment. Yes, after many hours of debate: I have implemented
quantity[:, :, :] = 0which will behave likequantity.data[:, :, :] = 0.The main reason for the change is orchestration. TL;DR: when parsing, DaCe maps symbols to their name. If a buffer is used with
bufferandbuffer.datato access the same memory, it can confuse the parser and lead to difficult to debug numerical error.This change is also motivated by the fact we have very little to no use for
quantity.fieldduring runtime (when we might orchestrate).Further improvement of the API would require the use of
.dataand.fieldto fail during orchestration OR in an "orchestrate" code path. Not implemented here.How has this been tested?
The quantity unit test has been changed to not use
.dataand one test has been added.Checklist