vmap support for torch.index_fill #91177
Labels
good first issue
module: functorch
Pertaining to torch.func or pytorch/functorch
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Tasks
Add vmap support for the following PyTorch operations. That is, each one needs a batching rule.
Expected behavior
Currently, when one does vmap over them, they raise a warning suggesting the batching rule is not implemented:
We expect to not see a warning
Read this!
See this note for more context https://github.com/pytorch/pytorch/blob/master/functorch/writing_batching_rules.md
If you're new to developing PyTorch and/or function transforms, we would recommend reading through https://github.com/pytorch/pytorch/wiki/Core-Frontend-Onboarding#unit-8-function-transforms-optional
Should likely be similar to something in https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/functorch/BatchRulesScatterOps.cpp
Testing
pytest test/functorch/test_vmap.py -v -k "op_has_batch_rule and index_fill"
should pass (currently, it is an expected failure).cc @Chillee @samdow @soumith
The text was updated successfully, but these errors were encountered: