-
Notifications
You must be signed in to change notification settings - Fork 103
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
Not able to work with interfaces #287
Comments
Hi @MaardinK522 , thank you for the report. My take is that you are running this example, let me know otherwise: The first thing I see is that you are using a custom data type to pass the parameters ( The reason is that the TornadoVM JIT compiler knows the layout and the operations to apply for each of these data types, and the error you are getting is related to the TornadoVM JIT compilation process. See here all data types: https://github.com/beehive-lab/TornadoVM/tree/master/tornado-api/src/main/java/uk/ac/manchester/tornado/api/types Examples with matrices : https://github.com/beehive-lab/TornadoVM/blob/master/tornado-unittests/src/main/java/uk/ac/manchester/tornado/unittests/matrices/TestMatrixTypes.java |
I was really wondering if TornadoVM team could had found a way to convert custom classes into Supportable TornadoVM JIT classes. So, programmer spend time convert his/her classes into Supportable data types like we annotate classes while working with Databases. |
Sir, thank you very much for bringing something I wanted in my life. And I will really try my best to join TornadoVM team. |
Thank you for your feedback. So bear in mind that TornadoVM now uses Panama segments for all these data types. Internally, TornadoVM has a custom segment layout to be able to compile to OpenL/SPIR-V and PTX for many different types of applications. Having said this, I will bring this topic to discuss internally with the TornadoVM team, but, for the time being, I would use the "stock" data types that TornadoVM provides. |
Throws error with interfaces
I was trying to work with interfaces and Matrix mapping using lambda functions. I am unable to understand the logic here. I needed help to achieve matrix mapping using the interface in TornadoVM.
After executing the program
https://github.com/MaardinK522/tornadoVM.git
Try running this project on IntelliJ IDEA.
My code is pretty much self explanatory.
Not mapping matrix with interface functions.
I am passing an anonymous function which was suppose to be execute on Parallel threads for applying activation to each value of matrix data. Unlucky, I got stuck with a small confusion of interfaces with Null data types from the error feedback.
WARNING: Code Bailout to Java sequential. Use --debug to see the reason Exception in thread "main" uk.ac.manchester.tornado.api.exceptions.TornadoBailoutRuntimeException: Unable to build sketch for method: matrixToActivationFunctionMapper(Cannot invoke "jdk.vm.ci.meta.ResolvedJavaType.getAnnotation(java.lang.Class)" because the return value of "org.graalvm.compiler.core.common.type.ObjectStamp.type()" is null) at tornado.runtime@0.16-dev/uk.ac.manchester.tornado.runtime.sketcher.TornadoSketcher.buildSketch(TornadoSketcher.java:190) at tornado.runtime@0.16-dev/uk.ac.manchester.tornado.runtime.sketcher.TornadoSketcher$TornadoSketcherCallable.call(TornadoSketcher.java:263) at tornado.runtime@0.16-dev/uk.ac.manchester.tornado.runtime.sketcher.TornadoSketcher$TornadoSketcherCallable.call(TornadoSketcher.java:253) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583)
This is the error which I am encountering right now.
Hope your team will have some suggestion for me.
The text was updated successfully, but these errors were encountered: