pytorch
2405c59c - [BE] Use `value_or` (#103065)

Commit
1 year ago
[BE] Use `value_or` (#103065) `s/!k.has_value || *k == foo/k.value_or(foo) == foo/` Which yields the same code see https://godbolt.org/z/6b35zYcYc <!-- copilot:summary --> ### <samp>🤖 Generated by Copilot at 003c703</samp> Simplify the logic for registering and looking up backend fallbacks in `library.cpp` by using a constant and an optional helper. Pull Request resolved: https://github.com/pytorch/pytorch/pull/103065 Approved by: https://github.com/albanD, https://github.com/Skylion007
Author
Committer
Parents
Loading