[composite compliance] frobenius norm#78515
[composite compliance] frobenius norm#78515kshitij12345 wants to merge 8 commits intopytorch:masterfrom
Conversation
…composite-compliance/fro_norm
🔗 Helpful links
✅ No Failures (0 Pending)As of commit 04b1541 (more details on the Dr. CI page): Expand to see more💚 💚 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. |
lezcano
left a comment
There was a problem hiding this comment.
Why is frobenius_norm_impl necessary? Why not implement the logic directly in frobenius_norm? That would fix the current inconsistency of doing a cast to the real numbers in the non-out version, but not doing it in the out version. Now, I don't even know why this cast is necessary in the first place, but that's a story for another day.
|
This is not about the cast but creating an Previously,
Feels like this PR needs more comments 😅 |
|
I think the comment above still applies.
|
|
@lezcano, what is your proposal here? Is it to rewrite the code like the following? |
|
Yup! This is the pattern we use in many other composite operations. |
|
Requiring the cast was by-product of having implemented |
|
@pytorchbot merge |
|
@pytorchbot successfully started a merge job. Check the current status here |
|
@kshitij12345 your PR has been successfully merged. |
|
Hey @kshitij12345. |
Summary: Ref: #69991 Pull Request resolved: #78515 Approved by: https://github.com/zou3519, https://github.com/Lezcano Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/018d071a4824ff1fa6d62a2b15c9cdfd01f626f7 Reviewed By: atalman Differential Revision: D37333183 Pulled By: atalman fbshipit-source-id: 5a55708172a300c84ee0b7c7b31e2a0c6b94ff4a
Ref: pytorch#69991 Pull Request resolved: pytorch#78515 Approved by: https://github.com/zou3519, https://github.com/Lezcano
Ref: pytorch#69991 Pull Request resolved: pytorch#78515 Approved by: https://github.com/zou3519, https://github.com/Lezcano
Ref: #69991