Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Port over tensor_autodiff_runtime.swift tests. #235

Merged
merged 6 commits into from
Jun 15, 2019

Conversation

bartchr808
Copy link
Contributor

This PR ports over the tests that were located here in apple/swift before the refactor. Not all of them were ported over, as seen in the PR here, and this PR only adds the ones in TensorFlowRuntime/tensor_autodiff_runtime.swift and also the ones I was going to add for testing broadcast/unbroadcast in this PR.

Copy link
Contributor

@bgogul bgogul left a comment

Choose a reason for hiding this comment

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

Thanks @bartchr808. Can you name the tests appropriately?

@bartchr808 bartchr808 requested a review from bgogul June 13, 2019 23:44
@bartchr808
Copy link
Contributor Author

@bgogul quick ping for a re-review 😄

Copy link
Contributor

@bgogul bgogul left a comment

Choose a reason for hiding this comment

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

Looks good. Just address Richard's comments?

func foo(tensor: Tensor<Float>, shape: Tensor<Int32>) -> Tensor<Float> {
tensor.unbroadcasted(toShape: shape)
}
var inputTensor: Tensor<Float>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any reason for the initialization to be an a different line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can initialize it to the one needed for the first subtest.

@bartchr808 bartchr808 merged commit efc6acf into master Jun 15, 2019
@bartchr808 bartchr808 deleted the broadcast-unbroadcast-tensor-tests branch June 15, 2019 01:12
dan12411 pushed a commit to dan12411/swift-apis that referenced this pull request Jun 15, 2019
- Port over tensor_autodiff_runtime.swift tests from apple/swift PR 24899.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants