Skip to content

Conversation

walterddr
Copy link
Contributor

Echo on #58260 (comment)

similar to test_unsupported_dtype which only check exception raised on the first sample. we should do similar things for unsupported_backward as well. The goal for both test is to remind developer to

  1. add a new dtype to the support list if they are fulling runnable without failure (over all samples)
  2. replace the skip mechanism which will indefinitely ignore tests without warning

Test Plan
CI.

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jun 4, 2021

💊 CI failures summary and remediations

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


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

ci.pytorch.org: 1 failed


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.

@walterddr walterddr force-pushed the be_unsupported_backward_single_test branch from 88d5212 to 51f4595 Compare June 4, 2021 17:10
@walterddr walterddr marked this pull request as ready for review June 4, 2021 23:30
@walterddr walterddr requested a review from mruberry June 4, 2021 23:30
@walterddr
Copy link
Contributor Author

@mruberry this is another idea to enable unsupported backward test. please kindly take a look. I think this is a better approach and should be easier to get merge

test/test_ops.py Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will probably require a slight tweak to handle functions like to_sparse() which return a sparse tensor, but it should be a simple update after #59445 is in

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#59445 is merged and I've rebased over it. since it doesn't introduce additional failure I am planning to merge this and then fix anything needed to avoid further merge conflicts.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't test to_sparse, x.to_sparse().sum().backward() raises runtime error on .sum() and thus passes this test, but it's not what's supposed to be tested.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Will create a follow up issue along with the rest of the tweaks needed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a surprising change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup. surprising to me too

@mruberry mruberry added the ci/all label Jun 5, 2021
@mruberry
Copy link
Collaborator

mruberry commented Jun 5, 2021

This is a great test and the idea seems correct. For the backward, I think this should call rand_like instead of taking the sum to also support sparse outputs (since to_sparse will be an opinfo soon).

There are also a few test issues that need to be addressed still, like test_unsupported_backward_einsum_cuda_bfloat16 and some ROCm tests.

Testing against the "master" builds, too, is definitely the right idea. I erroneously added "all" -- my mistake

@mruberry mruberry removed the ci/all label Jun 5, 2021
fixing tests and adding skips

fix test issues
@walterddr walterddr force-pushed the be_unsupported_backward_single_test branch from c20f66d to beaee2b Compare June 6, 2021 17:12
@walterddr walterddr force-pushed the be_unsupported_backward_single_test branch from beaee2b to 53dcda9 Compare June 6, 2021 18:49
@codecov
Copy link

codecov bot commented Jun 6, 2021

Codecov Report

Merging #59455 (53dcda9) into master (390fe74) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #59455   +/-   ##
=======================================
  Coverage   76.43%   76.43%           
=======================================
  Files        2038     2038           
  Lines      203064   203064           
=======================================
+ Hits       155217   155218    +1     
+ Misses      47847    47846    -1     

Copy link
Contributor Author

@walterddr walterddr left a comment

Choose a reason for hiding this comment

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

rebased and looks like it is working well. (rocm failure seem irrelevant)
will try to merged it and monitor HUD. if any failure occurs i guess the best option is to forward fix by skipping tests

test/test_ops.py Outdated
Copy link
Contributor Author

Choose a reason for hiding this comment

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

#59445 is merged and I've rebased over it. since it doesn't introduce additional failure I am planning to merge this and then fix anything needed to avoid further merge conflicts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup. surprising to me too

@facebook-github-bot
Copy link
Contributor

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

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.

Cool! Let's try to sneak this in

@facebook-github-bot
Copy link
Contributor

@walterddr merged this pull request in 26beda8.

deniskokarev pushed a commit to deniskokarev/pytorch that referenced this pull request Jun 9, 2021
Summary:
Echo on pytorch#58260 (comment)

similar to `test_unsupported_dtype` which only check exception raised on the first sample. we should do similar things for unsupported_backward as well. The goal for both test is to remind developer to
1. add a new dtype to the support list if they are fulling runnable without failure (over all samples)
2. replace the skip mechanism which will indefinitely ignore tests without warning

Pull Request resolved: pytorch#59455

Test Plan: CI.

Reviewed By: mruberry

Differential Revision: D28927169

Pulled By: walterddr

fbshipit-source-id: 2993649fc17a925fa331e27c8ccdd9b24dd22c20
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