feat: ship with CUDA provider libs and preload CUDA runtime on load - #10
Merged
Merged
Conversation
Inject providers_shared/cuda after auditwheel (CPU wheels untouched) and pull in runtime CUDA 13 deps via the cuda extra.
Call `onnxruntime.preload_dlls` only when execution_provider is cuda and reorganize the Python README install/source-build sections.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
providers_shared/providers_cuda) into CUDA-profile wheels only after auditwheel, solibonnxruntime_providers_cuda.sois found next to the vendored runtime (CPU wheels unchanged).nvidia-cublas(andonnxruntime-gpu[cuda,cudnn]) to thecudaextra so CUDA 13 user libs are installable viapip install "fast-lightonocr[cuda]".runtime_kwargsselectsexecution_provider="cuda", callonnxruntime.preload_dlls(cuda=True, cudnn=True)before native session create so pip NVIDIA libs resolve withoutLD_LIBRARY_PATH. CPU loads skip this path entirely.Test plan
BUILD_PROFILE=cuda pip install -v ".[cuda]"from this branch; wheel contains provider libs infast_lightonocr.libsLightOnOCR.from_pretrained(..., runtime_kwargs={"execution_provider": "cuda"})runs OCRnvidia-smisampling duringprocess()shows ~2 GiB / non-zero utilpip install -v ".[cpu]"still works (no provider bundling / no preload)BUILD_PROFILE=cpuwheel RECORD is unchanged vs pre-PR behavior