Repository navigation
biojava-tornadovm: opt-in GPU paths for ASA and all-pairs alignment scores (TornadoVM 8.0.0) - #1162
Open
mikepapadim wants to merge 1 commit into
Open
mikepapadim wants to merge 1 commit into
mikepapadim wants to merge 1 commit into
Conversation
…TornadoVM 8.0.0) A new module, built only with -Ptornadovm (JDK 21; the rest of BioJava keeps its JDK 11 baseline). TornadoAsaCalculator and TornadoAlignments are drop-in replacements for AsaCalculator and Alignments.getAllPairsScores / getAllPairsScorers (GLOBAL, LOCAL) and return exactly the same results; without a TornadoVM runtime, below a size threshold or after a GPU failure they run an exact multi-threaded CPU path. TornadoVM 8.0.0 comes from SDKMAN (scripts/env.sh). scripts/test-gpu.sh runs the 23 parity tests under TornadoVM, bench.sh the benchmarks. See biojava#1158.
mikepapadim
marked this pull request as ready for review
October 28, 2026 16:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1158 and #1161: the GPU paths for ASA and all-pairs alignment scores, as an opt-in module,
biojava-tornadovm, using TornadoVM 8.0.0.In #1158 you suggested keeping the GPU code in a separate repository, and it lives at mikepapadim/biojava-tornadovm-extensions. This draft shows the alternative of shipping it inside BioJava without affecting anything else:
-Ptornadovm. It needs JDK 21, and every other module keeps the JDK 11 baseline.tornado-apiisprovided; nothing in the existing modules depends on the new one.TornadoAsaCalculatorandTornadoAlignmentsmirrorAsaCalculatorandAlignments.getAllPairsScores/getAllPairsScorers(GLOBAL,LOCAL) and return exactly the same results. Without a TornadoVM runtime, below a size threshold, or after a GPU failure, they run an exact multi-threaded CPU path.Happy to keep it in the separate repository instead if you prefer; this PR is so you can see what it would look like in-tree.
How to run
Linux with an NVIDIA GPU, using SDKMAN. For AMD or Intel GPUs, use
tornadovm 8.0.0-jdk21-openclandTORNADO_BACKEND=opencl.git fetch origin pull/1162/headonly checks out this PR, because the module exists here until it is merged. TornadoVM itself is the stock 8.0.0 release:tornado-api8.0.0-jdk21 from Maven Central, and the SDKMAN SDK. After a merge,git cloneofmasterand the samemvn -Ptornadovm ...line are enough.The scripts find TornadoVM 8.0.0 in SDKMAN by version, and install it with
sdk installif it is missing. Without SDKMAN they download the release SDK.mvn -Ptornadovm -pl biojava-tornadovm testruns the same tests on a plain JVM, which covers the CPU paths.biojava-tornadovm/README.mdcovers using the classes in an application.Tested
mvn validatewithout the profile does not include the module.All results are identical to BioJava's. "Lean Java" is the same algorithm in plain Java; it is this module's CPU path, and #1161 brings the alignment part of it into
biojava-alignmentitself.