Move output tensor resize to before XNNPACK subgraph execution#17661
Move output tensor resize to before XNNPACK subgraph execution#17661GregoryComer wants to merge 1 commit intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17661
Note: Links to docs will display an error until the docs builds have been completed. ❌ 5 New Failures, 5 Unrelated FailuresAs of commit 45ee5c1 with merge base 3319157 ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@GregoryComer has exported this pull request. If you are a Meta employee, you can view the originating Diff in D94148443. |
This PR needs a
|
…ch#17661) Summary: ET's XNNPACK delegate currently resizes output tensors after running the XNNPACK subgraph. This is normally fine, as the buffer is large enough. However, if there is a logic bug or corrupt model file, the current code doesn't catch if XNNPACK's output is larger than the planned buffer until after execution, where it may crash. To fix this, I've moved the resize up. This fails gracefully in the above case. Differential Revision: D94148443
4782781 to
c8a2924
Compare
…ch#17661) Summary: ET's XNNPACK delegate currently resizes output tensors after running the XNNPACK subgraph. This is normally fine, as the buffer is large enough. However, if there is a logic bug or corrupt model file, the current code doesn't catch if XNNPACK's output is larger than the planned buffer until after execution, where it may crash. To fix this, I've moved the resize up. This fails gracefully in the above case. Differential Revision: D94148443
c8a2924 to
45ee5c1
Compare
Summary:
ET's XNNPACK delegate currently resizes output tensors after running the XNNPACK subgraph. This is normally fine, as the buffer is large enough. However, if there is a logic bug or corrupt model file, the current code doesn't catch if XNNPACK's output is larger than the planned buffer until after execution, where it may crash.
To fix this, I've moved the resize up. This fails gracefully in the above case.
Differential Revision: D94148443