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

SIMD does not support Java 21 #81

Closed
Huge-mistake opened this issue Sep 24, 2023 · 15 comments
Closed

SIMD does not support Java 21 #81

Huge-mistake opened this issue Sep 24, 2023 · 15 comments

Comments

@Huge-mistake
Copy link

Java21 is the LTS version, the official version has been released recently, can pufferfish adapt to make Java 21 support SIMD

@Potothingi
Copy link

Potothingi commented Oct 1, 2023

+ SIMDDetection.versionLimited = SIMDDetection.getJavaVersion() != 17 && SIMDDetection.getJavaVersion() != 18 && SIMDDetection.getJavaVersion() != 19;

SIMDDetection.getJavaVersion() != 17 && SIMDDetection.getJavaVersion() != 18 && SIMDDetection.getJavaVersion() != 19

Why not just change it to 'SIMDDetection.getJavaVersion() < 17'?

@Potothingi
Copy link

#54
#55

@kev626 I think it's safe now that it's not incubator.

@kev626
Copy link
Member

kev626 commented Oct 1, 2023

That has been explained a bunch in the past, yeah it happened that this was incubator. The API behavior was subject to change, so if a change was made, it could theoretically cause the calls to not be inlined and vectorized (and the vectorization would be emulated with for loops) which would absolutely tank performance.

Now that it's out of incubator we can swap out all of the packages here and we'll be good basically forever.

@Potothingi
Copy link

I hope to resolve this in pufferfish 1.20.2.

@Potothingi
Copy link

@kev626 Will this take long because there are a lot of things that need to change?
Java 21 is the latest LTS version and Paper's recommended Java version.
https://docs.papermc.io/misc/java-install

@kev626
Copy link
Member

kev626 commented Oct 16, 2023

This will be added shortly, we're quite bogged down with some stuff right now, but it is on our radar.

@Potothingi
Copy link

This will be added shortly, we're quite bogged down with some stuff right now, but it is on our radar.

Thanks for your response. I thought supporting Java 21 would be as simple as changing SIMDDetection.getJavaVersion() < 17, but I guess not.

@NoltoxGit
Copy link

This will be added shortly, we're quite bogged down with some stuff right now, but it is on our radar.

Hello @kev626, any news about this please ?

@Potothingi
Copy link

Potothingi commented Jan 1, 2024

It's easy. I couldn't find any difference in jdk.incubator.vector.* between Java 19 and 21.
I'm pretty sure Kevin didn't check for Java 21 and forgot about this issue.

if (SIMDDetection.getJavaVersion() != 17 && SIMDDetection.getJavaVersion() != 18 && SIMDDetection.getJavaVersion() != 19)

if (SIMDDetection.getJavaVersion() < 17 || SIMDDetection.getJavaVersion() > 21)

SIMDDetection.versionLimited = SIMDDetection.getJavaVersion() != 17 && SIMDDetection.getJavaVersion() != 18 && SIMDDetection.getJavaVersion() != 19;

SIMDDetection.versionLimited = SIMDDetection.getJavaVersion() < 17 || SIMDDetection.getJavaVersion() > 21;

@SnowzNZ
Copy link

SnowzNZ commented Jan 28, 2024

It's easy. I couldn't find any difference in jdk.incubator.vector.* between Java 19 and 21. I'm pretty sure Kevin didn't check for Java 21 and forgot about this issue.

if (SIMDDetection.getJavaVersion() != 17 && SIMDDetection.getJavaVersion() != 18 && SIMDDetection.getJavaVersion() != 19)

if (SIMDDetection.getJavaVersion() < 17 || SIMDDetection.getJavaVersion() > 21)
SIMDDetection.versionLimited = SIMDDetection.getJavaVersion() != 17 && SIMDDetection.getJavaVersion() != 18 && SIMDDetection.getJavaVersion() != 19;

SIMDDetection.versionLimited = SIMDDetection.getJavaVersion() < 17 || SIMDDetection.getJavaVersion() > 21;

Has this been tested

@Potothingi
Copy link

Has this been tested

Yes I have tested it and am using it with Java 21.
@kev626 Java 21 is the latest LTS. I am waiting for this.

rockfordroeNG added a commit to rockfordroeNG/Pufferfish that referenced this issue Mar 7, 2024
rockfordroeNG added a commit to rockfordroeNG/Pufferfish that referenced this issue Mar 7, 2024
@SageSphinx63920
Copy link

Are there any updates? As far as I read this chat, it should be safe to implement and java 21 is LTS so it should be supported!

@Potothingi
Copy link

@kev626
Copy link
Member

kev626 commented May 30, 2024

This will be implemented with 1.20.6

@kev626
Copy link
Member

kev626 commented Jul 6, 2024

Implemented b1ab664

@kev626 kev626 closed this as completed Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants