Skip to content

Conversation

@kshitij12345
Copy link
Collaborator

Fixes #45201

@kshitij12345
Copy link
Collaborator Author

@albanD Please review :)

@dr-ci
Copy link

dr-ci bot commented Sep 23, 2020

💊 CI failures summary and remediations

As of commit e55e126 (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 5 times.

@kshitij12345
Copy link
Collaborator Author

@pytorchbot rebase this please

}

Tensor repeat_backward(Tensor grad, int64_t input_dims, IntArrayRef repeats) {
Tensor repeat_backward(Tensor grad, int64_t input_dims, IntArrayRef repeats, IntArrayRef input_shape) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: you can remove the input_dims argument now that you have all the shapes.

c.backward()
self.assertEqual(b.grad, torch.tensor([-inf, 0., 0.]))

def test_repeat_zero_dim(self):
Copy link
Collaborator

Choose a reason for hiding this comment

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

You don't have to do a custom test here. You can simply add a new entry here that specifies the input size and the arguments.
So something like ('repeat', (2), (0,), 'zero_repeat'), will do the same thing.

@albanD
Copy link
Collaborator

albanD commented Sep 23, 2020

Thanks for sending a PR!
I added a few comments inline above.

@codecov
Copy link

codecov bot commented Sep 23, 2020

Codecov Report

Merging #45212 into master will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #45212      +/-   ##
==========================================
- Coverage   68.01%   68.01%   -0.01%     
==========================================
  Files         393      393              
  Lines       50847    50847              
==========================================
- Hits        34583    34582       -1     
- Misses      16264    16265       +1     
Impacted Files Coverage Δ
...ch/testing/_internal/common_methods_invocations.py 91.41% <ø> (ø)
torch/testing/_internal/expecttest.py 77.55% <0.00%> (-1.03%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 99242ec...e55e126. Read the comment docs.

@kshitij12345
Copy link
Collaborator Author

@albanD Have addressed the comments. PTAL:)

Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

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

Perfect! Thanks for the update!

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@albanD has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@albanD merged this pull request in 00e704e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backward of repeat() crash if repeated size is 0

5 participants