Commit 86fa514
fix: include TensorFusion transport libraries in LD_PRELOAD
Problem:
- GPU interception not working in containers on Mac
- libteleport.so and libaccelerator libraries missing from LD_PRELOAD
- Only vendor-specific libraries (libcuda.so, libnvidia-ml.so) were detected
- FindActualLibraryFiles patterns only matched vendor libs, not TensorFusion libs
- Result: GPU calls not redirected to remote worker, apps try to use local GPU
Root Cause:
GetLibraryNames() and FindActualLibraryFiles() patterns only included
vendor-specific libraries (libcuda, libnvidia, libamdhip), but excluded
TensorFusion transport layer libraries:
- libteleport.so - Remote GPU transport protocol
- libaccelerator_*.so - GPU call acceleration layer
These libraries are essential for remote GPU functionality but were
missing from the preload list, causing GPU interception to fail.
Solution:
1. Updated GetLibraryNames() to include TensorFusion libraries:
- NVIDIA: + libteleport.so, libaccelerator_nvidia-linux-amd64.so
- AMD/Hygon: + libteleport.so, libaccelerator_amd-linux-amd64.so
2. Updated FindActualLibraryFiles() patterns:
- NVIDIA: + "libteleport", "libaccelerator"
- AMD/Hygon: + "libteleport", "libaccelerator"
Now LD_PRELOAD includes all required libraries:
```
LD_PRELOAD="/opt/gpugo/libs/libcuda.so:
/opt/gpugo/libs/libnvidia-ml.so:
/opt/gpugo/libs/libteleport.so:
/opt/gpugo/libs/libaccelerator_nvidia-linux-amd64.so"
```
Verified in container:
- All .so files present in /opt/gpugo/libs/
- Updated code will include them in /etc/environment
- GPU calls will be properly intercepted and redirected
Changes:
- internal/studio/env.go: Add TensorFusion libs to GetLibraryNames
- internal/studio/env.go: Add TensorFusion patterns to FindActualLibraryFiles
This fixes GPU interception on all platforms (Mac, Linux, Windows)
ensuring remote GPU functionality works correctly.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 17b51e2 commit 86fa514
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
0 commit comments