Show HN: Efficient `Torch.cdist` Using Triton
https://github.com/jinensetpal/triton_cdist
For my research, I needed to use `torch.cdist` https://docs.pytorch.org/docs/stable/generated/torch.cdist.h... with p != 2.Turns out torch's implementation for cdist with p != 2 is prohibitively slow. I came up with an alternative implementation using triton https://triton-lang.org/, which supports backprop and so can be used for training too.Should be pretty plug-and-play, if you're using...