subclass_zoo
subclass_zoo copied to clipboard
In a quantization scenario where fake quantization is utilized to assess the accuracy of a new algorithm with trainable scale, we can implement it for an eager model by replacing...
This is an example of implementing basic fp8 support with a Python tensor subclass. tl;dr; 1. FP8Tensor is the Python object which contains raw fp8 data (as torch.bits8), a scale,...
If I want to enable our new device like "NPU" based on PyTorch, do I still need register a dispatch key(just like https://github.com/pytorch/pytorch/pull/75863 does) when using __torch_dispatch__?
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),...
under discussion at https://discuss.pytorch.org/t/training-with-custom-quantized-datatype/152132
Exploring some possible UX for using decompositions with subclassing cc @ezyang @albanD
Adds a fake tensor, which augments meta tensors with a device, and does device propagation on operators. Miscellaneous notes: - I still need to add `FakeMode` which will cover constructors....
There's a bug in simple functorch's custom_vjp. In particular, we would like to learn what it would take to get simple functorch's custom_vjp to work like JAX's custom_vjp w.r.t. to...
c.f. https://github.com/pytorch/functorch/pull/738 After disabling tolist from tensor subclasses printing just doesn't work at all by default https://github.com/pytorch/pytorch/pull/66082 This needs to be fixed
I have a question, which might be very simple, but I have no idea how to fix it. I am trying to subclass a torch.Tensor, and want to retain the...