Skip to content

[Java] onnxruntime-genai-cuda.dll missing from Java JAR and extraction logic in CUDA builds #2028

@EPNW-Eric

Description

@EPNW-Eric

When building the Java bindings with CUDA support enabled, the resulting onnxruntime-genai-[version].jar is incomplete for GPU execution.

Specifically, the POST_BUILD commands in src/java/CMakeLists.txt explicitly copy onnxruntime-genai.dll and onnxruntime-genai-jni.dll to the native-lib staging directory, but there is no corresponding instruction to include onnxruntime-genai-cuda.dll.

Additionally, even if the library were present in the JAR, the GenAI.java source lacks the necessary logic to identify and extract the CUDA-specific binary to the temporary runtime directory, preventing the library from being loaded by the JVM.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions