bdusell / semiring-einsum

Generic PyTorch implementation of einsum that supports different semirings
https://bdusell.github.io/semiring-einsum/
MIT License
43 stars 8 forks source link

Broadcasting #10

Open davidweichiang opened 2 years ago

davidweichiang commented 2 years ago

torch.einsum now supports broadcasting: https://github.com/pytorch/pytorch/issues/48420

bdusell commented 2 years ago

Yes, this would be a good feature to add, and I don't think it would be too tough to implement.

davidweichiang commented 2 years ago

Maybe just call torch.expand on the arguments beforehand?

davidweichiang commented 2 years ago

Or is it possible that it just works already, but the dimension checks are too strict?