KEMBAR78
[MPS] Enable forward test for renorm by arunppsg · Pull Request #106666 · pytorch/pytorch · GitHub
Skip to content

Conversation

@arunppsg
Copy link
Contributor

@arunppsg arunppsg commented Aug 5, 2023

Enabled forward test for renorm

cc @qqaatw

@arunppsg arunppsg requested a review from kulinseth as a code owner August 5, 2023 13:52
@pytorch-bot
Copy link

pytorch-bot bot commented Aug 5, 2023

🔗 Helpful Links

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

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

✅ No Failures

As of commit 2f7c603 with merge base bd34f85 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@pytorch-bot pytorch-bot bot added ciflow/mps Run MPS tests (subset of trunk) topic: not user facing topic category labels Aug 5, 2023
@zou3519 zou3519 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Aug 7, 2023
@qqaatw
Copy link
Collaborator

qqaatw commented Aug 8, 2023

Hi, can you fix the tests, please?

@arunppsg arunppsg marked this pull request as draft August 8, 2023 17:19
@arunppsg
Copy link
Contributor Author

arunppsg commented Aug 8, 2023

Hey, I am not sure what is causing the test failure. Can you please guide me on how to fix it?

@kulinseth
Copy link
Collaborator

Hey, I am not sure what is causing the test failure. Can you please guide me on how to fix it?

@qqaatw , thanks for the fix.

@qqaatw
Copy link
Collaborator

qqaatw commented Aug 9, 2023

@arunppsg, please fix the lint, thanks.

Here are a couple of things:

  1. Please do not merge your PR when the newly added op is not covered by tests, doing so may cause the PR to be reverted as the implementation may be incorrect. If you're not sure which tests should be enabled or xfailed, you could ask the maintainers for guidance.
  2. The maxnorm input is a Scalar, which is actually a class structure. We should pass the underlying value of it, which is a C++ primitive data type, into the Metal kernel instead of passing the pointer of the Scalar. Additionally, Metal doesn't support double data type, so we should convert it to float in advance.
  3. The backward of renorm has actually been implemented for all backends, see here. The issue was with data type.

@arunppsg
Copy link
Contributor Author

arunppsg commented Aug 9, 2023

Thank you @qqaatw for help - sure, I will keep the pointers in mind during future contribution.

@arunppsg arunppsg marked this pull request as ready for review August 9, 2023 16:01
@albanD albanD removed their request for review August 9, 2023 18:24
@arunppsg
Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Aug 15, 2023
@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: Approval needed from one of the following:
caogao, bugra, mergennachin, smessmer, XilunWu, ...

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

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.

Random rant about our code being too cuda specific, shouldn't block this PR!

at::toAccumulateType(self.scalar_type(), /*is_cuda=*/self.is_cuda());
auto acc_type = self.is_mps()
? self.scalar_type()
: at::toAccumulateType(self.scalar_type(), /*is_cuda=*/self.is_cuda());
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 should move toAccumulateType() to have a is_gpu (or device) flag to be able to treat the accumulation type the same way on cuda and mps.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah I thought about this but was not sure whether the cuda accumulation types are applicable to mps or not. So didn't change this part.

Will investigate it.

@qqaatw
Copy link
Collaborator

qqaatw commented Aug 17, 2023

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

qqaatw added a commit that referenced this pull request Sep 3, 2023
Trying to address this comment: #106666 (comment)

cc albanD kulinseth 

[ghstack-poisoned]
qqaatw added a commit that referenced this pull request Sep 4, 2023
Trying to address this comment: #106666 (comment)

cc albanD kulinseth 

[ghstack-poisoned]
qqaatw added a commit that referenced this pull request Sep 4, 2023
Trying to address this comment: #106666 (comment)

cc albanD kulinseth 

[ghstack-poisoned]
qqaatw added a commit that referenced this pull request Sep 7, 2023
Trying to address this comment: #106666 (comment)

cc albanD kulinseth 

[ghstack-poisoned]
qqaatw added a commit that referenced this pull request Sep 7, 2023
Trying to address this comment: #106666 (comment)

cc albanD kulinseth 

[ghstack-poisoned]
qqaatw added a commit that referenced this pull request Sep 12, 2023
Trying to address this comment: #106666 (comment)

cc albanD kulinseth 

[ghstack-poisoned]
qqaatw added a commit that referenced this pull request Sep 12, 2023
Trying to address this comment: #106666 (comment)

cc albanD kulinseth 

[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Sep 29, 2023
Trying to address this comment: #106666 (comment)

cc albanD kulinseth 

[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Sep 29, 2023
Trying to address this comment: #106666 (comment)

cc albanD kulinseth 

[ghstack-poisoned]
qqaatw added a commit that referenced this pull request Oct 2, 2023
Trying to address this comment: #106666 (comment)

cc albanD kulinseth 

[ghstack-poisoned]
qqaatw added a commit that referenced this pull request Oct 2, 2023
Trying to address this comment: #106666 (comment)

cc albanD kulinseth 

[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/mps Run MPS tests (subset of trunk) ciflow/trunk Trigger trunk jobs on your pull request Merged open source topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants