User objects attached to graphs require testing to ensure they are freed. The CUDA driver deallocates user objects asynchronously — cuUserObjectCreate requires CU_USER_OBJECT_NO_DESTRUCTOR_SYNC as the only legal flag — making it difficult to write such tests. The current approach, used in cuda_core/tests/graph/test_graph_definition_lifetime.py::test_kernel_args_buffer_lifetime (added in #2041 to address Rob's review comment on the original fix for #2039), relies on polling to observe cleanup. Leo flagged the polling pattern as unreliable for SWQA. Consider other approaches; the broader graph-ownership rework planned for #1330 is a likely place to revisit this.
User objects attached to graphs require testing to ensure they are freed. The CUDA driver deallocates user objects asynchronously —
cuUserObjectCreaterequiresCU_USER_OBJECT_NO_DESTRUCTOR_SYNCas the only legal flag — making it difficult to write such tests. The current approach, used incuda_core/tests/graph/test_graph_definition_lifetime.py::test_kernel_args_buffer_lifetime(added in #2041 to address Rob's review comment on the original fix for #2039), relies on polling to observe cleanup. Leo flagged the polling pattern as unreliable for SWQA. Consider other approaches; the broader graph-ownership rework planned for #1330 is a likely place to revisit this.