OpInfos for: normal, bernoulli, multinomial#66358
OpInfos for: normal, bernoulli, multinomial#66358zou3519 wants to merge 5 commits intogh/zou3519/386/basefrom
Conversation
Test Plan: - run tests [ghstack-poisoned]
CI Flow Status⚛️ CI FlowRuleset - Version:
You can add a comment to the PR and tag @pytorchbot with the following commands: # ciflow rerun, "ciflow/default" will always be added automatically
@pytorchbot ciflow rerun
# ciflow rerun with additional labels "-l <ciflow/label_name>", which is equivalent to adding these labels manually and trigger the rerun
@pytorchbot ciflow rerun -l ciflow/scheduled -l ciflow/slowFor more information, please take a look at the CI Flow Wiki. |
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 09353f2 (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).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
Test Plan: - run tests [ghstack-poisoned]
|
@zou3519 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
| ] | ||
| return sample_inputs_normal_common(self, device, dtype, requires_grad, cases, **kwargs) | ||
|
|
||
| def sample_inputs_bernoulli(self, device, dtype, requires_grad, **kwargs): |
There was a problem hiding this comment.
TODO: add different generators?
There was a problem hiding this comment.
Generators are difficult to toss into sample inputs because after performing the operation (e.g. torch.bernoulli(x, generator=generator)), the generator gets mutated in-place. This means that the "variant consistency" tests (among others) need special handling for generators. Furthermore, torch.manual_seed doesn't affect generators, so we can't use the "wrap the function with a torch.manual_seed" solution to overcome this.
I might decide to handle this in a followup (or file an issue for it), but I'll give it some more thought first
There was a problem hiding this comment.
Going to file an issue for generator support
| skips=( | ||
| # AssertionError: JIT Test does not execute any logic | ||
| DecorateInfo(unittest.skip("Skipped!"), 'TestJit', 'test_variant_consistency_jit'), | ||
| # UserWarning not triggered : Resized a non-empty tensor but did not warn about it. |
There was a problem hiding this comment.
Nice comments for the skips
mruberry
left a comment
There was a problem hiding this comment.
Cool! I left a few minor inline comments. I'm not sure what's up with the lint build failure, however.
|
Is there anything blocking this PR? It'd be nice to have it landed to be able to test the stack in #69631 |
|
@lezcano I can rebase and land this |
Test Plan: - run tests Differential Revision: [D31551695](https://our.internmc.facebook.com/intern/diff/D31551695) [ghstack-poisoned]
|
@zou3519 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Test Plan: - run tests Differential Revision: [D31551695](https://our.internmc.facebook.com/intern/diff/D31551695) [ghstack-poisoned]
|
@zou3519 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Test Plan: - run tests Differential Revision: [D31551695](https://our.internmc.facebook.com/intern/diff/D31551695) [ghstack-poisoned]
|
@zou3519 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Stack from ghstack:
Test Plan:
Differential Revision: D31551695