pytorch/test/forward_backward_compatibility
Tobias Ringwald 4f1a56cd42 Switched from parameter in can_cast to from_. (#126030)
Fixes #126012.

`from` is a reserved keyword in Python, thus we can't make the C++ impl available with `from` as function parameter. This PR changes the name to `from_` and also adjusts the docs.

If we want to preserve backwards compatibility, we can leave the C++ name as-is and only fix the docs. However, `torch.can_cast(from_=torch.int, to=torch.int)` won't work then.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/126030
Approved by: https://github.com/albanD
2024-05-16 20:58:24 +00:00
..
check_forward_backward_compatibility.py Switched from parameter in can_cast to from_. (#126030) 2024-05-16 20:58:24 +00:00
dump_all_function_schemas.py UFMT formatting on test/distributions, test/error_messages, test/forward_backward_compatability (#123527) 2024-04-09 16:03:46 +00:00