Skip to content

Commit b9e9051

Browse files
bgoguldan-zheng
authored andcommitted
Disable failing tensor subscript assignment tests in GPU mode. (#24340)
1 parent dc31c3f commit b9e9051

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/TensorFlowRuntime/tensor.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ TensorTests.testAllBackends("ElementIndexing") {
130130
expectEqual([43], array0D.scalars)
131131
}
132132

133+
#if !CUDA
134+
// TODO(https://bugs.swift.org/browse/TF-469): This test fails in GPU mode.
133135
TensorTests.testAllBackends("ElementIndexingAssignment") {
134136
// NOTE: cannot test multiple `Tensor.shape` or `Tensor.scalars` directly
135137
// until send and receive are implemented (without writing a bunch of mini
@@ -157,6 +159,7 @@ TensorTests.testAllBackends("ElementIndexingAssignment") {
157159
expectEqual(Array(stride(from: 35.0, to: 40, by: 1)), array1D.scalars)
158160
expectEqual([23], array0D.scalars)
159161
}
162+
#endif // !CUDA
160163

161164
TensorTests.testAllBackends("NestedElementIndexing") {
162165
// NOTE: This test could use a clearer name, along with other "indexing"
@@ -205,6 +208,9 @@ TensorTests.testAllBackends("SliceIndexing") {
205208
expectEqual(Array(stride(from: 3.0, to: 5, by: 1)), array1D.scalars)
206209
}
207210

211+
212+
#if !CUDA
213+
// TODO(https://bugs.swift.org/browse/TF-469): This test fails in GPU mode.
208214
TensorTests.testAllBackends("SliceIndexingAssignment") {
209215
// NOTE: cannot test `Tensor.shape` or `Tensor.scalars` directly until send
210216
// and receive are implemented (without writing a bunch of mini tests).
@@ -232,7 +238,10 @@ TensorTests.testAllBackends("SliceIndexingAssignment") {
232238
expectEqual(Array(stride(from: 20.0, to: 30, by: 1)), array2D.scalars)
233239
expectEqual(Array(stride(from: 3.0, to: 5, by: 1)), array1D.scalars)
234240
}
241+
#endif // !CUDA
235242

243+
#if !CUDA
244+
// TODO(https://bugs.swift.org/browse/TF-469): This test fails in GPU mode.
236245
TensorTests.testAllBackends("EllipsisIndexing") {
237246
// NOTE: cannot test `Tensor.shape` or `Tensor.scalars` directly until send
238247
// and receive are implemented (without writing a bunch of mini tests).
@@ -260,6 +269,7 @@ TensorTests.testAllBackends("EllipsisIndexing") {
260269
expectEqual(Array(stride(from: 20.0, to: 30, by: 1)), array2D.scalars)
261270
expectEqual(Array(stride(from: 3.0, to: 5, by: 1)), array1D.scalars)
262271
}
272+
#endif // !CUDA
263273

264274
TensorTests.testAllBackends("NewAxisIndexing") {
265275
// NOTE: cannot test `Tensor.shape` or `Tensor.scalars` directly until send
@@ -347,6 +357,8 @@ TensorTests.testAllBackends("StridedSliceIndexing") {
347357
expectEqual(Array(stride(from: 1.0, to: 5, by: 2)), array1D.scalars)
348358
}
349359

360+
#if !CUDA
361+
// TODO(https://bugs.swift.org/browse/TF-469): This test fails in GPU mode.
350362
TensorTests.testAllBackends("StridedSliceIndexingAssignment") {
351363
// NOTE: cannot test `Tensor.shape` or `Tensor.scalars` directly until send
352364
// and receive are implemented (without writing a bunch of mini tests).
@@ -378,6 +390,7 @@ TensorTests.testAllBackends("StridedSliceIndexingAssignment") {
378390
expectEqual(Array(stride(from: 20.0, to: 30, by: 1)), array2D.scalars)
379391
expectEqual(Array(stride(from: 3.0, to: 5, by: 1)), array1D.scalars)
380392
}
393+
#endif // !CUDA
381394

382395
TensorTests.test("WholeTensorSlicing") {
383396
let t: Tensor<Int32> = [[[1, 1, 1], [2, 2, 2]],

0 commit comments

Comments
 (0)