-
Notifications
You must be signed in to change notification settings - Fork 133
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
Missing onnxruntime-genai-jni library #763
Comments
Hi @pekzeki thanks for the report. I'll see what I can do after I get back my mac device. |
It seems that AppleClang has more strict type requirement, @pekzeki , could you please try the following change: - const int64_t* shape_dims = env->GetLongArrayElements(shape_dims_in, /*isCopy*/ 0);
+ const int64_t* shape_dims = reinterpret_cast<int64_t *>(env->GetLongArrayElements(shape_dims_in, /*isCopy*/ 0));
|
Error has gone. Thanks for the help! @skyline75489 |
@pekzeki Could you please share you experience with GenAI? Did you get the expected output? We have limited resource to fully test GenAI across different devices, especially Apple devices. Any feedback would be helpful. Thanks. |
Sure! Currently, I am exploring the capabilities of I had to spend some time building the library and following related GitHub issues to get it running. It would have been easier if I could directly download artifacts from somewhere. The library works as expected on my macOS (M3) device. Although I haven't run extensive tests, it seems that running these SLMs on the JVM generates content approximately 20% faster. One thing I haven't been able to do is compile the library for Windows properly. As I don't have a native Windows machine, I tried doing it on a virtual Windows 11 machine, and while I was able to build the library successfully with the related ARM64 packages, I kept getting the following error when loading:
Hope this helps 🙏 |
I managed to resolve the ARM <-> AMD compatibility issue after switching to Microsoft ARM64 JDK however I cannot produce the
Do you have any suggestions? |
We're treating all warnings as errors on Windows. I think a cast would work. Could you please try: - jintArray java_int_array = env->NewIntArray(num_tokens);
+ jintArray java_int_array = env->NewIntArray((jsize)num_tokens); |
@pekzeki Did you manage to try the above suggestion? |
This issue has no activity in the last month. Most Java related issue should be fixed in #1030 . Feel free to reopen if you have another problem with the library.. |
Describe the bug
Building Java API and use the generated artifacts in another application however I got the below error while using the sample
SimpleGenAI
class.To Reproduce
Steps to reproduce the behavior:
onnxruntime-genai/src/java/build/libs/onnxruntime-genai-0.4.0-dev
as a dependency to your projectonnxruntime-genai/build/macOS/Release
as native library location to your projectExpected behavior
I expect no missing JNI library errors
Screenshots
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: