Skip to content

Commit 75455a3

Browse files
[Bug]: error gathering device information while adding custom device "/dev/tenstorrent/4": no such file or directory #2787
PR review feedback
1 parent 8e9b4a5 commit 75455a3

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

runner/internal/shim/host/gpu_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func TestUnmarshalTtSmiSnapshot(t *testing.T) {
2323
}{
2424
{
2525
name: "valid single device",
26-
filename: "valid_single_device.json",
26+
filename: "tenstorrent/valid_single_device.json",
2727
want: &ttSmiSnapshot{
2828
DeviceInfo: []ttDeviceInfo{
2929
{
@@ -38,7 +38,7 @@ func TestUnmarshalTtSmiSnapshot(t *testing.T) {
3838
},
3939
{
4040
name: "valid multiple devices",
41-
filename: "valid_multiple_devices.json",
41+
filename: "tenstorrent/valid_multiple_devices.json",
4242
want: &ttSmiSnapshot{
4343
DeviceInfo: []ttDeviceInfo{
4444
{
@@ -95,27 +95,27 @@ func TestUnmarshalTtSmiSnapshot(t *testing.T) {
9595
},
9696
{
9797
name: "empty device info",
98-
filename: "empty_device_info.json",
98+
filename: "tenstorrent/empty_device_info.json",
9999
want: &ttSmiSnapshot{
100100
DeviceInfo: []ttDeviceInfo{},
101101
},
102102
wantErr: false,
103103
},
104104
{
105105
name: "invalid JSON",
106-
filename: "invalid_json.json",
106+
filename: "tenstorrent/invalid_json.json",
107107
want: nil,
108108
wantErr: true,
109109
},
110110
{
111111
name: "missing device_info field",
112-
filename: "missing_device_info.json",
112+
filename: "tenstorrent/missing_device_info.json",
113113
want: &ttSmiSnapshot{DeviceInfo: nil},
114114
wantErr: false,
115115
},
116116
{
117117
name: "empty JSON",
118-
filename: "empty_json.json",
118+
filename: "tenstorrent/empty_json.json",
119119
want: &ttSmiSnapshot{DeviceInfo: nil},
120120
wantErr: false,
121121
},
@@ -160,7 +160,7 @@ func TestUnmarshalTtSmiSnapshot(t *testing.T) {
160160
}
161161

162162
func TestGetGpusFromTtSmiSnapshot(t *testing.T) {
163-
data, err := loadTestData("single_n150_gpu.json")
163+
data, err := loadTestData("tenstorrent/single_n150_gpu.json")
164164
if err != nil {
165165
t.Fatalf("Failed to load test data: %v", err)
166166
}
@@ -187,7 +187,7 @@ func TestGetGpusFromTtSmiSnapshot(t *testing.T) {
187187
}
188188

189189
func TestGetGpusFromTtSmiSnapshotMultipleDevices(t *testing.T) {
190-
data, err := loadTestData("valid_multiple_devices.json")
190+
data, err := loadTestData("tenstorrent/valid_multiple_devices.json")
191191
if err != nil {
192192
t.Fatalf("Failed to load test data: %v", err)
193193
}

runner/internal/shim/host/testdata/empty_device_info.json renamed to runner/internal/shim/host/testdata/tenstorrent/empty_device_info.json

File renamed without changes.

runner/internal/shim/host/testdata/empty_json.json renamed to runner/internal/shim/host/testdata/tenstorrent/empty_json.json

File renamed without changes.

runner/internal/shim/host/testdata/invalid_json.json renamed to runner/internal/shim/host/testdata/tenstorrent/invalid_json.json

File renamed without changes.

runner/internal/shim/host/testdata/missing_device_info.json renamed to runner/internal/shim/host/testdata/tenstorrent/missing_device_info.json

File renamed without changes.

runner/internal/shim/host/testdata/single_n150_gpu.json renamed to runner/internal/shim/host/testdata/tenstorrent/single_n150_gpu.json

File renamed without changes.

runner/internal/shim/host/testdata/valid_multiple_devices.json renamed to runner/internal/shim/host/testdata/tenstorrent/valid_multiple_devices.json

File renamed without changes.

runner/internal/shim/host/testdata/valid_single_device.json renamed to runner/internal/shim/host/testdata/tenstorrent/valid_single_device.json

File renamed without changes.

0 commit comments

Comments
 (0)