Skip to content

[WIP] Preload cudart before cuvs native library load to prevent downstream class load errors - #2376

Open
rahulgoswami wants to merge 3 commits into
NVIDIA:mainfrom
rahulgoswami:preload-cudart-for-CuVSProvider
Open

[WIP] Preload cudart before cuvs native library load to prevent downstream class load errors#2376
rahulgoswami wants to merge 3 commits into
NVIDIA:mainfrom
rahulgoswami:preload-cudart-for-CuVSProvider

Conversation

@rahulgoswami

@rahulgoswami rahulgoswami commented Jul 29, 2026

Copy link
Copy Markdown

Fixes: #2300

Issue happens because libcudart.so (a dependency of libcuvs.so (or libcuvs_c.so?)) is not available during the class loading sequence unless explicitly loaded via System.loadLibrary() call . The symbol lookup space (where Java looks for dependent native libraries) gets defined in one of the header class files (To-Do: add exact header) that gets generated as a Panama FFM binding. And this loading sequence looks for libcuvs.so but not for libcudart.so.

As opposed to the initial proposal in the GH issue of making the loadLibrary() call in CvVSProvider.provider() call, Claude suggested it might be better to introduce it in the library load sequence in NativeDependencyLoader.java instead and I went with that approach.

To-Do: Write up a more detailed description of the root cause and the solution.

@copy-pr-bot

copy-pr-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@cjnolet cjnolet added bug Something isn't working non-breaking Introduces a non-breaking change labels Jul 29, 2026
@cjnolet cjnolet moved this to In Progress in Unstructured Data Processing Jul 29, 2026
@cjnolet

cjnolet commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

/ok to test a849ecd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Introduces a non-breaking change

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

[BUG] CuVSProvider.java needs to load cudart to prevent provider load error

2 participants