Skip to content

Remove arg index from the get_arg and set_arg of a torch Node #12326

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

Merged
merged 1 commit into from
Jul 11, 2025

Conversation

CaptnJackSparrow
Copy link
Contributor

Summary: Instead of using the arg index, rely on the normalized kwargs dictionary for a uniform view of a node's arguments. This diff cleans up the get_arg and set_arg api so that callers do not need to additionally keep track of arg indices. This simplifies the calling code and also prevents unnecessary code maintenance in case the op signature changes thereby changing the relative positioning of the args within a node.

Reviewed By: abeakkas

Differential Revision: D77976838

Copy link

pytorch-bot bot commented Jul 10, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/12326

Note: Links to docs will display an error until the docs builds have been completed.

❌ 2 New Failures

As of commit f6ae97d with merge base bdbad3f (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 10, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77976838

Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

CaptnJackSparrow pushed a commit that referenced this pull request Jul 10, 2025
Summary:

Instead of using the arg index, rely on the normalized kwargs dictionary for a uniform view of a node's arguments. This diff cleans up the get_arg and set_arg api so that callers do not need to additionally keep track of arg indices. This simplifies the calling code and also prevents unnecessary code maintenance in case the op signature changes thereby changing the relative positioning of the args within a node.

Reviewed By: abeakkas

Differential Revision: D77976838
facebook-github-bot pushed a commit that referenced this pull request Jul 10, 2025
Summary:

Instead of using the arg index, rely on the normalized kwargs dictionary for a uniform view of a node's arguments. This diff cleans up the get_arg and set_arg api so that callers do not need to additionally keep track of arg indices. This simplifies the calling code and also prevents unnecessary code maintenance in case the op signature changes thereby changing the relative positioning of the args within a node.

Reviewed By: abeakkas

Differential Revision: D77976838
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77976838

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77976838

CaptnJackSparrow pushed a commit that referenced this pull request Jul 10, 2025
Summary:
Pull Request resolved: #12326

Instead of using the arg index, rely on the normalized kwargs dictionary for a uniform view of a node's arguments. This diff cleans up the get_arg and set_arg api so that callers do not need to additionally keep track of arg indices. This simplifies the calling code and also prevents unnecessary code maintenance in case the op signature changes thereby changing the relative positioning of the args within a node.

Reviewed By: abeakkas

Differential Revision: D77976838
facebook-github-bot pushed a commit that referenced this pull request Jul 10, 2025
Summary:

Instead of using the arg index, rely on the normalized kwargs dictionary for a uniform view of a node's arguments. This diff cleans up the get_arg and set_arg api so that callers do not need to additionally keep track of arg indices. This simplifies the calling code and also prevents unnecessary code maintenance in case the op signature changes thereby changing the relative positioning of the args within a node.

Reviewed By: abeakkas

Differential Revision: D77976838
CaptnJackSparrow pushed a commit that referenced this pull request Jul 10, 2025
Summary:

Instead of using the arg index, rely on the normalized kwargs dictionary for a uniform view of a node's arguments. This diff cleans up the get_arg and set_arg api so that callers do not need to additionally keep track of arg indices. This simplifies the calling code and also prevents unnecessary code maintenance in case the op signature changes thereby changing the relative positioning of the args within a node.

Reviewed By: abeakkas

Differential Revision: D77976838
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77976838

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77976838

CaptnJackSparrow pushed a commit that referenced this pull request Jul 10, 2025
Summary:
Pull Request resolved: #12326

Instead of using the arg index, rely on the normalized kwargs dictionary for a uniform view of a node's arguments. This diff cleans up the get_arg and set_arg api so that callers do not need to additionally keep track of arg indices. This simplifies the calling code and also prevents unnecessary code maintenance in case the op signature changes thereby changing the relative positioning of the args within a node.

Reviewed By: abeakkas

Differential Revision: D77976838
CaptnJackSparrow pushed a commit that referenced this pull request Jul 10, 2025
Summary:

Instead of using the arg index, rely on the normalized kwargs dictionary for a uniform view of a node's arguments. This diff cleans up the get_arg and set_arg api so that callers do not need to additionally keep track of arg indices. This simplifies the calling code and also prevents unnecessary code maintenance in case the op signature changes thereby changing the relative positioning of the args within a node.

Reviewed By: abeakkas

Differential Revision: D77976838
Summary:
Pull Request resolved: #12326

Instead of using the arg index, rely on the normalized kwargs dictionary for a uniform view of a node's arguments. This diff cleans up the get_arg and set_arg api so that callers do not need to additionally keep track of arg indices. This simplifies the calling code and also prevents unnecessary code maintenance in case the op signature changes thereby changing the relative positioning of the args within a node.

Reviewed By: abeakkas

Differential Revision: D77976838
facebook-github-bot pushed a commit that referenced this pull request Jul 10, 2025
Summary:

Instead of using the arg index, rely on the normalized kwargs dictionary for a uniform view of a node's arguments. This diff cleans up the get_arg and set_arg api so that callers do not need to additionally keep track of arg indices. This simplifies the calling code and also prevents unnecessary code maintenance in case the op signature changes thereby changing the relative positioning of the args within a node.

Reviewed By: abeakkas

Differential Revision: D77976838
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77976838

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77976838

@facebook-github-bot facebook-github-bot merged commit 5b483ab into main Jul 11, 2025
95 of 99 checks passed
@facebook-github-bot facebook-github-bot deleted the export-D77976838 branch July 11, 2025 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants