Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 62 commits into
base: develop
Choose a base branch
from

Conversation

mikepapadim
Copy link
Member

@mikepapadim mikepapadim commented Jun 27, 2024

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
Copy link
Contributor

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

@mikepapadim
Copy link
Member Author

@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
Copy link
Contributor

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

@mikepapadim
Copy link
Member Author

mikepapadim commented Jul 25, 2024

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%

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

@mikepapadim mikepapadim changed the title Migrate TornadoVM to JDK22 and update Graal compiler to 24.0.1 Support for JDK22 and migrate to Graal compiler 24.0.1 Jul 25, 2024
@jjfumero
Copy link
Member

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.

@jjfumero jjfumero added the graal-update Update the Graal JIT compiler label Jul 25, 2024
@mikepapadim mikepapadim changed the title Support for JDK22 and migrate to Graal compiler 24.0.1 Support for JDK 22.0.2 and migrate to Graal compiler 24.0.2 Jul 27, 2024
if (stamp instanceof OCLStamp && ((OCLStamp) stamp).oclKind == oclKind) {
return true;
}
if (stamp instanceof OCLStamp) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we have also this for the PTX backend?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do have it: faad244

@andrii0lomakin
Copy link
Contributor

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
Copy link
Collaborator

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
Copy link
Collaborator

stratika commented Aug 1, 2024

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
Copy link
Member

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

jjfumero added a commit to jjfumero/TornadoVM that referenced this pull request Aug 30, 2024
Improvements
~~~~~~~~~~~~~~~~~~

- beehive-lab#468: Cleanup Abstract Metadata Class.
- beehive-lab#473: Add maven plugin to build TornadoVM source for the releases.
- beehive-lab#474: Refactor `<X>TornadoDevice` to place common methods in the `TornadoXPUInterface`.
- beehive-lab#482: Help messages improve when an out-of-memory exception is raised.
- beehive-lab#484: Double-type for the trigonometric functions added in the `TornadoMath` class.
- beehive-lab#487: Prebuilt API simplified.
- beehive-lab#494: Add test to trigger unsupported features related to direct use of Memory Segments.
- beehive-lab#509: Add a quick pass configuration to skip the heavy tests during active development.
- beehive-lab#532: Improve thread scheduler to support RISC-V Accelerators from Codeplay.
- beehive-lab#533: Support for scalar values to be passed via lambda expressions as tasks.
- beehive-lab#538: `README` file updated.
- beehive-lab#539: Refactor core classes and add new API methods to pass compilation flags to the low-level driver compilers (OpenCL, PTX and Level Zero).
- beehive-lab#542: Tagged LevelZero JNI and Beehive Toolkit dependencies added in the build and installer.

Compatibility
~~~~~~~~~~~~~~~~~~

- beehive-lab#465: Support for JDK 22 and GraalVM 24.0.2.
- beehive-lab#486: Temurin for Windows added in the list of supported JDKs.
- beehive-lab#525: Revert usage of String Templates in preparation for JDK 23.
- beehive-lab#527: SPIR-V version parameter added. TornadoVM may run previous SPIR-V versions (e.g., ComputeAorta from Codeplay).
- beehive-lab#513: LevelZero JNI Library updated to v0.1.4.

Bug Fixes
~~~~~~~~~~~~~~~~~~

- beehive-lab#470: README documentation fixed.
- beehive-lab#478: Fix the test names that are present in the white list.
- beehive-lab#488: FP64 Kind for radian operations and the PTX backend fixed.
- beehive-lab#493: Tests Whitelist for PTX backend fixed.
- beehive-lab#502: Fix barrier type in the documentation regarding programmability of reductions.
- beehive-lab#514: Installer script fixed.
- beehive-lab#540: Fix  issue with clean-up execution IDs function.
- beehive-lab#541: Fix Data Accessors for the prebuilt API.
- beehive-lab#543: Fix checkstyle condition and FP16 error message improved.
jjfumero added a commit to jjfumero/TornadoVM that referenced this pull request Aug 30, 2024
Improvements
~~~~~~~~~~~~~~~~~~

- beehive-lab#468: Cleanup Abstract Metadata Class.
- beehive-lab#473: Add maven plugin to build TornadoVM source for the releases.
- beehive-lab#474: Refactor `<X>TornadoDevice` to place common methods in the `TornadoXPUInterface`.
- beehive-lab#482: Help messages improved when an out-of-memory exception is raised.
- beehive-lab#484: Double-type for the trigonometric functions added in the `TornadoMath` class.
- beehive-lab#487: Prebuilt API simplified.
- beehive-lab#494: Add test to trigger unsupported features related to direct use of Memory Segments.
- beehive-lab#509: Add a quick pass configuration to skip the heavy tests during active development.
- beehive-lab#532: Improve thread scheduler to support RISC-V Accelerators from Codeplay.
- beehive-lab#533: Support for scalar values to be passed via lambda expressions as tasks.
- beehive-lab#538: `README` file updated.
- beehive-lab#539: Refactor core classes and add new API methods to pass compilation flags to the low-level driver compilers (OpenCL, PTX and Level Zero).
- beehive-lab#542: Tagged LevelZero JNI and Beehive Toolkit dependencies added in the build and installer.

Compatibility
~~~~~~~~~~~~~~~~~~

- beehive-lab#465: Support for JDK 22 and GraalVM 24.0.2.
- beehive-lab#486: Temurin for Windows added in the list of supported JDKs.
- beehive-lab#525: Revert usage of String Templates in preparation for JDK 23.
- beehive-lab#527: SPIR-V version parameter added. TornadoVM may run previous SPIR-V versions (e.g., ComputeAorta from Codeplay).
- beehive-lab#513: LevelZero JNI Library updated to v0.1.4.

Bug Fixes
~~~~~~~~~~~~~~~~~~

- beehive-lab#470: README documentation fixed.
- beehive-lab#478: Fix the test names that are present in the white list.
- beehive-lab#488: FP64 Kind for radian operations and the PTX backend fixed.
- beehive-lab#493: Tests Whitelist for PTX backend fixed.
- beehive-lab#502: Fix barrier type in the documentation regarding programmability of reductions.
- beehive-lab#514: Installer script fixed.
- beehive-lab#540: Fix  issue with clean-up execution IDs function.
- beehive-lab#541: Fix Data Accessors for the prebuilt API.
- beehive-lab#543: Fix checkstyle condition and FP16 error message improved.

minor change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
graal-update Update the Graal JIT compiler
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants