-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Based on feedback we should better define how memory allocation/free nodes behave in a graph. There are several aspects to this:
-
What is the lifetime of the memory? My understanding is that if a memory is both allocated and freed by a graph then it is owned by the graph. However, memory may only be allocated by the graph without an associated free node in which case the memory can be used outside the graph and must be freed by the user with
sycl::free(). We should explicitly say this. -
Relationship between memory allocations in an executable graph v a modifiable graph. That is, if the same modifiable graph is finalized to two executable graph objects, do they point to the same memory. My understanding is that they do not, but we should say this explicitly in the spec.
-
Relationship with USM. If we expect the usage of the usage of the pointers returned to be the same as device USM, then we should say that explicitly in the spec.
-
Invalid usage of free - We should specify that it is undefined behaviour if the pointer passed to
add_freeis already freed or not valid address