Skip to content

Conversation

kshitij12345
Copy link
Collaborator

@kshitij12345 kshitij12345 commented May 29, 2021

Reference: #54261

Depends on: #59154

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented May 29, 2021

💊 CI failures summary and remediations

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


  • 2/2 failures possibly* introduced in this PR
    • 1/2 non-scanned failure(s)

1 failure not recognized by patterns:

Job Step Action
CircleCI pytorch_linux_xenial_cuda11_1_cudnn8_py3_gcc7_test1 Unknown 🔁 rerun

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 to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@kshitij12345 kshitij12345 marked this pull request as ready for review May 31, 2021 05:14
@kshitij12345 kshitij12345 requested a review from mruberry May 31, 2021 05:31
Copy link
Collaborator

@mruberry mruberry left a comment

Choose a reason for hiding this comment

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

This looks pretty good @kshitij12345; I made a few comments inline for your review. Looking forward to porting one of the largest remaining set of method_tests()!

@kshitij12345
Copy link
Collaborator Author

@mruberry Addressed the reviews. PTAL :)

Changes

  • Add extra_kwargs
  • Removed one redundant entry
  • Updated the summary to have branch only for list and tuple

@@ -739,7 +732,10 @@ def sample_inputs_linalg_vector_norm(op_info, device, dtype, requires_grad, **kw
# specify scalars of floating, integral & complex types as values for "alpha".
# Keyword argument `rhs_exclude_zero` is used to exclude zero values from rhs tensor argument
# This is necessary for operations like `true_divide`, where divide by zero throws an exception.
def sample_inputs_binary_pwise(op_info, device, dtype, requires_grad, **kwargs):
def sample_inputs_binary_pwise(op_info, device, dtype, requires_grad, extra_kwargs=None, **kwargs):
Copy link
Collaborator

Choose a reason for hiding this comment

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

extra_kwargs is a better name

Style nit (only to be fixed if significant changes are required): make extra_kwargs keyword-only?

@@ -1263,20 +1261,6 @@ def sample_inputs_comparison_ops(self, device, dtype, requires_grad, **kwargs):
sample_inputs = [*sample_inputs, *more_inputs]
return tuple(sample_inputs)

def sample_inputs_div(self, device, dtype, requires_grad, rounding_mode=None, **kwargs):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice simplification

sample_inputs_func=sample_inputs_div,
skips=(SkipInfo('TestOpInfo', 'test_duplicate_method_tests'),),
assert_autodiffed=True),
OpInfo('div',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice job noticing this was redundant

@@ -6864,24 +6849,6 @@ def ident(x):
def method_tests():
set_rng_seed(SEED)
return [
('div', (S, S, S), (torch.rand(S, S, S) + 0.1,), '', (True,)),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wahoo!

@mruberry mruberry self-requested a review May 31, 2021 07:43
Copy link
Collaborator

@mruberry mruberry left a comment

Choose a reason for hiding this comment

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

Awesome work, @kshitij12345!

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

@mruberry merged this pull request in 223725c.

deniskokarev pushed a commit to deniskokarev/pytorch that referenced this pull request Jun 9, 2021
Summary:
Reference: pytorch#54261

Depends on: pytorch#59154

Pull Request resolved: pytorch#59173

Reviewed By: ngimel

Differential Revision: D28785178

Pulled By: mruberry

fbshipit-source-id: 902310f2d77e499a2355a23b2d5a8c0b21b8c5bb
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.

4 participants