pytorch
70d0aab7 - De-prioritise Dimname and DimnameList in python overload resolution (#51350)

Commit
3 years ago
De-prioritise Dimname and DimnameList in python overload resolution (#51350) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/51350 `None` being a valid `Dimname` is awkward for optional `dim` arguments, as found on NumPy's reduction functions like `std` and `var`. In these cases `dim=None` should mean an all-reduction, but instead you get an error "Please look up dimensions by name". I've also had to fix `FunctionParameter::check` to actually check the first element of `INT_LIST` arguments and reject non-int types. Otherwise, the dim names end up calling the `int[]` overload and fail. Test Plan: Imported from OSS Reviewed By: ngimel Differential Revision: D26756208 Pulled By: mruberry fbshipit-source-id: 44221ca0f4822ec2c1f62b092466fd4f779eb45a
Author
Parents
Loading