From e7b08944235825d387604f5a1d6ddade3b7f3a32 Mon Sep 17 00:00:00 2001 From: Thanos Stratikopoulos Date: Tue, 4 Aug 2026 17:25:44 +0300 Subject: [PATCH 1/7] [feat] Add JDK 27 support and fix cross-JDK JVMCI handling in llama-tornado --- .claude/skills/build-n-run-engine/SKILL.md | 4 +- .claude/skills/build-tornado/SKILL.md | 7 +- llama-tornado | 77 +++++++++++++++++++--- pom.xml | 38 ++++++++++- 4 files changed, 114 insertions(+), 12 deletions(-) diff --git a/.claude/skills/build-n-run-engine/SKILL.md b/.claude/skills/build-n-run-engine/SKILL.md index d6f46fa4..82999366 100644 --- a/.claude/skills/build-n-run-engine/SKILL.md +++ b/.claude/skills/build-n-run-engine/SKILL.md @@ -20,7 +20,7 @@ Build GPULlama3.java (this repo) with Maven, skipping tests for speed. ## Prerequisites -- `JAVA_HOME` set to JDK 21 or 25 (`java -version`) +- `JAVA_HOME` set to JDK 21, 25, or 27 (`java -version`) - `TORNADOVM_HOME` set and `tornado --devices` succeeds — if not, run the `build-tornado` skill first - `~/TornadoVM/setvars.sh` sourced in **this** shell (env vars don't persist across shells/tool calls) @@ -51,7 +51,7 @@ git checkout && git pull mvn clean install -DskipTests ``` -For JDK 25 instead of the default JDK 21, ensure `JAVA_HOME` points at JDK 25 before running `make` — the pom auto-activates the `jdk25` profile from the detected JDK version, there is no separate `BACKEND=`-style flag. +For JDK 25 or JDK 27 instead of the default JDK 21, ensure `JAVA_HOME` points at that JDK before building — the pom auto-activates the matching `jdk25`/`jdk27` profile from the detected JDK version, there is no separate `BACKEND=`-style flag. The `jdk27` profile pins `tornadovm.version` to the locally-installed `5.2.1-jdk27-dev` artifact (no `5.0.0-jdk27` release exists) and compiles without `--enable-preview` (unnecessary at release 27; only `--add-modules jdk.incubator.vector` is needed). ### Step 5: Verify diff --git a/.claude/skills/build-tornado/SKILL.md b/.claude/skills/build-tornado/SKILL.md index f769b4c7..d57ba14a 100644 --- a/.claude/skills/build-tornado/SKILL.md +++ b/.claude/skills/build-tornado/SKILL.md @@ -18,9 +18,14 @@ Build TornadoVM from source. Available backends: `opencl` (default), `ptx`, `spi ## Prerequisites -- JAVA_HOME is set to jdk 21 or 25 +- JAVA_HOME is set to jdk 21, 25, or 27 - `nvidia-smi` succeeds (GPUs visible) +Note: JDK 27 removed JVMCI entirely (openjdk/jdk#30834). TornadoVM's `jdk27` pom profile +vendors a same-named `jdk.internal.vm.ci` application module to compensate — see the +`jdk27-jvmci-removal` branch. `bin/compile --jdk jdk27` (and `make`) auto-detect this from +`JAVA_HOME`. + ## Instructions ### Step 1: Verify Environment diff --git a/llama-tornado b/llama-tornado index cf152139..efba6a85 100755 --- a/llama-tornado +++ b/llama-tornado @@ -10,6 +10,7 @@ The backend is auto-detected from the installed TornadoVM SDK import argparse import glob import os +import re import subprocess import sys import time @@ -80,6 +81,21 @@ class LlamaRunner: print("Note: check set_path in root dir -> source set_path") sys.exit(1) + self.java_version = self._detect_java_version() + + def _detect_java_version(self) -> Optional[int]: + """Parse the JDK feature/major version out of `$JAVA_HOME/bin/java -version`, + e.g. 'openjdk version "21.0.2" ...' -> 21, 'openjdk version "27-ea" ...' -> 27.""" + try: + output = subprocess.run( + [f"{self.java_home}/bin/java", "-version"], + capture_output=True, text=True, check=True, + ).stderr + except (OSError, subprocess.CalledProcessError): + return None + match = re.search(r'version "(\d+)', output) + return int(match.group(1)) if match else None + def _validate_paths(self): """Validate that required paths exist.""" paths_to_check = { @@ -134,19 +150,49 @@ class LlamaRunner: def _build_base_command(self, args: argparse.Namespace) -> List[str]: """Build the base Java command with JVM options.""" + # JDK 27+ removed the platform jdk.internal.vm.ci module entirely; TornadoVM ships a + # vendored same-named module for that case, which must go on the module-path (mirrors + # tornado.py's self.jvmci_absent). On JDK <=26 the platform module is still present and + # a same-named module on the module-path would cause a "two versions of module" error, + # so it's deliberately left off here -- see the --patch-module handling below instead. + jvmci_absent = self.java_version is not None and self.java_version >= 27 + module_path_entries = [".", f"{self.tornado_sdk}/share/java/tornado"] + if jvmci_absent: + module_path_entries.append(f"{self.tornado_sdk}/share/java/jvmci") + cmd = [ f"{self.java_home}/bin/java", "-server", "-XX:+UnlockExperimentalVMOptions", - "-XX:+EnableJVMCI", - f"-Xms{args.heap_min}", - f"-Xmx{args.heap_max}", - "--enable-preview", - f"-Djava.library.path={self.tornado_sdk}/lib", - "-Djdk.module.showModuleResolution=false", - "--module-path", - self.module_path_colon_sep([".", f"{self.tornado_sdk}/share/java/tornado"]), ] + if jvmci_absent: + # JDK 27+ removed JVMCI entirely (openjdk/jdk#30834): -XX:+EnableJVMCI is now an + # unrecognized (fatal) VM option, and Panama/FFM is final so --enable-preview is + # unnecessary. Mirrors tornado.py's __JAVA_BASE_OPTIONS_NO_JVMCI__: set the saved + # property the vendored jdk.vm.ci.services.Services.checkJVMCIEnabled() reads + # (HotSpot's own +EnableJVMCI bookkeeping no longer exists to set it), and export the + # java.base internals the vendored jdk.internal.vm.ci module needs. + cmd.extend( + [ + "-Djdk.internal.vm.ci.enabled=true", + "--add-exports", "java.base/jdk.internal.misc=jdk.internal.vm.ci", + "--add-exports", "java.base/jdk.internal.vm=jdk.internal.vm.ci", + "--add-exports", "java.base/jdk.internal.vm.annotation=jdk.internal.vm.ci", + "--add-exports", "java.base/jdk.internal.reflect=jdk.internal.vm.ci", + ] + ) + else: + cmd.extend(["-XX:+EnableJVMCI", "--enable-preview"]) + cmd.extend( + [ + f"-Xms{args.heap_min}", + f"-Xmx{args.heap_max}", + f"-Djava.library.path={self.tornado_sdk}/lib", + "-Djdk.module.showModuleResolution=false", + "--module-path", + self.module_path_colon_sep(module_path_entries), + ] + ) # TornadoVM configuration tornado_config = [ @@ -266,6 +312,21 @@ class LlamaRunner: add_modules.append(BACKEND_MODULE_NAME[backend]) module_config.extend(["--add-modules", ",".join(add_modules)]) + # JDK 22-26 still ship jdk.internal.vm.ci, but its jdk.vm.ci.* interfaces have drifted + # from the JDK-21 shape the reflection providers were compiled against (e.g. + # jdk.vm.ci.code.Architecture's constructor). Overlay the frozen JDK-21 classes so the + # loaded jdk.vm.ci.* matches what was compiled -- mirrors tornado.py's jvmci_patched + # branch, which `tornado --printJavaFlags` applies but this script builds its command + # independently of, so it has to be replicated here too. + if self.java_version is not None and 22 <= self.java_version <= 26: + module_config.extend( + [ + "-Djdk.internal.vm.ci.enabled=true", + "--patch-module", + f"jdk.internal.vm.ci={self.tornado_sdk}/share/java/jvmci/jvmci-21.0.2.jar", + ] + ) + if getattr(args, "server", False): main_class = "org.beehive.gpullama3.server.OpenAIServer" elif getattr(args, "bench", False): diff --git a/pom.xml b/pom.xml index 16936920..4d455112 100644 --- a/pom.xml +++ b/pom.xml @@ -176,7 +176,7 @@ ─────────────────────────────────────────────────────────────────────── --> jdk25 - [25.0.2,) + [25.0.2,26) 25 25 @@ -200,6 +200,42 @@ + + + jdk27 + [27,) + + 27 + 27 + -jdk27 + 5.2.1-jdk27-dev + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + --add-modules + jdk.incubator.vector + + + + + + + release From 50dd322706bd7d681c77f07ce7f369a90538dc51 Mon Sep 17 00:00:00 2001 From: Thanos Stratikopoulos Date: Mon, 10 Aug 2026 16:32:29 +0300 Subject: [PATCH 2/7] [fix] Add jdk26 profile to close JDK 26.x activation gap in pom.xml --- pom.xml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/pom.xml b/pom.xml index 4d455112..f5b5808e 100644 --- a/pom.xml +++ b/pom.xml @@ -200,6 +200,41 @@ + + + jdk26 + [26,27) + + 26 + 26 + -jdk26 + 5.2.1-jdk26-dev + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + --add-modules + jdk.incubator.vector + + + + + + + ${tornadovm.base.version}${jdk.version.suffix} + -dev 25 25 @@ -204,8 +205,8 @@ Auto-activates for JDK 26.x builds. Publishes: gpu-llama3:${revision}-jdk26 TornadoVM: pinned to the locally-built 5.2.1-jdk26-dev artifacts (no - 5.0.0-jdk26 release exists yet, so this does not follow the base+suffix - composition the jdk21/jdk25 profiles use). + 5.0.0-jdk26 release exists yet, so tornadovm.base.version is overridden + to 5.2.1 here and composed with tornadovm.dev.suffix below). Vector API is still incubating in JDK 26; add-modules jdk.incubator.vector is required for compilation. ─────────────────────────────────────────────────────────────────────── --> @@ -216,7 +217,8 @@ 26 26 -jdk26 - 5.2.1-jdk26-dev + 5.2.1 + ${tornadovm.base.version}${jdk.version.suffix}${tornadovm.dev.suffix} @@ -240,8 +242,8 @@ openjdk/jdk#30834 — see the matching jdk27 profile in TornadoVM's own pom). Publishes: gpu-llama3:${revision}-jdk27 TornadoVM: pinned to the locally-built 5.2.1-jdk27-dev artifacts (no - 5.0.0-jdk27 release exists yet, so this does not follow the base+suffix - composition the other profiles use). + 5.0.0-jdk27 release exists yet, so tornadovm.base.version is overridden + to 5.2.1 here and composed with tornadovm.dev.suffix below). No enable-preview: unlike the jdk21/jdk25 profiles, this project's sources compile clean at release 27 with only add-modules jdk.incubator.vector, so the base build's enable-preview arg is dropped via combine.self="override". @@ -253,7 +255,8 @@ 27 27 -jdk27 - 5.2.1-jdk27-dev + 5.2.1 + ${tornadovm.base.version}${jdk.version.suffix}${tornadovm.dev.suffix} From 9d8b64a1150038b1da68953071421926dfbc326f Mon Sep 17 00:00:00 2001 From: Thanos Stratikopoulos Date: Tue, 11 Aug 2026 10:51:35 +0300 Subject: [PATCH 4/7] [fix] Strip TornadoVM -dev suffix in release profile jdk26/jdk27 compose tornadovm.version with tornadovm.dev.suffix (default "-dev") since no GA TornadoVM release exists yet for those JDKs, only locally-built dev artifacts. That property is the actual dependency version for tornado-api/tornado-runtime, so a real `mvn deploy -P release` would otherwise publish a POM depending on an unresolvable *-dev coordinate. Clear it in the release profile, mirroring the existing maven.javadoc.skip/gpg.skip override pattern. Co-Authored-By: Claude Sonnet 5 --- pom.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pom.xml b/pom.xml index 933b01e8..339450ca 100644 --- a/pom.xml +++ b/pom.xml @@ -43,6 +43,10 @@ -jdk21 ${tornadovm.base.version}${jdk.version.suffix} + -dev 25 @@ -279,6 +283,12 @@ false false + + From 6ee8b65b2434435d9d457f07bff6ae2a7ef9a4dc Mon Sep 17 00:00:00 2001 From: Thanos Stratikopoulos Date: Tue, 11 Aug 2026 12:33:51 +0300 Subject: [PATCH 5/7] [fix] Track TornadoVM 5.2.1 uniformly across JDK profiles and releases pom.xml: jdk21/jdk25 composed tornadovm.version without tornadovm.dev.suffix, unlike jdk26/jdk27. Once tornadovm.base.version was bumped to 5.2.1 (current TornadoVM dev target; GA not yet published) this broke default builds on JDK 21/25: they tried to resolve the bare tornado-api/tornado-runtime:5.2.1-jdk{21,25} coordinate, which doesn't exist yet (only the "-dev" line does). Make all four profiles compose tornadovm.version the same way: ${tornadovm.base.version}${jdk.version.suffix}${tornadovm.dev.suffix}. tornadovm.base.version is now the single knob for "which TornadoVM tag are we tracking" - testing/default builds get "-dev" appended (matches a locally-built TornadoVM checkout), and the release profile strips it to resolve the plain GA coordinate instead. Also drops the now-redundant per-profile tornadovm.base.version override in jdk26/jdk27 and refreshes stale profile comments accordingly. deploy-maven-central.yml: documents (commented out) the jdk26/jdk27 matrix entries to add once TornadoVM's 5.2.1 GA is actually published for those JDKs - left disabled for now so the release pipeline doesn't attempt a deploy that's guaranteed to fail on dependency resolution. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/deploy-maven-central.yml | 8 ++++ pom.xml | 52 +++++++++++++--------- 2 files changed, 38 insertions(+), 22 deletions(-) diff --git a/.github/workflows/deploy-maven-central.yml b/.github/workflows/deploy-maven-central.yml index 7cd23b6b..c360ec17 100644 --- a/.github/workflows/deploy-maven-central.yml +++ b/.github/workflows/deploy-maven-central.yml @@ -33,6 +33,14 @@ jobs: java_version: 21.0.2-open - name: jdk25 java_version: 25.0.2-open + # jdk26/jdk27 intentionally held back: TornadoVM has not yet published GA + # 5.2.1-jdk26/-jdk27 to Maven Central (only the "-dev" line exists today), so + # a deploy attempt would just fail on dependency resolution. Add matrix entries + # - name: jdk26 + # java_version: 26.0.2-open + # - name: jdk27 + # java_version: 27.ea.31-open # no GA JDK 27 build exists yet either + # back once TornadoVM's 5.2.1 GA release is confirmed published. steps: - name: Checkout code diff --git a/pom.xml b/pom.xml index 339450ca..d89c0a92 100644 --- a/pom.xml +++ b/pom.xml @@ -39,14 +39,16 @@ 1.0.0 - 5.0.0 + 5.2.1 -jdk21 ${tornadovm.base.version}${jdk.version.suffix} - + -dev 25 @@ -143,7 +145,11 @@ @@ -153,7 +159,7 @@ 21 21 -jdk21 - ${tornadovm.base.version}${jdk.version.suffix} + ${tornadovm.base.version}${jdk.version.suffix}${tornadovm.dev.suffix} @@ -175,7 +181,8 @@ @@ -186,7 +193,7 @@ 25 25 -jdk25 - ${tornadovm.base.version}${jdk.version.suffix} + ${tornadovm.base.version}${jdk.version.suffix}${tornadovm.dev.suffix} @@ -208,9 +215,10 @@ @@ -221,7 +229,6 @@ 26 26 -jdk26 - 5.2.1 ${tornadovm.base.version}${jdk.version.suffix}${tornadovm.dev.suffix} @@ -245,9 +252,8 @@ Auto-activates for JDK 27+ builds (JVMCI fully removed upstream, openjdk/jdk#30834 — see the matching jdk27 profile in TornadoVM's own pom). Publishes: gpu-llama3:${revision}-jdk27 - TornadoVM: pinned to the locally-built 5.2.1-jdk27-dev artifacts (no - 5.0.0-jdk27 release exists yet, so tornadovm.base.version is overridden - to 5.2.1 here and composed with tornadovm.dev.suffix below). + TornadoVM: ${tornadovm.base.version}-jdk27${tornadovm.dev.suffix} - inherits + tornadovm.base.version from the top-level properties, same as jdk26 above. No enable-preview: unlike the jdk21/jdk25 profiles, this project's sources compile clean at release 27 with only add-modules jdk.incubator.vector, so the base build's enable-preview arg is dropped via combine.self="override". @@ -259,7 +265,6 @@ 27 27 -jdk27 - 5.2.1 ${tornadovm.base.version}${jdk.version.suffix}${tornadovm.dev.suffix} @@ -283,11 +288,14 @@ false false - + From b259aa96aca5a347f80c77b1d5502d8b1481f531 Mon Sep 17 00:00:00 2001 From: Thanos Stratikopoulos Date: Wed, 12 Aug 2026 17:45:04 +0300 Subject: [PATCH 6/7] [build] Collapse jdk25/jdk26/jdk27 into one jdk22plus profile TornadoVM consolidated its old per-version jdk25/jdk26/jdk27 dev profiles into a single jdk22plus SDK build that runs unchanged across JDK 22-27+ (one build, floor-compiled at release 22 - see TornadoVM's own pom.xml). Mirror that here instead of maintaining three near- identical profiles that only differed in the revision string: - jdk21 narrowed to [21,22), now that jdk22plus covers the rest - jdk25/jdk26/jdk27 replaced by one jdk22plus profile, activation [22,), suffix -jdk22plus, publishing gpu-llama3:${revision}-jdk22plus - Drops --enable-preview (FFM, the only reason jdk21 needs it, is final since JDK 22) via combine.self="override", keeping only add-modules jdk.incubator.vector - exactly what the former jdk27 profile already proved compiles clean, now applied across the whole [22,) range - deploy-maven-central.yml: renamed the jdk25 matrix entry to jdk22plus (still built on 25.0.2-open, just no longer a jdk25-only artifact) and dropped the jdk26/jdk27-held-back note - one published *-jdk22plus artifact now serves that whole range, no separate matrix entries needed once TornadoVM publishes a 5.2.1 GA release Verified `./mvnw clean package -DskipTests` on JDK 25 resolves tornado-api/tornado-runtime:5.2.1-jdk22plus-dev and produces gpu-llama3-1.0.0-jdk22plus.jar. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/deploy-maven-central.yml | 19 ++-- pom.xml | 106 ++++----------------- 2 files changed, 31 insertions(+), 94 deletions(-) diff --git a/.github/workflows/deploy-maven-central.yml b/.github/workflows/deploy-maven-central.yml index c360ec17..e498987e 100644 --- a/.github/workflows/deploy-maven-central.yml +++ b/.github/workflows/deploy-maven-central.yml @@ -31,16 +31,17 @@ jobs: jdk: - name: jdk21 java_version: 21.0.2-open - - name: jdk25 + - name: jdk22plus java_version: 25.0.2-open - # jdk26/jdk27 intentionally held back: TornadoVM has not yet published GA - # 5.2.1-jdk26/-jdk27 to Maven Central (only the "-dev" line exists today), so - # a deploy attempt would just fail on dependency resolution. Add matrix entries - # - name: jdk26 - # java_version: 26.0.2-open - # - name: jdk27 - # java_version: 27.ea.31-open # no GA JDK 27 build exists yet either - # back once TornadoVM's 5.2.1 GA release is confirmed published. + # A single jdk22plus matrix entry now covers JDK 22 through 27+: the pom's + # jdk22plus profile (which replaced the former separate jdk25/jdk26/jdk27 + # profiles) publishes one gpu-llama3:*-jdk22plus artifact that every JDK in + # that range resolves, mirroring TornadoVM's own consolidated jdk22plus SDK. + # Building it on 25.0.2-open is just this job's pick of JDK within the range, + # not a jdk25-specific artifact - no separate jdk26/jdk27 entries are needed. + # TornadoVM has not yet published GA 5.2.1-jdk22plus to Maven Central (only + # the "-dev" line exists today), so this entry will fail dependency resolution + # until that GA release lands - same caveat the old jdk26/jdk27 note carried. steps: - name: Checkout code diff --git a/pom.xml b/pom.xml index d89c0a92..6456a19b 100644 --- a/pom.xml +++ b/pom.xml @@ -154,7 +154,7 @@ ─────────────────────────────────────────────────────────────────────── --> jdk21 - [21,25) + [21,22) 21 21 @@ -178,93 +178,29 @@ - - jdk25 - [25.0.2,26) + jdk22plus + [22,) - 25 - 25 - -jdk25 - ${tornadovm.base.version}${jdk.version.suffix}${tornadovm.dev.suffix} - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - - --add-modules - jdk.incubator.vector - - - - - - - - - - jdk26 - [26,27) - - 26 - 26 - -jdk26 - ${tornadovm.base.version}${jdk.version.suffix}${tornadovm.dev.suffix} - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - - --add-modules - jdk.incubator.vector - - - - - - - - - - jdk27 - [27,) - - 27 - 27 - -jdk27 + 22 + 22 + -jdk22plus ${tornadovm.base.version}${jdk.version.suffix}${tornadovm.dev.suffix} From 5767dbb5e908671bfa5e80ec65af7eb647201c0c Mon Sep 17 00:00:00 2001 From: Thanos Stratikopoulos Date: Wed, 12 Aug 2026 18:02:12 +0300 Subject: [PATCH 7/7] [docs] Update JDK prerequisites for jdk22plus profile (22-27+) pom.xml collapsed the old per-version jdk25/jdk26/jdk27 profiles into one jdk22plus profile ([22,)). Bring docs and release automation in line: - README.md: Prerequisites bullet, Java badge, and Maven/Gradle dependency snippets now reference jdk21/jdk22plus instead of the removed jdk25 profile. - prepare-release.yml: the README-snippet generator was still hardcoding jdk25/-jdk25, which would have written broken artifact coordinates on the next release since that profile no longer exists. Now generates jdk21/jdk22plus. - build-n-run-engine/SKILL.md, build-tornado/SKILL.md: prerequisite JDK lists updated from "21, 25, or 27" to "21, or 22+ (22-27+)". --- .claude/skills/build-n-run-engine/SKILL.md | 4 ++-- .claude/skills/build-tornado/SKILL.md | 2 +- .github/workflows/prepare-release.yml | 10 +++++----- README.md | 14 +++++++------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.claude/skills/build-n-run-engine/SKILL.md b/.claude/skills/build-n-run-engine/SKILL.md index 82999366..c25643a0 100644 --- a/.claude/skills/build-n-run-engine/SKILL.md +++ b/.claude/skills/build-n-run-engine/SKILL.md @@ -20,7 +20,7 @@ Build GPULlama3.java (this repo) with Maven, skipping tests for speed. ## Prerequisites -- `JAVA_HOME` set to JDK 21, 25, or 27 (`java -version`) +- `JAVA_HOME` set to JDK 21, or JDK 22+ (22, 23, 24, 25, 26, 27, ...) (`java -version`) - `TORNADOVM_HOME` set and `tornado --devices` succeeds — if not, run the `build-tornado` skill first - `~/TornadoVM/setvars.sh` sourced in **this** shell (env vars don't persist across shells/tool calls) @@ -51,7 +51,7 @@ git checkout && git pull mvn clean install -DskipTests ``` -For JDK 25 or JDK 27 instead of the default JDK 21, ensure `JAVA_HOME` points at that JDK before building — the pom auto-activates the matching `jdk25`/`jdk27` profile from the detected JDK version, there is no separate `BACKEND=`-style flag. The `jdk27` profile pins `tornadovm.version` to the locally-installed `5.2.1-jdk27-dev` artifact (no `5.0.0-jdk27` release exists) and compiles without `--enable-preview` (unnecessary at release 27; only `--add-modules jdk.incubator.vector` is needed). +For JDK 22 and newer (22, 23, 24, 25, 26, 27, ...) instead of the default JDK 21, ensure `JAVA_HOME` points at that JDK before building — the pom auto-activates the `jdk22plus` profile (activation range `[22,)`) from the detected JDK version, there is no separate `BACKEND=`-style flag. `jdk22plus` replaced the former per-version `jdk25`/`jdk26`/`jdk27` profiles with one consolidated profile that pins `tornadovm.version` to the locally-installed `5.2.1-jdk22plus-dev` artifact and compiles without `--enable-preview` (unnecessary from release 22 onward; only `--add-modules jdk.incubator.vector` is needed). ### Step 5: Verify diff --git a/.claude/skills/build-tornado/SKILL.md b/.claude/skills/build-tornado/SKILL.md index d57ba14a..3b7b6a91 100644 --- a/.claude/skills/build-tornado/SKILL.md +++ b/.claude/skills/build-tornado/SKILL.md @@ -18,7 +18,7 @@ Build TornadoVM from source. Available backends: `opencl` (default), `ptx`, `spi ## Prerequisites -- JAVA_HOME is set to jdk 21, 25, or 27 +- JAVA_HOME is set to jdk 21, or 22+ (22, 23, 24, 25, 26, 27, ...) - `nvidia-smi` succeeds (GPUs visible) Note: JDK 27 removed JVMCI entirely (openjdk/jdk#30834). TornadoVM's `jdk27` pom profile diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 7a053e64..4190c263 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -92,7 +92,7 @@ jobs: SNIPPET_FILE="${{ runner.temp }}/dependency_snippet.md" cat > "$SNIPPET_FILE" < io.github.beehive-lab @@ -101,12 +101,12 @@ jobs: \`\`\` - **JDK 25** (\`jdk25\` profile, auto-activates for JDK \`[25.0.2,)\`): + **JDK 22+** (\`jdk22plus\` profile, auto-activates for JDK \`[22,)\` — covers 22, 23, 24, 25, 26, 27 and later): \`\`\`xml io.github.beehive-lab gpu-llama3 - ${VERSION}-jdk25 + ${VERSION}-jdk22plus \`\`\` @@ -117,9 +117,9 @@ jobs: implementation 'io.github.beehive-lab:gpu-llama3:${VERSION}-jdk21' \`\`\` - **JDK 25**: + **JDK 22+**: \`\`\`groovy - implementation 'io.github.beehive-lab:gpu-llama3:${VERSION}-jdk25' + implementation 'io.github.beehive-lab:gpu-llama3:${VERSION}-jdk22plus' \`\`\` EOF diff --git a/README.md b/README.md index 8b7561b1..566da9a1 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![build JDK21](https://github.com/beehive-lab/GPULlama3.java/actions/workflows/build-and-run.yml/badge.svg)](https://github.com/beehive-lab/GPULlama3.java/actions/workflows/build-and-run.yml) [![Maven Central](https://img.shields.io/maven-central/v/io.github.beehive-lab/gpu-llama3?&logo=apache-maven&color=blue)](https://central.sonatype.com/artifact/io.github.beehive-lab/gpu-llama3) ![Java 21](https://img.shields.io/badge/java-21-blue?logo=openjdk) -![Java 25](https://img.shields.io/badge/java-25-yellow?logo=openjdk) +![Java 22+](https://img.shields.io/badge/java-22%2B-yellow?logo=openjdk) [![LangChain4j](https://img.shields.io/badge/LangChain4j-1.7.1+-purple?&logo=link&logoColor=white)](https://docs.langchain4j.dev/) ![NVIDIA](https://img.shields.io/badge/CUDA%20%7C%20PTX-supported-76B900?logo=nvidia) ![OpenCL](https://img.shields.io/badge/OpenCL-supported-blue?logo=khronos) @@ -94,7 +94,7 @@ GPULlama3ChatModel model = GPULlama3ChatModel.builder() ### 📦 Maven -**JDK 21** (`jdk21` profile, auto-activates for JDK `[21,25)`): +**JDK 21** (`jdk21` profile, auto-activates for JDK `[21,22)`): ```xml io.github.beehive-lab @@ -103,12 +103,12 @@ GPULlama3ChatModel model = GPULlama3ChatModel.builder() ``` -**JDK 25** (`jdk25` profile, auto-activates for JDK `[25.0.2,)`): +**JDK 22+** (`jdk22plus` profile, auto-activates for JDK `[22,)` — covers 22, 23, 24, 25, 26, 27 and later): ```xml io.github.beehive-lab gpu-llama3 - 1.0.0-jdk25 + 1.0.0-jdk22plus ``` @@ -119,9 +119,9 @@ GPULlama3ChatModel model = GPULlama3ChatModel.builder() implementation 'io.github.beehive-lab:gpu-llama3:1.0.0-jdk21' ``` -**JDK 25**: +**JDK 22+**: ```groovy -implementation 'io.github.beehive-lab:gpu-llama3:1.0.0-jdk25' +implementation 'io.github.beehive-lab:gpu-llama3:1.0.0-jdk22plus' ``` @@ -137,7 +137,7 @@ implementation 'io.github.beehive-lab:gpu-llama3:1.0.0-jdk25' ### Prerequisites -- **Java 21** — required for the Vector API & TornadoVM (Java 25 supported via the `-jdk25` artifact / `llamaTornado` script). +- **Java 21+** — required for the Vector API & TornadoVM. JDK 21 uses the `-jdk21` artifact; JDK 22 and newer (22, 23, 24, 25, 26, 27, ...) uses the `-jdk22plus` artifact / `llamaTornado` script. - **[TornadoVM](https://github.com/beehive-lab/TornadoVM)** with an OpenCL, PTX, CUDA, or Metal backend. `llama-tornado`/`llamaTornado` auto-detect whichever backend your installed SDK was built with. - **GCC/G++ 13+** — to build TornadoVM's native components.