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

MemorySegment pluging usage makes it incompatible with usage of MemorySegment API #503

Open
andrii0lomakin opened this issue Jul 20, 2024 · 0 comments
Assignees

Comments

@andrii0lomakin
Copy link
Contributor

Describe the bug

This is a continuation of our discussion: #491 . There is also a detailed description of the problem

How To Reproduce

Please run https://github.com/babylonml/tornadovm-bugs/blob/main/src/test/kotlin/com/babylonml/MemorySegmentUsageTest.kt#L10

You need to set up the path to TornadoVM SDK using the given property babylonml.tornadovm.home.

Expected behavior

Because MemorySegment has been already used, MemoryPlugin is not called, and as a result I get

Unable to build sketch for method: copyVectorKernel(Unable to build sketch for method: getAtIndex(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))
uk.ac.manchester.tornado.api.exceptions.TornadoBailoutRuntimeException: Unable to build sketch for method: copyVectorKernel(Unable to build sketch for method: getAtIndex(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 [email protected]/uk.ac.manchester.tornado.runtime.sketcher.TornadoSketcher.buildSketch(TornadoSketcher.java:190)
	at [email protected]/uk.ac.manchester.tornado.runtime.sketcher.TornadoSketcher$TornadoSketcherCallable.call(TornadoSketcher.java:262)
	at [email protected]/uk.ac.manchester.tornado.runtime.sketcher.TornadoSketcher$TornadoSketcherCallable.call(TornadoSketcher.java:252)
	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)

If you comment out MemorySegment usage test runs fine.

Computing system setup (please complete the following information):

  • OS: Window 11
  • Driver Version: 552.22
  • TornadoVM commit id - v 1.0.6
@mikepapadim mikepapadim self-assigned this Jul 20, 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

No branches or pull requests

2 participants