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

Call type not supported on this platform #156

Open
Solido opened this issue Oct 23, 2023 · 4 comments
Open

Call type not supported on this platform #156

Solido opened this issue Oct 23, 2023 · 4 comments

Comments

@Solido
Copy link

Solido commented Oct 23, 2023

Hi!

Very interested in giving the lib a round as I got some models on the side.

I wasnt't able to put a diagnostic.

Thanks!

Describe the bug
Caused by: java.lang.UnsupportedOperationException: Call type not supported on this platform

To Reproduce
Steps to reproduce the behavior:
Gradle Tasks -> Application -> Run

Desktop (please complete the following information):

  • OS: macos M1
  • JVM temurin-19.0.2

Additional context

dependencies:
        implementation project(":onnxruntime-sample-library")
	runtimeOnly project(path: ":", configuration: 'cpu')
	runtimeOnly "com.jyuzawa:onnxruntime-cpu:1.+:osx-aarch_64"
@yuzawa-san
Copy link
Owner

Thank you for your interest in this project.

Sadly you have encountered one of the limitations of an experimental framework. There was a known issue with Java 19's preview API with M1 macs. It was patched in https://github.com/openjdk/panama-foreign/pull/746/files#diff-842e1f602edc157c7897665ff0678fbb6f2589d2511088bab690cb9ca6044ba4L203 However this library is pinned to Java 19 (optimistically hoping that the underlying API would be out of preview in Java 20). Unfortunately, it did not get out of preview in Java 21, so I am tentatively targeting Java 22 (which they have claimed it will finally be out of preview). I am currently upgrading to that, but jextract, gradle, and IDE's are not quite ready for 22, so its been slow. Ideally in the next few months things should improve. I'll update this ticket once that is achieved.

@Solido
Copy link
Author

Solido commented Oct 24, 2023

Thank you James, your detailed explanation can bring me back on track.
I'm gonna move to another hardware so I can progress with your work.
Best regards. Robert.

@yuzawa-san
Copy link
Owner

I have a test branch (once again very experimental) for java 22 which builds on environments with jdk 21 (to bootstrap gradle) and 22-ea (to allow gradle to use as a build/runtime toolchain.

I do not see much movement on this until at least gradle is upgraded and 22 is fully released in a few months.

@yuzawa-san
Copy link
Owner

I have merged and upgraded the project (and runtime minimum version) to JDK22. Please consult the readme for the most recent snapshots. I think microsoft may be dropping a new release in the coming days/weeks so i'll probably wait for ORT 1.18.0 before cutting a full release.

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