Skip to content

Refactor: refine tensor dependency tracking#415

Open
jvjhfhg wants to merge 1 commit intohw-native-sys:mainfrom
jvjhfhg:fix/orch-semantics
Open

Refactor: refine tensor dependency tracking#415
jvjhfhg wants to merge 1 commit intohw-native-sys:mainfrom
jvjhfhg:fix/orch-semantics

Conversation

@jvjhfhg
Copy link
Copy Markdown
Collaborator

@jvjhfhg jvjhfhg commented Mar 31, 2026

  • Add OUTPUT_EXISTING and NO_DEP handling for existing tensors, and split creator retention from overlap-based writer lookup.
  • Store owner_task_id in Tensor, remove the CreatorMap path, and update affected orchestration examples to use the refined dependency semantics.

@jvjhfhg jvjhfhg force-pushed the fix/orch-semantics branch from c4a6952 to 19d6c42 Compare March 31, 2026 02:55
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the dependency tracking system by introducing creator-based tracking via a new owner_task_id field in the Tensor structure, complementing the existing OverlapMap lookups. It adds new TensorArgType variants, OUTPUT_EXISTING and NO_DEP, to better handle different buffer lifecycles and reduces complexity in the TensorMap by removing the with_alloc flag. Feedback focuses on critical safety issues where the fanin_count limit is silently enforced, which could lead to dropped dependencies and data races. Additionally, it is recommended that OUTPUT_EXISTING perform full OverlapMap lookups to maintain correctness and prevent stale entries in the TensorMap.

@jvjhfhg jvjhfhg force-pushed the fix/orch-semantics branch from 19d6c42 to 1dbc46e Compare March 31, 2026 02:59
@jvjhfhg jvjhfhg force-pushed the fix/orch-semantics branch 14 times, most recently from a37a79f to f11a30c Compare March 31, 2026 10:51
@jvjhfhg jvjhfhg marked this pull request as draft March 31, 2026 11:49
Add OUTPUT_EXISTING and NO_DEP handling for existing tensors, and split creator retention from overlap-based writer lookup.

Store owner_task_id in Tensor, remove the CreatorMap path, and update affected orchestration examples to use the refined dependency semantics.
@jvjhfhg jvjhfhg force-pushed the fix/orch-semantics branch from f11a30c to 61a5e0a Compare March 31, 2026 12:19
@jvjhfhg jvjhfhg marked this pull request as ready for review March 31, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants