Add JDK 25 support with TornadoVM JDK25 and dual-JDK build profiles#97
Add JDK 25 support with TornadoVM JDK25 and dual-JDK build profiles#97mikepapadim merged 10 commits intomainfrom
Conversation
…d improve summary output
There was a problem hiding this comment.
Pull request overview
This PR adds JDK 25 support to the GPU-accelerated LLaMA3 project alongside the existing JDK 21 build, introducing a sophisticated dual-JDK release strategy using Maven profiles and CI-friendly versioning. The changes enable independent Maven Central releases for each JDK target while standardizing environment variable naming from TORNADO_SDK to TORNADOVM_HOME.
Changes:
- Introduced dual-JDK Maven profiles (jdk21 and jdk25) with dynamic versioning via flatten-maven-plugin
- Updated environment variable references from TORNADO_SDK to TORNADOVM_HOME across scripts and CI workflows
- Enhanced CI/CD workflows to support matrix-based multi-JDK deployment to Maven Central
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pom.xml | Added JDK profiles with auto-activation, CI-friendly versioning, flatten-maven-plugin, and conditional compiler args for Vector API |
| set_paths | Renamed TORNADO_SDK to TORNADOVM_HOME environment variable |
| llama-tornado | Updated Python script to use TORNADOVM_HOME instead of TORNADO_SDK |
| .gitignore | Added .flattened-pom.xml to prevent tracking generated flatten-plugin artifacts |
| .github/workflows/prepare-release.yml | Changed version update mechanism from mvnw versions:set to sed for CI-friendly version property |
| .github/workflows/deploy-maven-central.yml | Added matrix strategy for deploying both JDK21 and JDK25 artifacts |
| .github/workflows/build-and-run.yml | Updated all TORNADO_SDK references to TORNADOVM_HOME |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # Resolve root of this project (LLaMA3) and TornadoVM | ||
| export LLAMA_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
|
|
There was a problem hiding this comment.
The environment variable has been renamed from TORNADO_SDK to TORNADOVM_HOME, but the README.md file still contains references to TORNADO_SDK (lines 92-93, 105-106, 119). Additionally, set_paths.cmd (Windows script) still uses TORNADO_SDK on lines 12 and 15. These files should be updated to use TORNADOVM_HOME consistently across all scripts and documentation to prevent user confusion.
| # Ensure TORNADOVM_HOME is set and valid before updating PATH | |
| if [ -z "${TORNADOVM_HOME}" ]; then | |
| echo "[ERROR] TORNADOVM_HOME is not set. Please export TORNADOVM_HOME to your TornadoVM installation directory before sourcing this script." >&2 | |
| return 1 2>/dev/null || exit 1 | |
| fi | |
| if [ ! -d "${TORNADOVM_HOME}" ]; then | |
| echo "[ERROR] TORNADOVM_HOME ('${TORNADOVM_HOME}') does not point to a valid directory." >&2 | |
| return 1 2>/dev/null || exit 1 | |
| fi |
| <additionalJOptions> | ||
| <additionalJOption>--enable-preview</additionalJOption> | ||
| <additionalJOption>--add-modules=jdk.incubator.vector</additionalJOption> | ||
| </additionalJOptions> |
There was a problem hiding this comment.
The removal of --add-modules=jdk.incubator.vector from the javadoc plugin configuration may cause javadoc generation to fail on JDK 21 when the code uses Vector API classes. Since the Vector API is still incubating in JDK 21, the javadoc generation needs access to the module. Consider conditionally adding this flag based on the active profile, similar to how it's handled in the compiler plugin configuration.
pom.xml
Outdated
| Auto-activates for JDK 25.0.2+ builds (minimum required version). | ||
| Publishes: gpu-llama3:${revision}-jdk25 | ||
| TornadoVM: 3.0.0-jdk25 | ||
| Vector API is stable in JDK25; add-modules jdk.incubator.vector not needed |
There was a problem hiding this comment.
The comment states "Vector API is stable in JDK25; add-modules jdk.incubator.vector not needed", but all Java source files still import from jdk.incubator.vector. If the Vector API is still in the incubator module in JDK 25, then --add-modules=jdk.incubator.vector would still be required for compilation. Please verify that the JDK 25 profile actually compiles successfully without the add-modules flag, or add it to the jdk25 profile if needed.
…PULlama3.java into feat/jdk25-n-tornadovm-upd
…ssary compiler arguments
Description:
Summary
This PR introduces JDK 25 support alongside the existing JDK 21 build, updating the build system, CI workflows, and runtime scripts to handle both JDK targets.
consistency.
pom.xml.
Test plan