GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — biojava-tornadovm: opt-in GPU paths for ASA and all-pairs alignment scores (TornadoVM 8.0.0) by mikepapadim · Pull Request #1162 · biojava/biojava

Conversation

@mikepapadim

@mikepapadim mikepapadim commented Oct 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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:

  • Default build unchanged. The module builds only with -Ptornadovm. It needs JDK 21, and every other module keeps the JDK 11 baseline.
  • Not a runtime dependency. tornado-api is provided; nothing in the existing modules depends on the new one.
  • Drop-in and exact. TornadoAsaCalculator and TornadoAlignments mirror 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.

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-opencl and TORNADO_BACKEND=opencl.

sdk install java 21.0.2-open
sdk install tornadovm 8.0.0-jdk21-cuda
export JAVA_HOME=$HOME/.sdkman/candidates/java/21.0.2-open

git fetch origin pull/1162/head:tornadovm && git checkout tornadovm
mvn -Ptornadovm -pl biojava-tornadovm -am install -DskipTests

cd biojava-tornadovm
scripts/test-gpu.sh      # the 23 parity tests under TornadoVM: GPU results == BioJava results
./bench.sh               # parity tests + ASA and all-pairs benchmarks (downloads 5 PDB entries)

git fetch origin pull/1162/head only checks out this PR, because the module exists here until it is merged. TornadoVM itself is the stock 8.0.0 release: tornado-api 8.0.0-jdk21 from Maven Central, and the SDKMAN SDK. After a merge, git clone of master and the same mvn -Ptornadovm ... line are enough.

The scripts find TornadoVM 8.0.0 in SDKMAN by version, and install it with sdk install if it is missing. Without SDKMAN they download the release SDK. mvn -Ptornadovm -pl biojava-tornadovm test runs the same tests on a plain JVM, which covers the CPU paths. biojava-tornadovm/README.md covers using the classes in an application.

Tested

  • 23/23 parity tests under TornadoVM 8.0.0 on an RTX 4090 with the CUDA backend, an RTX 4090 with OpenCL, and an Intel UHD 770 with OpenCL (no FP64; ASA then uses its exact single-precision path).
  • 23/23 on a plain JVM (CPU paths).
  • mvn validate without the profile does not include the module.
Workload (RTX 4090, i9-13900K 32 threads, end to end) BioJava lean Java (32 thr) GPU
ASA 4V6X, 238k atoms 558 ms (32 thr) 109 ms 35.7 ms
ASA 3J3Q, 2.4M atoms 6.92 s (32 thr) 1.16 s 373 ms
All-pairs global, 200 proteins, 20k pairs 9.97 s 417 ms 17.0 ms
All-pairs local, 200 proteins, 20k pairs 10.5 s 293 ms 17.0 ms

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-alignment itself.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mikepapadim
biojava-tornadovm: GPU paths for ASA and all-pairs alignment scores (…
f9dbcae
…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
mikepapadim marked this pull request as ready for review October 28, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@mikepapadim
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.