File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
lib/SILOptimizer/Differentiation Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
- // ===--- AdjointValue.cpp - Helper class for differentiation ----*- C++
2
- // -*---===//
1
+ // ===--- AdjointValue.h - Helper class for differentiation ----*- C++ -*---===//
3
2
//
4
3
// This source file is part of the Swift.org open source project
5
4
//
@@ -68,4 +67,4 @@ void swift::autodiff::AdjointValue::print(llvm::raw_ostream &s) const {
68
67
s << " ]" ;
69
68
break ;
70
69
}
71
- }
70
+ }
Original file line number Diff line number Diff line change @@ -430,6 +430,8 @@ class PullbackCloner::Implementation final
430
430
}
431
431
case AdjointValueKind::AddElement: {
432
432
auto baseAdjoint = val;
433
+ assert (baseAdjoint.getType ().is <TupleType>() ||
434
+ baseAdjoint.getType ().getStructOrBoundGenericStruct () != nullptr );
433
435
434
436
// Current adjoint may be made up of layers of `AddElement` adjoints.
435
437
// We can iteratively gather the list of elements to add instead of making
You can’t perform that action at this time.
0 commit comments