subclass_zoo
subclass_zoo copied to clipboard
simple functorch with modes
This adds a rewrite of the simple functorch notebook to use torch dispatch modes. In doing this, we needed to add padding to vmap (i.e. we need to make vmap(f)(torch.randn(2), torch.randn(2, 4))
work)
Still TODO:
- [ ] fix bugs identified in #31
It raised a couple bugs in torch dispatch modes
- [ ] fix bug to set ancestors if inner is explicitly given
- [ ] fix bug to make
enable_torch_dispatch_mode(None, replace=True)
work