[Android] Add Java runtime API for registered ops and backends#11042
[Android] Add Java runtime API for registered ops and backends#11042facebook-github-bot merged 5 commits intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/11042
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit ea88c6f with merge base 33d4790 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot label "release notes: none" |
|
Thank you @keyprocedure sorry I made some updates in the codebase to fix some internal code breakage. Would you mind rebasing this PR against main? |
|
Otherwise the PR looks good to me. Have you tested locally? |
6f0a515 to
dceb3e2
Compare
|
@kirklandsign has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
A few more places: executorch/extension/android/jni/BUCK Line 31 in 33d4790 executorch/extension/android/jni/BUCK Line 52 in 33d4790 executorch/extension/android/jni/BUCK Line 76 in 33d4790 Could you please add the new JNI file to it? And here: executorch/extension/android/jni/BUCK Lines 112 to 115 in 33d4790 export the new file, and add it to Thank you |
I tested the API functionality locally with the instrumentation test I created and manually verified through an emulator. I wasn't able to run the existing instrumentation tests because I didn't have the setup files |
|
GH emulator CI passed 😄 And could use help with linter |
|
google-java-format_linux-x86-64 -i extension/android/executorch_android/src/main/java/org/pytorch/executorch/ExecuTorchRuntime.java |
|
and |
|
in your last comment with the CI output, is the failure just a formatting issue, or is there a runtime crash? |
|
Just formatting issue |
|
@kirklandsign has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
Thank you @keyprocedure code merged |
Summary
Adds a Java runtime API that exposes native methods to query registered operators and backends for debugging.
getRegisteredOps()andgetRegisteredBackends()native methodsFixes #10438
Test plan
Verified
RuntimeAPI functionality on an emulator using a sample app.getRegisteredOps()andgetRegisteredBackends()successfully returned and displayed all registered ops and backends.