Matmul function

We create an approximate multiplier. So, we want to change matmul function into our multiplier. Can we modify the function?

You can’t without modifying the main PyTorch code, change the backend.
What you could do if you use the JIT is to create a custom optimization pass that would replace all calls to matmul with calls to your matmul function.

Best regards

Thomas

@tom
Thanks for your reply. but I don’t understand your meaning. (I am new to PyTorch, and I appreciate you can explain my questions.)
1.How to change backend
2.How to create a custom optimization pass use JIT

Simplify my question. I used PyTorch function matmul now

xx = torch.matmul(windows[channel], self.weights[i_convNumber][channel])

So far, I want to customize function(use our multiplier) and call this function but isn’t works and very complicated. I would like to know is there have another way or some advice to make it easier?