Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/195601
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 081c23e with merge base e0942cc ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Attention! native_functions.yaml was changedIf you are adding a new function or defaulted argument to native_functions.yaml, you cannot use it from pre-existing Python frontend code until our FC window passes (two weeks). Split your PR into two PRs, one which adds the new C++ functionality, and one that makes use of it from Python, and land them two weeks apart. See https://github.com/pytorch/pytorch/wiki/PyTorch's-Python-Frontend-Backward-and-Forward-Compatibility-Policy#forwards-compatibility-fc for more info. |
| inline T operator()(const T grad_output, const T output) { | ||
| return c10::metal::mul( | ||
| grad_output, | ||
| c10::metal::conj(T(1, 0) - c10::metal::mul(output, output))); |
There was a problem hiding this comment.
Is mul output better than output square?
There was a problem hiding this comment.
if output is complex, you'll need to mul, don't you?
Last MPSGraph backward ops in this stub family (sigmoid_backward was already native). logit_backward carries its eps scalar via the binary-alpha path; tanh_backward gains complex support for free. Co-Authored-By: Claude Opus 4.8 <[email protected]> ghstack-source-id: ff4f88a Pull-Request: #195601
|
@pytorchbot merge -f "Lint + MPS are green" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Last MPSGraph backward ops in this stub family (sigmoid_backward was already native). logit_backward carries its eps scalar via the binary-alpha path; tanh_backward gains complex support for free. Co-Authored-By: Claude Opus 4.8 <[email protected]> Pull Request resolved: pytorch#195601 Approved by: https://github.com/Skylion007
Stack from ghstack (oldest at bottom):
Last MPSGraph backward ops in this stub family (sigmoid_backward was already
native). logit_backward carries its eps scalar via the binary-alpha path;
tanh_backward gains complex support for free.
Co-Authored-By: Claude Opus 4.8 [email protected]