You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a first issue when building the spirv backend:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project tornado-drivers-spirv: Compilation failure
[ERROR] /home/thanos/repositories/TornadoVM-stratika/tornado-drivers/spirv/src/main/java/uk/ac/manchester/tornado/drivers/spirv/graal/SPIRVStamp.java:[138,83] error: incompatible types: ResolvedJavaType cannot be converted to JavaKind
I did a small patch, to resolve the fromResolvedJavaType method, similar to the way it is in the other two backends, which you can apply, as follows: JDK22_SPIRV.txt
Then I ran the ray tracer with the regression parameter (in console), and got the output as follows:
tornadovm-ray-tracer regression
-----------------------------------------
Running TornadoVM Ray Tracer benchmark mode...
WARNING: Using incubator modules: jdk.incubator.vector
-----------------------------------------
Building world...
-> Loading Skybox Image 'Sky.jpg'...
-> Adding object to the scene...
-> Allocating object representation buffers...
Exception in thread "main" uk.ac.manchester.tornado.api.exceptions.TornadoInternalError: unimplemented: stamp is compat: spirv: OP_TYPE_VECTOR4_FLOAT_32 + a# uk.ac.manchester.tornado.api.types.vectors.Float4
at tornado.api@1.0.7-dev/uk.ac.manchester.tornado.api.exceptions.TornadoInternalError.unimplemented(TornadoInternalError.java:37)
at tornado.drivers.spirv@1.0.7-dev/uk.ac.manchester.tornado.drivers.spirv.graal.SPIRVStamp.isCompatible(SPIRVStamp.java:143)
at jdk.graal.compiler/jdk.graal.compiler.phases.common.FixReadsPhase$FixReadsClosure.processNode(FixReadsPhase.java:161)
at jdk.graal.compiler/jdk.graal.compiler.phases.graph.ScheduledNodeIterator.processNodes(ScheduledNodeIterator.java:67)
at jdk.graal.compiler/jdk.graal.compiler.phases.common.FixReadsPhase.run(FixReadsPhase.java:689)
at jdk.graal.compiler/jdk.graal.compiler.phases.common.FixReadsPhase.run(FixReadsPhase.java:106)
at jdk.graal.compiler/jdk.graal.compiler.phases.BasePhase.apply(BasePhase.java:435)
at jdk.graal.compiler/jdk.graal.compiler.phases.BasePhase.apply(BasePhase.java:323)
at jdk.graal.compiler/jdk.graal.compiler.phases.PhaseSuite.run(PhaseSuite.java:390)
at jdk.graal.compiler/jdk.graal.compiler.phases.BasePhase.apply(BasePhase.java:435)
at jdk.graal.compiler/jdk.graal.compiler.phases.BasePhase.apply(BasePhase.java:323)
at tornado.drivers.spirv@1.0.7-dev/uk.ac.manchester.tornado.drivers.spirv.graal.compiler.SPIRVCompiler.emitFrontEnd(SPIRVCompiler.java:172)
at tornado.drivers.spirv@1.0.7-dev/uk.ac.manchester.tornado.drivers.spirv.graal.compiler.SPIRVCompiler.compile(SPIRVCompiler.java:121)
at tornado.drivers.spirv@1.0.7-dev/uk.ac.manchester.tornado.drivers.spirv.graal.compiler.SPIRVCompiler$SPIRVCompilationRequest.execute(SPIRVCompiler.java:508)
at tornado.drivers.spirv@1.0.7-dev/uk.ac.manchester.tornado.drivers.spirv.graal.compiler.SPIRVCompiler.compileSketchForDevice(SPIRVCompiler.java:364)
at tornado.drivers.spirv@1.0.7-dev/uk.ac.manchester.tornado.drivers.spirv.runtime.SPIRVTornadoDevice.compileTask(SPIRVTornadoDevice.java:182)
at tornado.drivers.spirv@1.0.7-dev/uk.ac.manchester.tornado.drivers.spirv.runtime.SPIRVTornadoDevice.installCode(SPIRVTornadoDevice.java:135)
at tornado.runtime@1.0.7-dev/uk.ac.manchester.tornado.runtime.interpreter.TornadoVMInterpreter.compileTaskFromBytecodeToBinary(TornadoVMInterpreter.java:662)
at tornado.runtime@1.0.7-dev/uk.ac.manchester.tornado.runtime.interpreter.TornadoVMInterpreter.execute(TornadoVMInterpreter.java:332)
at tornado.runtime@1.0.7-dev/uk.ac.manchester.tornado.runtime.interpreter.TornadoVMInterpreter.execute(TornadoVMInterpreter.java:903)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:782)
at tornado.runtime@1.0.7-dev/uk.ac.manchester.tornado.runtime.TornadoVM.executeInterpreterSingleThreaded(TornadoVM.java:125)
at tornado.runtime@1.0.7-dev/uk.ac.manchester.tornado.runtime.TornadoVM.execute(TornadoVM.java:112)
at tornado.runtime@1.0.7-dev/uk.ac.manchester.tornado.runtime.tasks.TornadoTaskGraph.scheduleInner(TornadoTaskGraph.java:906)
at tornado.runtime@1.0.7-dev/uk.ac.manchester.tornado.runtime.tasks.TornadoTaskGraph.execute(TornadoTaskGraph.java:1430)
at tornado.runtime@1.0.7-dev/uk.ac.manchester.tornado.runtime.tasks.TornadoTaskGraph.execute(TornadoTaskGraph.java:1442)
at tornado.api@1.0.7-dev/uk.ac.manchester.tornado.api.TaskGraph.execute(TaskGraph.java:758)
at tornado.api@1.0.7-dev/uk.ac.manchester.tornado.api.ImmutableTaskGraph.execute(ImmutableTaskGraph.java:49)
at tornado.api@1.0.7-dev/uk.ac.manchester.tornado.api.TornadoExecutionPlan$TornadoExecutor.lambda$execute$0(TornadoExecutionPlan.java:410)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
at tornado.api@1.0.7-dev/uk.ac.manchester.tornado.api.TornadoExecutionPlan$TornadoExecutor.execute(TornadoExecutionPlan.java:410)
at tornado.api@1.0.7-dev/uk.ac.manchester.tornado.api.TornadoExecutionPlan.execute(TornadoExecutionPlan.java:111)
at com.vinhderful.raytracer.Benchmark.main(Benchmark.java:112)
Expected behavior
The expected behavior is as is in the develop branch with spirv:
tornadovm-ray-tracer regression
-----------------------------------------
Running TornadoVM Ray Tracer benchmark mode...
WARNING: Using incubator modules: jdk.incubator.vector
-----------------------------------------
Building world...
-> Loading Skybox Image 'Sky.jpg'...
-> Adding object to the scene...
-> Allocating object representation buffers...
-----------------------------------------
Getting Tornado Devices...
0: (SPIR-V) Intel(R) Graphics [0x46a6]
1: (SPIR-V) Intel(R) Graphics [0x46a6]
2: (OpenCL) NVIDIA RTX A2000 8GB Laptop GPU
3: (OpenCL) Intel(R) Graphics [0x46a6]
-----------------------------------------
Running [JAVA PARALLEL STREAMS]
Duration: 40.611194 ms
-----------------------------------------
-----------------------------------------
Running with TornadoVM for device: SPIRV OCL - Intel(R) Graphics [0x46a6]
Duration: 2.335913 ms
-----------------------------------------
Performance increase vs Java Streams: 17.385576431998963x
-----------------------------------------
-----------------------------------------
Running with TornadoVM for device: SPIRV LevelZero - Intel(R) Graphics [0x46a6]
Duration: 2.241852 ms
-----------------------------------------
Performance increase vs Java Streams: 18.115020081611092x
-----------------------------------------
-----------------------------------------
Running with TornadoVM for device: [NVIDIA CUDA] -- NVIDIA RTX A2000 8GB Laptop GPU
Duration: 1.049211 ms
-----------------------------------------
Performance increase vs Java Streams: 38.70641272346554x
-----------------------------------------
-----------------------------------------
Running with TornadoVM for device: [Intel(R) OpenCL HD Graphics] -- Intel(R) Graphics [0x46a6]
Duration: 2.374471 ms
-----------------------------------------
Performance increase vs Java Streams: 17.10325963130314x
-----------------------------------------
Computing system setup (please complete the following information):
OS: Ubuntu 23.10
BACKEND: spirv
TornadoVM commit id: dec5a87 from branch feat/jdk22_2nd_iteration
The text was updated successfully, but these errors were encountered:
Describe the bug
I tried the experimental branch of TornadoVM and JDK 22 with
TornadoVM-Ray-Tracer
, and I noticed a problem for theSPIR-V
backend.How To Reproduce
I have built TornadoVM as follows:
There is a first issue when building the
spirv
backend:I did a small patch, to resolve the
fromResolvedJavaType
method, similar to the way it is in the other two backends, which you can apply, as follows:JDK22_SPIRV.txt
returns
I checked out at the TornadoVM-Ray-Tracer branch and set the variables to use the JDK 22 as
JAVA_HOME
:Then I ran the ray tracer with the
regression
parameter (in console), and got the output as follows:Expected behavior
The expected behavior is as is in the
develop
branch withspirv
:Computing system setup (please complete the following information):
Ubuntu 23.10
spirv
dec5a87
from branchfeat/jdk22_2nd_iteration
The text was updated successfully, but these errors were encountered: