mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 13:44:15 +08:00
Add mutated_args field to custom_op (#123129)
If provided, we: - autogenerate an ADInplaceOrView implementation - assume that no mutated inputs are returned as outputs. There are already aliasing runtime checks that check this. Test Plan: - new tests Pull Request resolved: https://github.com/pytorch/pytorch/pull/123129 Approved by: https://github.com/albanD ghstack dependencies: #123108, #123109, #123110
This commit is contained in:
@ -730,6 +730,8 @@ void initDispatchBindings(PyObject* module) {
|
||||
|
||||
py_context_manager_DEPRECATED<at::AutoDispatchBelowAutograd>(
|
||||
m, "_AutoDispatchBelowAutograd");
|
||||
py_context_manager<at::AutoDispatchBelowADInplaceOrView>(
|
||||
m, "_AutoDispatchBelowADInplaceOrView");
|
||||
|
||||
// Prints out the name of every operator that has a kernel registered to the
|
||||
// Dispatcher under [dispatch_key]. If no arguments are specified, it'll print
|
||||
|
Reference in New Issue
Block a user