pytorch
f92b3e14 - [MPS][BE] `std::is_same::value` -> `std::is_same_v` (#100975)

Commit
1 year ago
[MPS][BE] `std::is_same::value` -> `std::is_same_v` (#100975) PyTorch is C++17 project, so let's use some C++17 features. I.e. `s/std::is_same<X, Y>::value/std::is_same_v<X, Y>` And use `if constexpr` in few places when this construct is used. <!-- copilot:poem --> ### <samp>🤖 Generated by Copilot at 7b7683f</samp> > _We're sailing on the sea of code, we're making it more neat_ > _We're using `is_same_v` and `if constexpr` to keep it sweet_ > _We're refactoring the range tensor logic, we're avoiding duplication_ > _We're heaving on the ropes of `Distributions.mm`, on the count of three, with elation_ Pull Request resolved: https://github.com/pytorch/pytorch/pull/100975 Approved by: https://github.com/jeanschmidt, https://github.com/albanD, https://github.com/kulinseth, https://github.com/Skylion007
Author
Committer
Parents
Loading