Skip to content

Conversation

lezcano
Copy link
Collaborator

@lezcano lezcano commented Nov 14, 2023

Copy link

pytorch-bot bot commented Nov 14, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/113674

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 1cb9f00 with merge base 51cbe78 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@lezcano lezcano added topic: not user facing topic category module: tests Issues related to tests (not the torch.testing module) labels Nov 14, 2023
…th different dtypes"

As per title

cc mruberry ZainRizvi

[ghstack-poisoned]
…th different dtypes"

As per title

cc mruberry ZainRizvi

[ghstack-poisoned]
Copy link
Collaborator

@peterbell10 peterbell10 left a comment

Choose a reason for hiding this comment

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

Some NITs and random thoughts, but looks good.

Comment on lines +1298 to +1301
op = copy.copy(op)
op.sample_inputs_func = sample_input

self._run_dispatch_meta_test(device, dtype, op, symbolic_meta=True, inplace=False)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would be cleaner to make the sample_inputs generator an input to the test function, so we don't need to clone the opinfo object.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The thing is that it's the function that is shared by all the tests, so I wanted to keep changes to the minimum

DecorateInfo(unittest.expectedFailure,
'TestBinaryUfuncs',
'test_type_promotion'),
DecorateInfo(unittest.expectedFailure, 'TestMeta', 'test_binary_ufuncs_mixed_dtype'),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if we could factor test_type_promotion into a helper and run it on meta devices as well? It seems to be a lot more comprehensive.

Or tbh it would be great if we could just run all the opinfo tests with a meta device...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

at the moment, the tests in test_meta.py are written in a very particular way. I agree it would be better to refactor these in more OpInfo friendly.

This is a good onboarding task, I'll keep in mind.

…th different dtypes"

As per title

cc mruberry ZainRizvi

[ghstack-poisoned]
…th different dtypes"

As per title

cc mruberry ZainRizvi

[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Nov 16, 2023
@facebook-github-bot facebook-github-bot deleted the gh/Lezcano/253/head branch November 20, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: tests Issues related to tests (not the torch.testing module) open source topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants