Skip to content

Commit 71ce7ba

Browse files
committed
fix Piper test failures (#17135)
I encountered some test failures while exporting to Piper. 1. A change to `Ops.swift` accidentally removed the `Tensor<Float>()`. This breaks GPU tests, which we do not run in our external builds yet. 2. The SIL in `test/TensorFlow/integration.swift` changed a bit. We did not notice because `test/TensorFlow/integration.swift` does not run in our external builds. 3. `test/TensorFlow/deabstraction_finished.swift` fails on Piper, because Piper builds `stdlib/public/TensorFlow` with optimizations turned off, and constexpr folding can't deal with all the non-optimized stuff yet. I fixed 1 & 2 and ignored 3 (since @lattner's changes will probably repair that soon). I also turned off optimizations in `stdlib/public/TensorFlow`, and enabled a few new tests in external, so that differences between external and piper and less likely to bite us in the future.
1 parent 6d7b807 commit 71ce7ba

File tree

9 files changed

+57
-45
lines changed

9 files changed

+57
-45
lines changed

stdlib/public/TensorFlow/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ list(APPEND swift_stdlib_compile_flags "-Xllvm" "-sil-partial-specialization")
3333
list(APPEND swift_stdlib_compile_flags "-swift-version" "4")
3434
list(APPEND swift_stdlib_compile_flags "-force-single-frontend-invocation")
3535
list(APPEND swift_stdlib_compile_flags "-Xcc" "-I${TF_INCLUDE_DIR}")
36+
# FIXME(SR-7972): Some tests fail when TensorFlow is optimized.
37+
list(APPEND swift_stdlib_compile_flags "-Onone")
3638

3739
set(SOURCES
3840
CompilerRuntime.swift

stdlib/public/TensorFlow/Ops.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,7 @@ public extension Tensor {
11661166
let offset: Tensor<Int32> = Tensor<Int32>(
11671167
Raw.scatterNd(
11681168
indices: scatterIndices,
1169-
updates: boundSize,
1169+
updates: Tensor<Float>(boundSize),
11701170
shape: rankTensor.rankLifted()
11711171
)
11721172
)

stdlib/public/core/Arrays.swift.gyb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,10 @@ extension ${Self} : ExpressibleByArrayLiteral {
961961
///
962962
/// - Parameter elements: A variadic list of elements of the new array.
963963
@inlinable
964+
// SWIFT_ENABLE_TENSORFLOW
965+
// FIXME: We can probably remove @_transparent once constexpr folding is
966+
// more fleshed out.
967+
@_transparent
964968
public init(arrayLiteral elements: Element...) {
965969
self = elements
966970
}

test/TensorFlow/crashers.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// RUN: %target-swift-frontend -Xllvm -tf-dump-intermediates -O -emit-sil %s -verify
22

3-
// FIXME(b/78371828): Should this test work with optimized_stdlib?
4-
// UNSUPPORTED: optimized_stdlib
5-
63
// This file contains various regression tests that crashed the compiler.
74

85
import TensorFlow

test/TensorFlow/deabstraction_finished.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ func one() -> Int {
1414
}
1515

1616
public func constexprCall(a: Tensor<Float>, idx: Tensor<Int32>) -> Tensor<Float> {
17+
// FIXME: ConstExpr folding can't deal with the non-optimized initializer.
18+
// expected-error @+2 {{attribute 'axis' requires a constant argument}}
19+
// expected-note @+1 {{could not fold operation}}
1720
return Tensor<Float>(oneHotAtIndices: idx.toDevice(), depth: 0, axis: one())
1821
}
1922

@@ -25,6 +28,9 @@ struct Wrapper {
2528

2629
public func f(a: Tensor<Float>, idx: Tensor<Int32>) -> Tensor<Float> {
2730
let w = Wrapper(v: 1)
31+
// FIXME: ConstExpr folding can't deal with the non-optimized initializer.
32+
// expected-error @+2 {{attribute 'axis' requires a constant argument}}
33+
// expected-note @+1 {{could not fold operation}}
2834
return Tensor<Float>(oneHotAtIndices: idx.toDevice(), depth: 0, axis: w.v)
2935
}
3036

test/TensorFlow/integration.swift

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
// RUN: %target-swift-frontend -Xllvm -tf-dump-intermediates -O -emit-sil -verify %s
22
// RUN: %target-swift-frontend -Xllvm -tf-dump-intermediates -O -emit-sil -verify %s | %FileCheck %s
33

4-
// FIXME(b/78371828): Should this test work with optimized_stdlib?
5-
// UNSUPPORTED: optimized_stdlib
6-
74
import TensorFlow
85

96
public func testTensor(a: Tensor<Float>, b: Tensor<Float>) {
@@ -22,14 +19,17 @@ public func testTensor(a: Tensor<Float>, b: Tensor<Float>) {
2219
// CHECK-LABEL: --- TFPartition Accelerator Result: {{.*}}testTensor{{.*}}
2320
// CHECK: sil private @{{.*}}testTensor{{.*}} : $@callee_owned (TensorHandle<Float>, TensorHandle<Float>) -> TensorHandle<Float> {
2421
// CHECK: bb0(%0 : $TensorHandle<Float>, %1 : $TensorHandle<Float>):
25-
// CHECK-NEXT: %2 = string_literal utf8 "/device:CPU:0"
26-
// CHECK-NEXT: %3 = builtin "__tfop_Add,$in,$in,device"(%0 : $TensorHandle<Float>, %0 : $TensorHandle<Float>, %2 : $Builtin.RawPointer) : $TensorHandle<Float>
27-
// CHECK-NEXT: %4 = string_literal utf8 "/device:CPU:0"
28-
// CHECK-NEXT: %5 = builtin "__tfop_Sub,$in,$in,device"(%3 : $TensorHandle<Float>, %3 : $TensorHandle<Float>, %4 : $Builtin.RawPointer) : $TensorHandle<Float>
29-
// CHECK-NEXT: %6 = builtin "tensorflowSend_0"<TensorHandle<Float>>(%5 : $TensorHandle<Float>) : $()
30-
// CHECK-NEXT: %7 = string_literal utf8 "/device:CPU:0"
31-
// CHECK-NEXT: %8 = builtin "__tfop_Add,$in,$in,device"(%1 : $TensorHandle<Float>, %1 : $TensorHandle<Float>, %7 : $Builtin.RawPointer) : $TensorHandle<Float>
32-
// CHECK-NEXT: return %8 : $TensorHandle<Float>
22+
// CHECK-NEXT: %2 = metatype $@thick Float.Type
23+
// CHECK-NEXT: %3 = string_literal utf8 "/device:CPU:0"
24+
// CHECK-NEXT: %4 = builtin "__tfop_Add,$in,$in,T,device"(%0 : $TensorHandle<Float>, %0 : $TensorHandle<Float>, %2 : $@thick Float.Type, %3 : $Builtin.RawPointer) : $TensorHandle<Float>
25+
// CHECK-NEXT: %5 = metatype $@thick Float.Type
26+
// CHECK-NEXT: %6 = string_literal utf8 "/device:CPU:0"
27+
// CHECK-NEXT: %7 = builtin "__tfop_Sub,$in,$in,T,device"(%4 : $TensorHandle<Float>, %4 : $TensorHandle<Float>, %5 : $@thick Float.Type, %6 : $Builtin.RawPointer) : $TensorHandle<Float>
28+
// CHECK-NEXT: %8 = builtin "tensorflowSend_0"<TensorHandle<Float>>(%7 : $TensorHandle<Float>) : $()
29+
// CHECK-NEXT: %9 = metatype $@thick Float.Type
30+
// CHECK-NEXT: %10 = string_literal utf8 "/device:CPU:0"
31+
// CHECK-NEXT: %11 = builtin "__tfop_Add,$in,$in,T,device"(%1 : $TensorHandle<Float>, %1 : $TensorHandle<Float>, %9 : $@thick Float.Type, %10 : $Builtin.RawPointer) : $TensorHandle<Float>
32+
// CHECK-NEXT: return %11 : $TensorHandle<Float>
3333

3434

3535
// CHECK-LABEL: --- TFPartition Host Result: {{.*}}testTensor{{.*}}
@@ -65,8 +65,8 @@ public func testScalar(f: Float) { // expected-warning {{'f' implicitly copied t
6565
// CHECK-NEXT: %3 = integer_literal $Builtin.Int32, 1
6666
// CHECK: [[CONST:%.*]] = builtin "__tfop_Const,dtype$dtype,value$tensor,device"(%3 : $Builtin.Int32, %2 : $Builtin.FPIEEE32, {{.*}}) : $TensorHandle<Builtin.FPIEEE32>
6767
// CHECK-NEXT: [[CAST:%.*]] = unchecked_ref_cast [[CONST]] : $TensorHandle<Builtin.FPIEEE32> to $TensorHandle<Float>
68-
// CHECK: [[ADD1:%.*]] = builtin "__tfop_Add,$in,$in,device"(%1 : $TensorHandle<Float>, [[CAST]] : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
69-
// CHECK: [[ADD2:%.*]] = builtin "__tfop_Add,$in,$in,device"([[ADD1]] : $TensorHandle<Float>, [[ADD1:%.*]] : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
68+
// CHECK: [[ADD1:%.*]] = builtin "__tfop_Add,$in,$in,T,device"(%1 : $TensorHandle<Float>, [[CAST]] : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
69+
// CHECK: [[ADD2:%.*]] = builtin "__tfop_Add,$in,$in,T,device"([[ADD1]] : $TensorHandle<Float>, [[ADD1:%.*]] : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
7070
// CHECK-NEXT: return [[ADD2]] : $TensorHandle<Float>
7171
// CHECK-NEXT: }
7272

@@ -108,8 +108,8 @@ public func testExitBranch1(i: Int) {
108108
// CHECK-NEXT: %1 = integer_literal $Builtin.Int32, 1
109109
// CHECK: %3 = builtin "__tfop_Const,dtype$dtype,value$tensor,device"(%1 : $Builtin.Int32, %0 : $Builtin.FPIEEE32, {{.*}}) : $TensorHandle<Builtin.FPIEEE32>
110110
// CHECK-NEXT: %4 = unchecked_ref_cast %3 : $TensorHandle<Builtin.FPIEEE32> to $TensorHandle<Float>
111-
// CHECK: %6 = builtin "__tfop_Add,$in,$in,device"(%4 : $TensorHandle<Float>, %4 : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
112-
// CHECK-NEXT: return %6 : $TensorHandle<Float>
111+
// CHECK: %7 = builtin "__tfop_Add,$in,$in,T,device"(%4 : $TensorHandle<Float>, %4 : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
112+
// CHECK-NEXT: return %7 : $TensorHandle<Float>
113113
// CHECK-NEXT: }
114114

115115

@@ -151,7 +151,7 @@ public func testExitBranch2(i: Int) {
151151
// CHECK: cond_br {{.*}}, bb2, bb1
152152

153153
// CHECK: bb1:
154-
// CHECK: builtin "__tfop_Add,$in,$in,device"(
154+
// CHECK: builtin "__tfop_Add,$in,$in,T,device"(
155155
// CHECK-NEXT: builtin "tensorflowSend_0"<TensorHandle<Float>>(
156156
// CHECK-NEXT: br bb2
157157

@@ -213,7 +213,7 @@ public func test_bool_param2(cond: Bool, // expected-warning {{'cond' implicitly
213213
// CHECK-LABEL: --- TFPartition Accelerator Result: {{.*}}test_bool_param2{{.*}}
214214
// CHECK: sil private @{{.*}}test_bool_param2{{.*}}
215215
// CHECK: bb0(%0 : $TensorHandle<Float>, %1 : $TensorHandle<Float>, %2 : $TensorHandle<Builtin.Int1>):
216-
// CHECK: builtin "__tfop_Add,$in,$in,device"(%0 : $TensorHandle<Float>, %1 : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
216+
// CHECK: builtin "__tfop_Add,$in,$in,T,device"(%0 : $TensorHandle<Float>, %1 : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
217217
// CHECK-NEXT: [[BOOL:%.*]] = builtin "tf_tensor_to_i1"(%2 : $TensorHandle<Builtin.Int1>) : $Builtin.Int1
218218
// CHECK-NEXT: cond_br [[BOOL]]
219219
// ...
@@ -253,12 +253,12 @@ public func test_while1(maxCount: Int, // expected-warning {{'maxCount' implici
253253
// CHECK-NEXT: integer_literal $Builtin.Int64, 0
254254
// CHECK-NEXT: integer_literal $Builtin.Int32, 9
255255
// CHECK: builtin "__tfop_Const,dtype$dtype,value$tensor,device"(
256-
// CHECK: builtin "__tfop_Add,$in,$in,device"(%0 : $TensorHandle<Float>, %1 : $TensorHandle<Float>
256+
// CHECK: builtin "__tfop_Add,$in,$in,T,device"(%0 : $TensorHandle<Float>, %1 : $TensorHandle<Float>
257257
// CHECK-NEXT: builtin "tf_tensor_to_i1"(
258258
// CHECK-NEXT: cond_br {{.*}}, bb2, bb1
259259

260260
// CHECK: bb3([[A:%.*]] : $TensorHandle<Float>, [[COUNT:%.*]] : $TensorHandle<Builtin.Int64>):
261-
// CHECK: [[NEXTA:%.*]] = builtin "__tfop_Sub,$in,$in,device"([[A]] : $TensorHandle<Float>, %1 : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
261+
// CHECK: [[NEXTA:%.*]] = builtin "__tfop_Sub,$in,$in,T,device"([[A]] : $TensorHandle<Float>, %1 : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
262262
// CHECK: [[NEXTCOUNT:%.*]] = builtin "__tfop_Add,$in,$in,device"([[COUNT]] : $TensorHandle<Builtin.Int64>,
263263
// CHECK: [[CONDT:%.*]] = builtin "__tfop_Less,$in,$in,device"([[NEXTCOUNT]] : $TensorHandle<Builtin.Int64>,
264264
// CHECK-NEXT: [[COND:%.*]] = builtin "tf_tensor_to_i1"([[CONDT]] : $TensorHandle<Builtin.Int1>) : $Builtin.Int1
@@ -305,16 +305,16 @@ public func scalar_manipulation(a : Float) -> Tensor<Float> {
305305
// CHECK: %5 = builtin "__tfop_Const,dtype$dtype,value$tensor,device"(%3 : $Builtin.Int32, %2 : $Builtin.FPIEEE32, {{.*}}) : $TensorHandle<Builtin.FPIEEE32>
306306
// CHECK-NEXT: %6 = unchecked_ref_cast %5 : $TensorHandle<Builtin.FPIEEE32> to $TensorHandle<Float>
307307

308-
// CHECK: %8 = builtin "__tfop_Add,$in,$in,device"(%1 : $TensorHandle<Float>, %6 : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
309-
// CHECK-NEXT: %9 = builtin "tensorflowSend_1"<TensorHandle<Float>>(%8 : $TensorHandle<Float>) : $()
310-
// CHECK-NEXT: %10 = float_literal $Builtin.FPIEEE32, 0x40000000
311-
// CHECK-NEXT: %11 = integer_literal $Builtin.Int32, 1
312-
// CHECK: %13 = builtin "__tfop_Const,dtype$dtype,value$tensor,device"(%11 : $Builtin.Int32, %10 : $Builtin.FPIEEE32, {{.*}}) : $TensorHandle<Builtin.FPIEEE32>
313-
// CHECK-NEXT: %14 = builtin "tensorflowReceive_0"<TensorHandle<Builtin.FPIEEE32>>() : $TensorHandle<Builtin.FPIEEE32>
314-
// CHECK: %16 = builtin "__tfop_Add,$in,$in,device"(%14 : $TensorHandle<Builtin.FPIEEE32>, %13 : $TensorHandle<Builtin.FPIEEE32>, {{.*}}) : $TensorHandle<Builtin.FPIEEE32>
315-
// CHECK-NEXT: %17 = unchecked_ref_cast %16 : $TensorHandle<Builtin.FPIEEE32> to $TensorHandle<Float>
316-
// CHECK: %19 = builtin "__tfop_Add,$in,$in,device"(%17 : $TensorHandle<Float>, %17 : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
317-
// CHECK-NEXT: return %19 : $TensorHandle<Float>
308+
// CHECK: %9 = builtin "__tfop_Add,$in,$in,T,device"(%1 : $TensorHandle<Float>, %6 : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
309+
// CHECK-NEXT: %10 = builtin "tensorflowSend_1"<TensorHandle<Float>>(%9 : $TensorHandle<Float>) : $()
310+
// CHECK-NEXT: %11 = float_literal $Builtin.FPIEEE32, 0x40000000
311+
// CHECK-NEXT: %12 = integer_literal $Builtin.Int32, 1
312+
// CHECK: %14 = builtin "__tfop_Const,dtype$dtype,value$tensor,device"(%12 : $Builtin.Int32, %11 : $Builtin.FPIEEE32, {{.*}}) : $TensorHandle<Builtin.FPIEEE32>
313+
// CHECK-NEXT: %15 = builtin "tensorflowReceive_0"<TensorHandle<Builtin.FPIEEE32>>() : $TensorHandle<Builtin.FPIEEE32>
314+
// CHECK: %17 = builtin "__tfop_Add,$in,$in,device"(%15 : $TensorHandle<Builtin.FPIEEE32>, %14 : $TensorHandle<Builtin.FPIEEE32>, {{.*}}) : $TensorHandle<Builtin.FPIEEE32>
315+
// CHECK-NEXT: %18 = unchecked_ref_cast %17 : $TensorHandle<Builtin.FPIEEE32> to $TensorHandle<Float>
316+
// CHECK: %21 = builtin "__tfop_Add,$in,$in,T,device"(%18 : $TensorHandle<Float>, %18 : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
317+
// CHECK-NEXT: return %21 : $TensorHandle<Float>
318318
// CHECK-NEXT:}
319319

320320

@@ -327,10 +327,10 @@ public func testCast(x: Tensor<Float>) -> Tensor<Int32> {
327327
// CHECK-LABEL: --- TFPartition Accelerator Result: {{.*}}testCast
328328
// CHECK: sil private @{{.*}}testCast{{.*}} : $@callee_owned (TensorHandle<Float>) -> TensorHandle<Int32> {
329329
// CHECK: bb0(%0 : $TensorHandle<Float>):
330-
// CHECK: %2 = builtin "__tfop_Add,$in,$in,device"(%0 : $TensorHandle<Float>, %0 : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
331-
// CHECK: %3 = metatype $@thick Int32.Type
332-
// CHECK: %5 = builtin "__tfop_Cast,$in,DstT,device"(%2 : $TensorHandle<Float>, %3 : $@thick Int32.Type, {{.*}}) : $TensorHandle<Int32>
333-
// CHECK: return %5 : $TensorHandle<Int32>
330+
// CHECK: %3 = builtin "__tfop_Add,$in,$in,T,device"(%0 : $TensorHandle<Float>, %0 : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
331+
// CHECK: %5 = metatype $@thick Int32.Type
332+
// CHECK: %7 = builtin "__tfop_Cast,$in,SrcT,DstT,device"(%3 : $TensorHandle<Float>, %4 : $@thick Float.Type, %5 : $@thick Int32.Type, {{.*}}) : $TensorHandle<Int32>
333+
// CHECK: return %7 : $TensorHandle<Int32>
334334

335335

336336

@@ -351,7 +351,7 @@ public func testInputListArguments(a: TensorHandle<Float>, b: Tensor<Float>) ->
351351
CHECK: [[PACK1:%.*]] = builtin "__tfop_Pack,$in,$inelt,$inelt,$inelt,device"(%2 : $@thin TensorHandle<Float>.Type, %0 : $TensorHandle<Float>, %0 : $TensorHandle<Float>, %0 : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
352352
CHECK: [[TYPE:%.*]] = metatype $@thin Tensor<Float>.Type
353353
CHECK: [[PACK2:%.*]] = builtin "__tfop_Pack,$in,$inelt,$inelt,$inelt,device"([[TYPE]] : $@thin Tensor<Float>.Type, %1 : $TensorHandle<Float>, %1 : $TensorHandle<Float>, %1 : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
354-
CHECK: [[RET:%.*]] = builtin "__tfop_Add,$in,$in,device"([[PACK1]] : $TensorHandle<Float>, [[PACK2]] : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
354+
CHECK: [[RET:%.*]] = builtin "__tfop_Add,$in,$in,T,device"([[PACK1]] : $TensorHandle<Float>, [[PACK2]] : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
355355
CHECK: return [[RET]] : $TensorHandle<Float>
356356
CHECK: }
357357
*/
@@ -378,7 +378,7 @@ public func liveOutTest(
378378

379379
/*
380380
CHECK-LABEL: --- TFPartition Host Result: {{.*}}liveOutTest{{.*}}
381-
CHECK: @{{.*}}liveOutTest{{.*}} : $@convention(thin) (@owned Tensor<Float>, @owned Tensor<Float>, @owned Tensor<Float>) -> @owned Tensor<Float> {
381+
CHECK: @{{.*}}liveOutTest{{.*}} : $@convention(thin) (@guaranteed Tensor<Float>, @guaranteed Tensor<Float>, @guaranteed Tensor<Float>) -> @owned Tensor<Float> {
382382

383383
// [[RESULTBUF:%.*]] = alloc_stack $OpaquePointer
384384
// [[RESULTACCESS:%.*]] = begin_access [modify] [static] [[RESULTBUF]] : $*OpaquePointer
@@ -441,8 +441,8 @@ func shouldntInline(_ a: Tensor<Float>) -> Tensor<Float> {
441441

442442
// CHECK-LABEL: --- TFPartition Accelerator Result: {{.*}}shouldntInline
443443
// CHECK: bb0(%0 : $TensorHandle<Float>):
444-
// CHECK: %2 = builtin "__tfop_Mul,$in,$in,device"(%0 : $TensorHandle<Float>, %0 : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
445-
// CHECK: return %2 : $TensorHandle<Float>
444+
// CHECK: %3 = builtin "__tfop_Mul,$in,$in,T,device"(%0 : $TensorHandle<Float>, %0 : $TensorHandle<Float>, {{.*}}) : $TensorHandle<Float>
445+
// CHECK: return %3 : $TensorHandle<Float>
446446
// CHECK-LABEL: ----
447447

448448
public func testNotInlined() {
@@ -514,5 +514,5 @@ public func test77437755(_ hiddenSize: Float) {
514514
// CHECK-LABEL: ---- INPUT FUNCTION {{.*}}test77437755{{.*}} ----------
515515
// CHECK: [[STDDEV:%.*]] = builtin "fdiv_FPIEEE32"
516516
// CHECK: [[STDDEVT:%.*]] = builtin "__tfop_tfc.scalarToTensor,$in"([[STDDEV]] : $Builtin.FPIEEE32) : $TensorHandle<Float>
517-
// CHECK: builtin "__tfop_Mul,$in,$in"({{.*}} : $TensorHandle<Float>, [[STDDEVT]] : $TensorHandle<Float>)
517+
// CHECK: builtin "__tfop_Mul,$in,$in,T"({{.*}} : $TensorHandle<Float>, [[STDDEVT]] : $TensorHandle<Float>, {{.*}})
518518
// CHECK-LABEL: ---- END OF INPUT FUNCTION ----------

test/TensorFlow/retain_release.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
// RUN: %target-swift-frontend -Xllvm -tf-dump-intermediates -O -emit-sil %s -o -
22
// RUN: %target-swift-frontend -Xllvm -tf-dump-intermediates -O -emit-sil %s -verify | %FileCheck %s
33

4-
// FIXME(b/78371828): Should this test work with optimized_stdlib?
5-
// UNSUPPORTED: optimized_stdlib
6-
74
import TensorFlow
85

96
// Unit tests on generating balanced retain/release SIL instructions.

test/TensorFlowRuntime/shaped_array.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
import TensorFlow
88
import StdlibUnittest
99

10+
// TODO(SR-7983): Investigate why this is necessary.
11+
import SwiftOnoneSupport
12+
1013
var ShapedArrayTests = TestSuite("ShapedArrayTests")
1114

1215
// TODO: add full Collection scalar test suite.

test/TensorFlowRuntime/sync_runtime.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import StdlibUnittest
88
import CTensorFlow
99
import TensorFlow
1010

11+
// TODO(SR-7983): Investigate why this is necessary.
12+
import SwiftOnoneSupport
13+
1114
var RuntimeTests = TestSuite("SyncRuntime")
1215

1316
_RuntimeConfig.usesSynchronousExecution = true

0 commit comments

Comments
 (0)