Skip to content

Commit d3814ec

Browse files
authored
---
yaml --- r: 293883 b: refs/heads/tensorflow c: 17ab3b9 h: refs/heads/master i: 293881: 1879ea6 293879: f8e9400
1 parent ea27cb2 commit d3814ec

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-04-25-a: 22f738a831d43aff2b9c9773bcb65
816816
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-05-08-a: 7d98cc16689baba5c8a3b90a9329bdcc1a12b4e9
817817
refs/heads/cherr42: a566ad54b073c2c56ac0a705d0a5bed9743135a5
818818
"refs/heads/codable_test_comment_fix": fc8f6824f7f347e1e8db55bff62db385c5728b5a
819-
refs/heads/tensorflow: 3edf725be279cba222551da18ec0b3c8fa5b2d46
819+
refs/heads/tensorflow: 17ab3b95d03bcb5a7cd9c90ad060dfef91c92758
820820
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-11-a: 8126fd7a652e2f70ad6d76505239e34fb2ef3e1a
821821
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-12-a: b3fd3dd84df6717f2e2e9df58c6d7e99fed57086
822822
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-13-a: 71135119579039dc321c5f65d870050fe36efda2

branches/tensorflow/test/AutoDiff/derived_differentiable_properties.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public struct Foo : Differentiable {
1818
// CHECK-AST: public typealias CotangentVector = Foo.AllDifferentiableVariables
1919

2020
// CHECK-SILGEN-LABEL: // Foo.a.getter
21-
// CHECK-SILGEN-NEXT: sil [transparent] [serialized] [differentiable source 0 wrt 0] @$s33derived_differentiable_properties3FooV1aSfvg : $@convention(method) (Foo) -> Float
21+
// CHECK-SILGEN-NEXT: sil [transparent] [serialized] [differentiable source 0 wrt 0] [ossa] @$s33derived_differentiable_properties3FooV1aSfvg : $@convention(method) (Foo) -> Float
2222

2323
struct AdditiveTangentIsSelf : AdditiveArithmetic, Differentiable {
2424
var a: Float

branches/tensorflow/test/AutoDiff/differentiable_attr_silgen.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ public func foo(_ x: Float, _ y: Float) -> Float {
1010
return 1
1111
}
1212

13-
// CHECK-LABEL: sil [differentiable source 0 wrt 0, 1 vjp @dfoo] @foo
13+
// CHECK-LABEL: sil [differentiable source 0 wrt 0, 1 vjp @dfoo] [ossa] @foo
1414

1515
@_silgen_name("dfoo")
1616
public func dfoo(_ x: Float, _ y: Float) -> (Float, (Float) -> (Float, Float)) {
1717
return (foo(x, y), { _ in (1, 1) })
1818
}
1919

20-
// CHECK-LABEL: sil @dfoo
20+
// CHECK-LABEL: sil [ossa] @dfoo
2121

2222
//===----------------------------------------------------------------------===//
2323
// Indirect returns
@@ -29,8 +29,8 @@ public func foo_indir_ret<T: Differentiable>(_ x: Float, _ y: T) -> T {
2929
return y
3030
}
3131

32-
// CHECK-LABEL: sil [differentiable source 0 wrt 0, 1 vjp @dfoo_indir_ret] @foo_indir_ret : $@convention(thin) <T where T : Differentiable> (Float, @in_guaranteed T) -> @out T {
33-
// CHECK: bb0(%0 : @trivial $*T, %1 : @trivial $Float, %2 : @trivial $*T):
32+
// CHECK-LABEL: sil [differentiable source 0 wrt 0, 1 vjp @dfoo_indir_ret] [ossa] @foo_indir_ret : $@convention(thin) <T where T : Differentiable> (Float, @in_guaranteed T) -> @out T {
33+
// CHECK: bb0(%0 : $*T, %1 : $Float, %2 : $*T):
3434

3535
@_silgen_name("dfoo_indir_ret")
3636
public func dfoo_indir_ret<T: Differentiable>(_ x: Float, _ y: T) -> (T, (T.CotangentVector) -> (Float, T.CotangentVector)) {
@@ -47,14 +47,14 @@ public func hasjvp(_ x: Float, _ y: Float) -> Float {
4747
return 1
4848
}
4949

50-
// CHECK-LABEL: sil [differentiable source 0 wrt 0, 1 jvp @dhasjvp] @hasjvp
50+
// CHECK-LABEL: sil [differentiable source 0 wrt 0, 1 jvp @dhasjvp] [ossa] @hasjvp
5151

5252
@_silgen_name("dhasjvp")
5353
public func dhasjvp(_ x: Float, _ y: Float) -> (Float, (Float, Float) -> Float) {
5454
return (1, { _, _ in 1 })
5555
}
5656

57-
// CHECK-LABEL: sil @dhasjvp
57+
// CHECK-LABEL: sil [ossa] @dhasjvp
5858

5959
//===----------------------------------------------------------------------===//
6060
// VJP
@@ -67,14 +67,14 @@ public func hasvjp(_ x: Float, _ y: Float) -> Float {
6767
return 1
6868
}
6969

70-
// CHECK-LABEL: sil [serialized] [differentiable source 0 wrt 0, 1 vjp @dhasvjp] @hasvjp
70+
// CHECK-LABEL: sil [serialized] [differentiable source 0 wrt 0, 1 vjp @dhasvjp] [ossa] @hasvjp
7171

7272
@_silgen_name("dhasvjp")
7373
public func dhasvjp(_ x: Float, _ y: Float) -> (Float, (Float) -> (Float, Float)) {
7474
return (1, { _ in (1, 1) })
7575
}
7676

77-
// CHECK-LABEL: sil @dhasvjp
77+
// CHECK-LABEL: sil [ossa] @dhasvjp
7878

7979
//===----------------------------------------------------------------------===//
8080
// Stored property
@@ -163,4 +163,4 @@ public struct MyLayer: Differentiable {
163163
}
164164

165165
// CHECK-LABEL: initialization expression of MyLayer.x
166-
// CHECK-NEXT: sil [transparent] @$s26differentiable_attr_silgen7MyLayerV1xSfvpfi : $@convention(thin) () -> Float
166+
// CHECK-NEXT: sil [transparent] [ossa] @$s26differentiable_attr_silgen7MyLayerV1xSfvpfi : $@convention(thin) () -> Float

branches/tensorflow/test/AutoDiff/differentiable_attr_type_checking.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,9 @@ func vjpNonvariadic(_ x: Float, indices: [Int32]) -> (Float, (Float) -> Float) {
564564
return (x, { $0 })
565565
}
566566

567-
// expected-error @+2 {{type 'Scalar' constrained to non-protocol, non-class type 'Float'}}
568-
// expected-error @+1 {{can only differentiate with respect to parameters that conform to 'Differentiable', but 'Scalar' does not conform to 'Differentiable'}}
567+
// expected-error @+3 {{type 'Scalar' constrained to non-protocol, non-class type 'Float'}}
568+
// expected-error @+2 {{can only differentiate with respect to parameters that conform to 'Differentiable', but 'Scalar' does not conform to 'Differentiable'}}
569+
// expected-note @+1 {{use 'Scalar == Float' to require 'Scalar' to be 'Float'}}
569570
@differentiable(where Scalar : Float)
570571
func invalidRequirementConformance<Scalar>(x: Scalar) -> Scalar {
571572
return x

0 commit comments

Comments
 (0)