Skip to content

Conversation

@marcrasi
Copy link

The differentiation transform sometimes tries to call the wrong subscript when there are multiple subscripts.

This concretely causes problems when you import TensorFlow because this subscript has different conformances in its generic signature than the correct subscript, so you get an assertion failure while trying to construct a substitution map for it:

Assertion failed: (conformances.size() == numConformanceRequirements), function Storage, file /Users/danielzheng/swift-debug/swift/lib/AST/SubstitutionMap.cpp, line 46.

@marcrasi marcrasi requested review from dan-zheng and rxwei May 12, 2020 00:29
@marcrasi
Copy link
Author

@swift-ci please test

Copy link
Contributor

@dan-zheng dan-zheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! That looks interesting to debug 🙂

@dan-zheng dan-zheng merged commit 619d0b0 into swiftlang:master May 12, 2020
rxwei pushed a commit to rxwei/swift that referenced this pull request Jun 3, 2020
…ang#31723)

Fix `PullbackEmitter::getArrayAdjointElementBuffer` to always lookup
`Array.TangentVector.subscript` from the stdlib.

Resolves compiler crash when user code also defines
`Array.TangentVector.subscript`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants