cudart: stub Runtime exports required by conda libtorch_cuda - #638
Merged
BinSquare merged 4 commits intoJul 28, 2026
Merged
Conversation
|
Ready to review this PR? Stage has broken it down into 2 individual chapters for you:
Chapters generated by Stage for commit 8d7e0d6 on Jul 15, 2026 7:10am UTC. |
Contributor
Author
Lambda retest — PASSOn A10 / Ubuntu 22.04 with Audit method: |
Contributor
Author
|
Evidence (see description). Audit: 8 UND
|
Contributor
Author
NickyHeC
marked this pull request as ready for review
July 17, 2026 21:01
Conda libtorch_cuda.so version-requires cudaDeviceSetLimit@libcudart.so.12 at import. After smol-machines#602 stages the shim over real cudart, that missing export breaks dynamic linking. Mirror the driver shim's cuCtxSetLimit no-op / GetLimit default.
Audit of pytorch/pytorch:2.4.0 libtorch_cuda.so vs the shim left 7 UND symbols after SetLimit: AddKernel/Host/EventRecord/EventWait Node, GraphRetainUserObject, UserObjectCreate, StreamUpdateCaptureDependencies. Export stubs so bind-mount staging can satisfy the dynamic linker; Add*Node returns NotSupported (stream-capture remains the forwarded path).
NickyHeC
force-pushed
the
nickyhec/cudart-stub-device-set-limit
branch
from
July 20, 2026 19:01
8d7e0d6 to
07b04d2
Compare
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.
Unblocks #602 conda e2e.
Why
After #602 overmounts shim over
libcudart.so.12*,libtorch_cuda.so(conda torch 2.4 / cu12) fails atdlopenon versioned undefs — first hit wascudaDeviceSetLimit@libcudart.so.12. Real cudart is gone, soLD_PRELOADof the same incomplete shim no longer fallthrough-fixes missing symbols.Method
→ 8 missing vs current shim. Stub only those.
Exports added
cudaDeviceSetLimitcudaDeviceGetLimitcuCtxGetLimit)cudaGraphAdd{Kernel,Host,EventRecord,EventWait}NodecudaGraphRetainUserObjectcudaUserObjectCreatecudaStreamUpdateCaptureDependenciesProof — Lambda A10,
#602agent + this shim, noLD_PRELOADImage:
pytorch/pytorch:2.4.0-cuda12.4-cudnn9-runtimepip
portal-cudacontrol unchanged (cuda: True) — that link set didn't require these symbols at import.