pytorch / functorch

functorch is JAX-like composable function transforms for PyTorch.
https://pytorch.org/functorch/
BSD 3-Clause "New" or "Revised" License
1.38k stars 102 forks source link

Change vmap to work around "vmap-incompatible in-place errors" #1025

Open zou3519 opened 1 year ago

zou3519 commented 1 year ago

e.g. https://pytorch.org/functorch/stable/ux_limitations.html#mutation-in-place-pytorch-operations

There are a couple of options here: