Skip to content

Revert "[AutoDiff] Forward-mode support for variables, generics, tuples, structs."#27250

Closed
dan-zheng wants to merge 1 commit intotensorflowfrom
revert-26743-differential-emitter-generic-support
Closed

Revert "[AutoDiff] Forward-mode support for variables, generics, tuples, structs."#27250
dan-zheng wants to merge 1 commit intotensorflowfrom
revert-26743-differential-emitter-generic-support

Conversation

@dan-zheng
Copy link
Contributor

Reverts #26743.


This PR likely causes swift test for tensorflow/swift-apis to fail verification:

SIL verification failed: switch_enum dispatches on same enum element more than once: unswitchedElts.count(elt)
Verifying instruction:
     %2 = struct_extract %1 : $_AD__$s10TensorFlow0A0V14batchGathering9atIndices9alongAxis0C14DimensionCountACyxGACyqd__G_S2itAA0aB5IndexRd__lF_bb6__PB__src_0_wrt_3<τ_0_0, τ_1_0>, #_AD__$s10TensorFlow0A0V14batchGathering9atIndices9alongAxis0C14DimensionCountACyxGACyqd__G_S2itAA0aB5IndexRd__lF_bb6__PB__src_0_wrt_3.predecessor // user: %91
->   switch_enum %2 : $_AD__$s10TensorFlow0A0V14batchGathering9atIndices9alongAxis0C14DimensionCountACyxGACyqd__G_S2itAA0aB5IndexRd__lF_bb6__Pred__src_0_wrt_3<τ_0_0, τ_1_0>, case #_AD__$s10TensorFlow0A0V14batchGathering9atIndices9alongAxis0C14DimensionCountACyxGACyqd__G_S2itAA0aB5IndexRd__lF_bb6__Pred__src_0_wrt_3.bb5!enumelt.1: bb8, case #_AD__$s10TensorFlow0A0V14batchGathering9atIndices9alongAxis0C14DimensionCountACyxGACyqd__G_S2itAA0aB5IndexRd__lF_bb6__Pred__src_0_wrt_3.bb4!enumelt.1: bb1 // id: %91
In function:
// AD__$s10TensorFlow0A0V14batchGathering9atIndices9alongAxis0C14DimensionCountACyxGACyqd__G_S2itAA0aB5IndexRd__lF__pullback_src_0_wrt_3
sil hidden [serialized] [canonical] @AD__$s10TensorFlow0A0V14batchGathering9atIndices9alongAxis0C14DimensionCountACyxGACyqd__G_S2itAA0aB5IndexRd__lF__pullback_src_0_wrt_3 : $@convention(method) <τ_0_0 where τ_0_0 : TensorFlowFloatingPoint><τ_1_0 where τ_1_0 : TensorFlowIndex> (@guaranteed Tensor<τ_0_0>, @owned _AD__$s10TensorFlow0A0V14batchGathering9atIndices9alongAxis0C14DimensionCountACyxGACyqd__G_S2itAA0aB5IndexRd__lF_bb6__PB__src_0_wrt_3<τ_0_0, τ_1_0>) -> @owned Tensor<τ_0_0>

Full verification failure log.

@dan-zheng dan-zheng added the tensorflow This is for "tensorflow" branch PRs. label Sep 19, 2019
@dan-zheng
Copy link
Contributor Author

@swift-ci Please test tensorflow

@dan-zheng
Copy link
Contributor Author

Closing, as this PR is not the cause of the verification failure.

The failure is related to IterableDeclContext::loadAllMembers for AD-generated structs and enums. Related commits are:

@dan-zheng dan-zheng closed this Sep 19, 2019
@dan-zheng dan-zheng deleted the revert-26743-differential-emitter-generic-support branch October 2, 2019 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tensorflow This is for "tensorflow" branch PRs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant