Skip to content

Android: Module implements Closeable#19124

Merged
psiddh merged 1 commit intopytorch:mainfrom
psiddh:module-closeable
Apr 25, 2026
Merged

Android: Module implements Closeable#19124
psiddh merged 1 commit intopytorch:mainfrom
psiddh:module-closeable

Conversation

@psiddh
Copy link
Copy Markdown
Contributor

@psiddh psiddh commented Apr 24, 2026

Add Closeable interface so Module can be used with try-with-resources. close() delegates to destroy(). Also make destroy() idempotent by checking mHybridData.isValid() before calling resetNative(), satisfying the Closeable contract.

This commit was authored with the help of Claude.

Add Closeable interface so Module can be used with try-with-resources.
close() delegates to destroy(). Also make destroy() idempotent by
checking mHybridData.isValid() before calling resetNative(), satisfying
the Closeable contract.

This commit was authored with the help of Claude.
Copilot AI review requested due to automatic review settings April 24, 2026 22:10
@psiddh psiddh requested a review from kirklandsign as a code owner April 24, 2026 22:10
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Apr 24, 2026

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

⚠️ 1 Awaiting Approval, 2 Unrelated Failures

As of commit 10497c8 with merge base cb94506 (image):

AWAITING APPROVAL - The following workflow needs approval before CI can run:

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.

@psiddh psiddh requested review from GregoryComer and kirklandsign and removed request for Copilot and kirklandsign April 24, 2026 22:10
@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 Apr 24, 2026
@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.

@psiddh psiddh merged commit b8f04aa into pytorch:main Apr 25, 2026
173 of 176 checks passed
JacobSzwejbka added a commit that referenced this pull request Apr 26, 2026
## Summary

Reverts the following Android PRs:
- #19099 — Android: consistent error types across all modules
- #19124 — Android: Module implements Closeable
- #19092 — Android: improve error diagnostics for LlmModule and
exceptions
- #19028 — Ignored Module tests: provide required input tensor

Authored with Claude.
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants