Support pure JVM JAR compilation and packaging for desktop JVM#20761
Support pure JVM JAR compilation and packaging for desktop JVM#20761RanjithRagavan wants to merge 5 commits into
Conversation
…(Linux/macOS/Windows)
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20761
Note: Links to docs will display an error until the docs builds have been completed.
|
|
@pytorchbot label "release notes: none" |
|
Hi @RanjithRagavan, thank you for the PR. Could you address the CI failures? |
…classpath to resolve Kotlin duplicate loading and classloader issues
|
Thanks @RanjithRagavan for the PR. The idea is strong and imo worth pursuing — a pure-JVM ExecuTorch artifact for desktop (Linux/macOS/Windows) is good in terms of direction This requires a bit of a redesign before it's mergeable, so let me lay out my thoughts rather than line-by-line comments.
extension/
Happy to help scope the shared-module split and the native-packaging approach. IMO this is a valuable addition and worth getting the foundation right. 🙏 |
psiddh
left a comment
There was a problem hiding this comment.
Please take a look at the feedback
|
valuable feedbacks.. Will work on it. |
- Extract platform-neutral API into shared 'extension/java/' module
- Replace reflection-based logging with ServiceLoader Logger SPI
- Create thin sibling platform modules ('extension/android/' and 'extension/jvm/')
- Implement per-OS NativeLibraryLoader and NativeLoader JvmDelegate on desktop JVM
- Relocate unit tests to shared module for fast JVM test execution
b9b0432 to
50fcff9
Compare
1. Extracted Shared Platform-Neutral Java APIExtracted the platform-neutral Java API into a shared module and converted the Android and JVM modules into thin sibling shells:
2. Replace Reflection-Based Logging with a Logger InterfaceWe introduced the
3. Solve Native Library Delivery on JVM Desktop
4. Tests and Verification
|
This PR adds support for compiling and packaging the ExecuTorch Java/Kotlin APIs as a standard JVM JAR package targeting desktop platforms (Linux, macOS, Windows). It resolves #16422 by decoupling the codebase from Android-specific APIs (using reflection to delegate android logging) and adding a new
:executorch_jvmGradle project. In addition, the JNI CMake configuration has been expanded to support building on desktop hosts.cc @kirklandsign @cbilgin