Skip to content

Commit 00b9d2e

Browse files
authored
---
yaml --- r: 340727 b: refs/heads/rxwei-patch-1 c: def2be9 h: refs/heads/master i: 340725: 12cd6bf 340723: f0e23f9 340719: 00449a2
1 parent e83f0e5 commit 00b9d2e

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-08-18-a: b10b1fce14385faa6d44f6b933e95
10151015
refs/heads/rdar-43033749-fix-batch-mode-no-diags-swift-5.0-branch: a14e64eaad30de89f0f5f0b2a782eed7ecdcb255
10161016
refs/heads/revert-19006-error-bridging-integer-type: 8a9065a3696535305ea53fe9b71f91cbe6702019
10171017
refs/heads/revert-19050-revert-19006-error-bridging-integer-type: ecf752d54b05dd0a20f510f0bfa54a3fec3bcaca
1018-
refs/heads/rxwei-patch-1: 6b822d8ac5ae878278e5f53c669d9917367f029f
1018+
refs/heads/rxwei-patch-1: def2be969bb8212f6cfc388698a4a58d4c4283b5
10191019
refs/heads/shahmishal-patch-1: e58ec0f7488258d42bef51bc3e6d7b3dc74d7b2a
10201020
refs/heads/typelist-existential: 4046359efd541fb5c72d69a92eefc0a784df8f5e
10211021
refs/tags/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-08-20-a: 4319ba09e4fb8650ee86061075c74a016b6baab9

branches/rxwei-patch-1/lib/SILOptimizer/Mandatory/Differentiation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3336,7 +3336,8 @@ class VJPEmitter final
33363336
loweredPullbackType);
33373337
auto *thunkRef = getBuilder().createFunctionRef(loc, thunk);
33383338
pullback = getBuilder().createPartialApply(
3339-
ai->getLoc(), thunkRef, thunk->getForwardingSubstitutionMap(),
3339+
ai->getLoc(), thunkRef,
3340+
getOpSubstitutionMap(thunk->getForwardingSubstitutionMap()),
33403341
{pullback}, actualPullbackType->getCalleeConvention());
33413342
}
33423343
pullbackValues[ai->getParent()].push_back(pullback);

branches/rxwei-patch-1/test/AutoDiff/autodiff_diagnostics.swift

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,23 @@ struct TF_305 : Differentiable {
170170
}
171171
}
172172

173+
protocol TF_534_Layer : Differentiable {
174+
associatedtype Input : Differentiable
175+
associatedtype Output : Differentiable
176+
177+
@differentiable
178+
func callAsFunction(_ input: Input) -> Output
179+
}
180+
struct TF_534_Tensor<Scalar> : Differentiable {}
181+
182+
func TF_534<Model: TF_534_Layer>(
183+
_ model: inout Model, inputs: Model.Input
184+
) -> TF_534_Tensor<Float> where Model.Output == TF_534_Tensor<Float> {
185+
return valueWithPullback(at: model) { model -> Model.Output in
186+
return model(inputs)
187+
}.0
188+
}
189+
173190
//===----------------------------------------------------------------------===//
174191
// Classes and existentials (not yet supported)
175192
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)