Skip to content

Refactor: remove intermediate tensors from args and distinguish naming#59

Merged
ChaoWao merged 1 commit into
hw-native-sys:mainfrom
jvjhfhg:remove-unused-args
Feb 9, 2026
Merged

Refactor: remove intermediate tensors from args and distinguish naming#59
ChaoWao merged 1 commit into
hw-native-sys:mainfrom
jvjhfhg:remove-unused-args

Conversation

@jvjhfhg

@jvjhfhg jvjhfhg commented Feb 9, 2026

Copy link
Copy Markdown
Collaborator

Intermediate tensors (c, d, e) were passed through the full argument chain but never used from args — the orchestration allocates them from the runtime heap via make_output_handle. Remove them from TENSOR_ORDER and generate_inputs() to avoid unnecessary device memory allocation.

Rename buffer handles to clarify provenance:

  • arg_* for I/O tensors from external args (make_external_handle)
  • buf_* for intermediates allocated by runtime heap (make_output_handle)

Intermediate tensors (c, d, e) were passed through the full argument
chain but never used from args — the orchestration allocates them from
the runtime heap via make_output_handle. Remove them from TENSOR_ORDER
and generate_inputs() to avoid unnecessary device memory allocation.

Rename buffer handles to clarify provenance:
- arg_* for I/O tensors from external args (make_external_handle)
- buf_* for intermediates allocated by runtime heap (make_output_handle)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jvjhfhg jvjhfhg force-pushed the remove-unused-args branch from 97f72a0 to a324e44 Compare February 9, 2026 11:53
@ChaoWao ChaoWao merged commit 9e9ed0b into hw-native-sys:main Feb 9, 2026
3 checks passed
@jvjhfhg jvjhfhg deleted the remove-unused-args branch February 9, 2026 11:58
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