styp / java-vbench Goto Github PK
View Code? Open in Web Editor NEWJava 18 - Vector API Benchmark
Java 18 - Vector API Benchmark
Hi there, really nice project and article!
When I clone the repo and run ./gradlew test
, the test mulMatrixvsMatrixBlockedVectorUnrolled
fails with this message:
org.opentest4j.AssertionFailedError: expected: <124.42004> but was: <0.0>
at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:118)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:113)
at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:856)
at app//ch.styp.MatrixMulTest.mulMatrixvsMatrixBlockedVectorUnrolled(MatrixMulTest.java:62)
...
Sometimes, also the test fmaArrayVectorVsScalar
fails with the message:
org.opentest4j.AssertionFailedError: expected: <226.77946> but was: <226.77934>
at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:118)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:113)
at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:856)
at app//ch.styp.SumArrayTest.fmaArrayVectorVsScalar(SumArrayTest.java:49)
...
This happens on java 17.0.8 Temurin, on 18 OpenJDK and on 20 OpenJDK (I have not tested other versions).
I am working on Ubuntu 22.04.3 on an Intel(R) Core(TM) i7-7700
.
P.S.
Aside from this problem, I notice that the tests for correctness aren't as complete as I think they should be, so I'm working on a PR right now to fix them.
If boot in clean and build you get an assertion error. Try it again and the error goes away.
pi@gandalf:~/java-vbench $ gradle clean
Starting a Gradle Daemon (subsequent builds will be faster)
BUILD SUCCESSFUL in 25s
1 actionable task: 1 executed
pi@gandalf:~/java-vbench $ gradle build
Task :compileJava
warning: using incubating module(s): jdk.incubator.vector
1 warning
Task :compileTestJava
warning: using incubating module(s): jdk.incubator.vector
1 warning
Task :test
WARNING: Using incubator modules: jdk.incubator.vector
SumArrayTest > fmaArrayVectorVsScalar() FAILED
org.opentest4j.AssertionFailedError at SumArrayTest.java:49
3 tests completed, 1 failed
Task :test FAILED
FAILURE: Build failed with an exception.
There were failing tests. See the report at: file:///home/pi/java-vbench/build/reports/tests/test/index.html
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
BUILD FAILED in 12s
4 actionable tasks: 4 executed
pi@gandalf:~/java-vbench $ gradle clean
BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed
pi@gandalf:~/java-vbench $ gradle build
Task :compileJava
warning: using incubating module(s): jdk.incubator.vector
1 warning
Task :compileTestJava
warning: using incubating module(s): jdk.incubator.vector
1 warning
Task :test
WARNING: Using incubator modules: jdk.incubator.vector
BUILD SUCCESSFUL in 7s
4 actionable tasks: 4 executed
pi@gandalf:~/java-vbench $
Not really a code bug I would guess but a little strange.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.