Skip to content

Resolve Operator fallback to method allocator if temp alloc fails (#20981) (#20981) - #20981

Open
rstehle wants to merge 1 commit into
pytorch:mainfrom
rstehle:export-D109855815
Open

Resolve Operator fallback to method allocator if temp alloc fails (#20981) (#20981)#20981
rstehle wants to merge 1 commit into
pytorch:mainfrom
rstehle:export-D109855815

Conversation

@rstehle

@rstehle rstehle commented Jul 16, 2026

Copy link
Copy Markdown

Summary:
Currently, the resolve_operator step during method_init will fall back to method allocator if temp allocator is zero or not present.

This change adds logic to fallback to method allocator if temp allocator is present, but insufficient in size for the tensor meta.

Reviewed By: rascani

Differential Revision: D109855815

Pulled By: rstehle

@rstehle
rstehle requested a review from JacobSzwejbka as a code owner July 16, 2026 15:42
@pytorch-bot

pytorch-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit 95028f7 with merge base 8a19761 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@meta-cla meta-cla 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 16, 2026
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jul 16, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: rstehle / name: Regan Stehle (67aa6c0)
  • ✅ login: rstehle / name: rstehle (c42c51c)

@meta-codesync

meta-codesync Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

@rstehle has exported this pull request. If you are a Meta employee, you can view the originating Diff in D109855815.

@github-actions

Copy link
Copy Markdown

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.

@meta-codesync meta-codesync Bot changed the title Resolve Operator fallback to method allocator if temp alloc fails Resolve Operator fallback to method allocator if temp alloc fails (#20981) Jul 16, 2026
rstehle added a commit to rstehle/executorch that referenced this pull request Jul 16, 2026
…torch#20981)

Summary:

Currently, the resolve_operator step during method_init will fall back to method allocator if temp allocator is zero or not present. 

This change adds logic to fallback to method allocator if temp allocator is present, but insufficient in size for the tensor meta.

Reviewed By: Andrew-github-user, rascani

Differential Revision: D109855815
@rstehle
rstehle force-pushed the export-D109855815 branch from 2da43a9 to 186e3df Compare July 16, 2026 15:45
rstehle added a commit to rstehle/executorch that referenced this pull request Jul 16, 2026
…torch#20981)

Summary:

Currently, the resolve_operator step during method_init will fall back to method allocator if temp allocator is zero or not present. 

This change adds logic to fallback to method allocator if temp allocator is present, but insufficient in size for the tensor meta.

Reviewed By: Andrew-github-user, rascani

Differential Revision: D109855815
@rstehle
rstehle force-pushed the export-D109855815 branch from 186e3df to 67aa6c0 Compare July 16, 2026 15:48
@rstehle

rstehle commented Jul 16, 2026

Copy link
Copy Markdown
Author

/easycla

1 similar comment
@rstehle

rstehle commented Jul 16, 2026

Copy link
Copy Markdown
Author

/easycla

@meta-codesync

meta-codesync Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

@rstehle has imported this pull request. If you are a Meta employee, you can view this in D109855815.

Comment thread runtime/executor/method.cpp Outdated
// is not provided (or an empty one is provided), we
// fall back to the method allocator.
if (allocator == nullptr || allocator->size() == 0) {
if (allocator == nullptr || allocator->size() == 0 || allocator->size() < (sizeof(TensorMeta) * n_args) + (sizeof(executorch::aten::DimOrderType) * kTensorDimensionLimit * n_args)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this line will probably fail the lintrunner.

@meta-codesync meta-codesync Bot changed the title Resolve Operator fallback to method allocator if temp alloc fails (#20981) Resolve Operator fallback to method allocator if temp alloc fails (#20981) (#20981) Jul 20, 2026
@rstehle
rstehle force-pushed the export-D109855815 branch from c42c51c to 80baee5 Compare July 20, 2026 20:38
rstehle added a commit to rstehle/executorch that referenced this pull request Jul 20, 2026
…torch#20981) (pytorch#20981)

Summary:
Currently, the resolve_operator step during method_init will fall back to method allocator if temp allocator is zero or not present. 

This change adds logic to fallback to method allocator if temp allocator is present, but insufficient in size for the tensor meta.

Reviewed By: rascani

Differential Revision: D109855815

Pulled By: rstehle
rstehle added a commit to rstehle/executorch that referenced this pull request Jul 20, 2026
…torch#20981) (pytorch#20981)

Summary:
Currently, the resolve_operator step during method_init will fall back to method allocator if temp allocator is zero or not present.

This change adds logic to fallback to method allocator if temp allocator is present, but insufficient in size for the tensor meta.

Reviewed By: rascani

Differential Revision: D109855815

Pulled By: rstehle
@rstehle
rstehle force-pushed the export-D109855815 branch from 80baee5 to 62a92fb Compare July 20, 2026 20:46
rstehle added a commit to rstehle/executorch that referenced this pull request Jul 20, 2026
…torch#20981) (pytorch#20981)

Summary:
Currently, the resolve_operator step during method_init will fall back to method allocator if temp allocator is zero or not present. 

This change adds logic to fallback to method allocator if temp allocator is present, but insufficient in size for the tensor meta.

Reviewed By: rascani

Differential Revision: D109855815

Pulled By: rstehle
@rstehle
rstehle force-pushed the export-D109855815 branch from 62a92fb to 13f4cb2 Compare July 20, 2026 22:32
rstehle added a commit to rstehle/executorch that referenced this pull request Jul 20, 2026
…torch#20981) (pytorch#20981)

Summary:
Currently, the resolve_operator step during method_init will fall back to method allocator if temp allocator is zero or not present.

This change adds logic to fallback to method allocator if temp allocator is present, but insufficient in size for the tensor meta.

Reviewed By: rascani

Differential Revision: D109855815

Pulled By: rstehle
@rstehle
rstehle force-pushed the export-D109855815 branch from 13f4cb2 to 6006632 Compare July 20, 2026 22:36
@rstehle

rstehle commented Jul 21, 2026

Copy link
Copy Markdown
Author

@pytorchbot rerun -f

@pytorch-bot

pytorch-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

❌ 🤖 pytorchbot command failed:

@pytorchbot: error: argument command: invalid choice: 'rerun' (choose from 'merge', 'revert', 'rebase', 'label', 'drci', 'lint', 'fix-lint', 'apply-lint', 'cherry-pick')

usage: @pytorchbot [-h]
                   
                   {merge,revert,rebase,label,drci,lint,fix-lint,apply-lint,cherry-pick}
                   ...

Try @pytorchbot --help for more info.

@rstehle

rstehle commented Jul 21, 2026

Copy link
Copy Markdown
Author

@pytorchbot rerun -f "test-arm-backend-no-driver (test_pytest_models_tosa) / linux-job"

@pytorch-bot

pytorch-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

❌ 🤖 pytorchbot command failed:

@pytorchbot: error: argument command: invalid choice: 'rerun' (choose from 'merge', 'revert', 'rebase', 'label', 'drci', 'lint', 'fix-lint', 'apply-lint', 'cherry-pick')

usage: @pytorchbot [-h]
                   
                   {merge,revert,rebase,label,drci,lint,fix-lint,apply-lint,cherry-pick}
                   ...

Try @pytorchbot --help for more info.

@rstehle
rstehle force-pushed the export-D109855815 branch from 6006632 to 5eefb49 Compare July 22, 2026 15:28
rstehle added a commit to rstehle/executorch that referenced this pull request Jul 22, 2026
…torch#20981) (pytorch#20981)

Summary:
Currently, the resolve_operator step during method_init will fall back to method allocator if temp allocator is zero or not present. 

This change adds logic to fallback to method allocator if temp allocator is present, but insufficient in size for the tensor meta.

Reviewed By: rascani

Differential Revision: D109855815

Pulled By: rstehle
rstehle added a commit to rstehle/executorch that referenced this pull request Jul 22, 2026
…torch#20981) (pytorch#20981)

Summary:
Currently, the resolve_operator step during method_init will fall back to method allocator if temp allocator is zero or not present.

This change adds logic to fallback to method allocator if temp allocator is present, but insufficient in size for the tensor meta.

Reviewed By: rascani

Differential Revision: D109855815

Pulled By: rstehle
@rstehle
rstehle force-pushed the export-D109855815 branch from 5eefb49 to 22c6167 Compare July 22, 2026 15:31
rstehle added a commit to rstehle/executorch that referenced this pull request Jul 22, 2026
…torch#20981) (pytorch#20981)

Summary:
Currently, the resolve_operator step during method_init will fall back to method allocator if temp allocator is zero or not present. 

This change adds logic to fallback to method allocator if temp allocator is present, but insufficient in size for the tensor meta.

Reviewed By: rascani

Differential Revision: D109855815

Pulled By: rstehle
@rstehle
rstehle force-pushed the export-D109855815 branch from 22c6167 to a85077f Compare July 22, 2026 20:58
rstehle added a commit to rstehle/executorch that referenced this pull request Jul 22, 2026
…torch#20981) (pytorch#20981)

Summary:
Currently, the resolve_operator step during method_init will fall back to method allocator if temp allocator is zero or not present.

This change adds logic to fallback to method allocator if temp allocator is present, but insufficient in size for the tensor meta.

Reviewed By: rascani

Differential Revision: D109855815

Pulled By: rstehle
@rstehle
rstehle force-pushed the export-D109855815 branch 2 times, most recently from 886ae56 to 6397c3a Compare July 23, 2026 16:37
rstehle added a commit to rstehle/executorch that referenced this pull request Jul 23, 2026
…torch#20981) (pytorch#20981)

Summary:
Currently, the resolve_operator step during method_init will fall back to method allocator if temp allocator is zero or not present. 

This change adds logic to fallback to method allocator if temp allocator is present, but insufficient in size for the tensor meta.

Reviewed By: rascani

Differential Revision: D109855815

Pulled By: rstehle
rstehle added a commit to rstehle/executorch that referenced this pull request Jul 23, 2026
…torch#20981) (pytorch#20981)

Summary:
Currently, the resolve_operator step during method_init will fall back to method allocator if temp allocator is zero or not present.

This change adds logic to fallback to method allocator if temp allocator is present, but insufficient in size for the tensor meta.

Reviewed By: rascani

Differential Revision: D109855815

Pulled By: rstehle
@rstehle
rstehle force-pushed the export-D109855815 branch from 6397c3a to fe1c699 Compare July 23, 2026 16:41
@rstehle

rstehle commented Jul 24, 2026

Copy link
Copy Markdown
Author

@pytorchbot merge

@pytorch-bot

pytorch-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown

Mergebot is not configured for this repository. Please use the merge button provided by GitHub.

@rstehle
rstehle force-pushed the export-D109855815 branch from fe1c699 to 3b945c7 Compare July 27, 2026 15:51
rstehle added a commit to rstehle/executorch that referenced this pull request Jul 27, 2026
…torch#20981) (pytorch#20981)

Summary:
Currently, the resolve_operator step during method_init will fall back to method allocator if temp allocator is zero or not present. 

This change adds logic to fallback to method allocator if temp allocator is present, but insufficient in size for the tensor meta.

Reviewed By: rascani

Differential Revision: D109855815

Pulled By: rstehle
rstehle added a commit to rstehle/executorch that referenced this pull request Jul 27, 2026
…torch#20981) (pytorch#20981)

Summary:
Currently, the resolve_operator step during method_init will fall back to method allocator if temp allocator is zero or not present.

This change adds logic to fallback to method allocator if temp allocator is present, but insufficient in size for the tensor meta.

Reviewed By: rascani

Differential Revision: D109855815

Pulled By: rstehle
@rstehle
rstehle force-pushed the export-D109855815 branch from 3b945c7 to 18bee5b Compare July 27, 2026 15:54
rstehle added a commit to rstehle/executorch that referenced this pull request Jul 27, 2026
…torch#20981) (pytorch#20981)

Summary:
Currently, the resolve_operator step during method_init will fall back to method allocator if temp allocator is zero or not present. 

This change adds logic to fallback to method allocator if temp allocator is present, but insufficient in size for the tensor meta.

Reviewed By: rascani

Differential Revision: D109855815

Pulled By: rstehle
@rstehle
rstehle force-pushed the export-D109855815 branch from 18bee5b to aa34c12 Compare July 27, 2026 17:44
rstehle added a commit to rstehle/executorch that referenced this pull request Jul 27, 2026
…torch#20981) (pytorch#20981)

Summary:
Currently, the resolve_operator step during method_init will fall back to method allocator if temp allocator is zero or not present.

This change adds logic to fallback to method allocator if temp allocator is present, but insufficient in size for the tensor meta.

Reviewed By: rascani

Differential Revision: D109855815

Pulled By: rstehle
@rstehle
rstehle force-pushed the export-D109855815 branch 2 times, most recently from 68dc1c4 to b36c074 Compare July 29, 2026 20:46
rstehle added a commit to rstehle/executorch that referenced this pull request Jul 29, 2026
…torch#20981) (pytorch#20981)

Summary:
Currently, the resolve_operator step during method_init will fall back to method allocator if temp allocator is zero or not present. 

This change adds logic to fallback to method allocator if temp allocator is present, but insufficient in size for the tensor meta.

Reviewed By: rascani

Differential Revision: D109855815

Pulled By: rstehle
…torch#20981) (pytorch#20981)

Summary:
Currently, the resolve_operator step during method_init will fall back to method allocator if temp allocator is zero or not present.

This change adds logic to fallback to method allocator if temp allocator is present, but insufficient in size for the tensor meta.

Reviewed By: rascani

Differential Revision: D109855815

Pulled By: rstehle
@rstehle
rstehle force-pushed the export-D109855815 branch from b36c074 to 95028f7 Compare July 29, 2026 20:49
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. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants