Repository navigation
Commit d53ec66
committed
Define the new shim where the CUDA library can actually see it
The link stub advertises `aoti_torch_is_defined` against the CUDA shim library, but
the function was added to the ETensor shim file, which only the Apple Metal backend
links. The CUDA library is built from the CUDA shims plus the SlimTensor common
shims, and the SlimTensor file did not define it. So a Windows CUDA export would
link against a name nothing in that library provides, and fail when loading, which
is the failure the earlier commit set out to remove.
Add it to the SlimTensor shims as well, following that file's habit of rejecting a
null output pointer rather than writing through it. The other two names were already
in the right places: the dtype helper in the SlimTensor shims, the pinned allocator
in the CUDA memory shims.
Also regenerate the link stub deterministically. The tool used to rebuild it stamped
the build time into all 48 members, where every member of the previous file had it
zeroed, and this file is packaged into the wheel, so that timestamp reached users and
made two builds of the same source differ.
Test Plan:
Compared what each shim file defines and what the CUDA library links. The name was in
the ETensor file and absent from the SlimTensor one, and the CUDA build links only the
SlimTensor variant, so nothing in that library defined it. The other two are present
in the closure, which is why they were fine.
Parsed every archive member header in the stub, before and after. The previous file
had the time, user and group zeroed in all 48; the version committed earlier carried a
real build time in 48 of 49; the version here has all three zeroed again, and the file
is byte-for-byte the same size, so nothing but the metadata changed.
Compared the advertised names against the previous file: 42 before, 45 now, none
dropped, and the three added are exactly the three intended.
I have no Windows machine, so the link and load themselves are still for CI.1 parent 6627a2d commit d53ec66
3 files changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
71 | 79 | | |
72 | 80 | | |
73 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
| |||
Binary file not shown.
0 commit comments