-
Notifications
You must be signed in to change notification settings - Fork 129
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
[DRAFT] Deferred Allocation Prototype #1704
base: main
Are you sure you want to change the base?
Conversation
I would not use IN_size (i.e., a throughput connector), maybe use just |
About the connector, we can also read the size, then this will be "OUT_size" I had planned. Would still suggest both connectors to be named size? |
yes, exactly. Since those connectors are endpoints, and not flowing through the access node (as they would in a scope node). |
I was updating the implementation according to a discussion we had with Torsten and Lex. I also changed the implementation to use "size" for both in and out connectors. Now the problem is that this SDFG does not validate because the access node has duplicate connectors. I think it is better to make the size connectors distinct rather than changing the validation rules. Or should I update the validation procedures with access nodes being an exception? |
This is possibly the start of a long PR that will evolve, and we should discuss it at every step.
The main idea is as follows (so far in the prototype):
Idea 1:
When an array is created, let's say "A", then also a size array is created "A_size". The Size array is always one-dimensional and contiguously stored. When there is an A_size -> A (IN connector needs to be _size), we trigger a reallocation operation and not a copy operation. I am not sure if we should have an A_size array, I would like to discuss this.
I have a small SDFG that shows what it looks like.
Generated code looks like follows:
And SDFG:
Next Step:
Not 100% of this array will always be used; for example, when calling realloc, only the "__dace_defer" dimensions will be read from the array. And the dimensions that are passed using symbols will be read from the respective symbols (this can't be changed throughout the SDFG). (I am currently working on this step)