Skip to content

Commit c321262

Browse files
[Feature] Support Tenstorrent's Wormhole accelerators #2573 (bugfix)
1 parent 049e61e commit c321262

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

runner/internal/shim/docker.go

+8
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,14 @@ func (d *DockerRunner) restoreStateFromContainers(ctx context.Context) error {
151151
gpuIDs = append(gpuIDs, device.PathOnHost)
152152
}
153153
}
154+
case host.GpuVendorTenstorrent:
155+
for _, device := range containerFull.HostConfig.Resources.Devices {
156+
if strings.HasPrefix(device.PathOnHost, "/dev/tenstorrent/") {
157+
// Extract the device ID from the path
158+
deviceID := strings.TrimPrefix(device.PathOnHost, "/dev/tenstorrent/")
159+
gpuIDs = append(gpuIDs, deviceID)
160+
}
161+
}
154162
case host.GpuVendorIntel:
155163
for _, envVar := range containerFull.Config.Env {
156164
if indices, found := strings.CutPrefix(envVar, "HABANA_VISIBLE_DEVICES="); found {

0 commit comments

Comments
 (0)