beehive-lab / TornadoVM

TornadoVM: A practical and efficient heterogeneous programming framework for managed languages
https://www.tornadovm.org
Apache License 2.0
1.18k stars 113 forks source link

Support for JDK 22.0.2 and migrate to Graal compiler 24.0.2 #465

Open mikepapadim opened 3 months ago

mikepapadim commented 3 months ago

This PR is in working state for TornadoVM running with JDK22 and Graal 24.0.1.

How to test:

make jdk22 BACKEND=opencl
make tests

make jdk22 BACKEND=ptx
make tests

make jdk22 BACKEND=spirv
make tests

Excpected pass-rate:

andrii0lomakin commented 2 months ago

@mikepapadim, will JDK 21 still be supported? Many companies will deny to use non-LTS versions.

mikepapadim commented 2 months ago

@mikepapadim, will JDK 21 still be supported? Many companies will deny to use non-LTS versions.

We dont plan to merge this at least until the next LTS-release (JDK25, Sept 2025). We are going to keep into a seperate branch in case users on JDK22+ want to use TornadoVM.

andrii0lomakin commented 2 months ago

@mikepapadim Got it, but do you plan to merge the new proxy implementation for MemorySegment?

mikepapadim commented 2 months ago

This now ready:

Pass-rate:

SPIR-V:

==================================================
              Unit tests report 
==================================================

{'[PASS]': 572, '[FAILED]': 5, '[UNSUPPORTED]': 141}
Coverage [PASS/(PASS+FAIL)]: 99.13%
Coverage [PASS/(PASS+FAIL+UNSUPPORTED)]: 79.67%

==================================================

PTX:

==================================================
              Unit tests report 
==================================================

{'[PASS]': 658, '[FAILED]': 4, '[UNSUPPORTED]': 56}
Coverage [PASS/(PASS+FAIL)]: 99.4%
Coverage [PASS/(PASS+FAIL+UNSUPPORTED)]: 91.64%

==================================================

OpenCL:

==================================================
              Unit tests report 
==================================================

{'[PASS]': 668, '[FAILED]': 5, '[UNSUPPORTED]': 45}
Coverage [PASS/(PASS+FAIL)]: 99.26%
Coverage [PASS/(PASS+FAIL+UNSUPPORTED)]: 93.04%

==================================================
jjfumero commented 2 months ago

Awesome!

@mairooni , @stratika and myself, let's initiate final testing.

Note, this branch is not going to be merge due to changes in GraalVM - JDK. The idea is to keep this branch alive and aligned with master until JDK 25. Then this branch will be pushed into master.

andrii0lomakin commented 2 months ago

BTW OpenJDK 23 already has GraalJIT inside of IT https://download.java.net/java/early_access/jdk23/docs/specs/man/java.html#enabling-the-graal-jit-compiler, so there will be no need to provide separate jars.

stratika commented 2 months ago

Here is a summary of the tests I have tried. I think it looks in an advanced state the branch, I have spotted three issues.

stratika commented 2 months ago

Here is a summary of the tests I have tried. I think it looks in an advanced state the branch, I have spotted three issues.

I tested the branch for OpenCL and PTX on Windows 11. I did a minor update in the Makefile.mak file to be synced with the Makefile.

jjfumero commented 1 month ago

Latest version available in: https://github.com/beehive-lab/TornadoVM/tree/jdk22-graal-24.0.2