Implementing a low level function


I would like to work on this issue:

It is a simple function, but I think it needs to be implement at a very low level, since none of the primitives in the current API can address the issue.

Looking at the implementation of the where and relu functions should be helpful. But I can’t quite located their low-level implementations in the repo. It would be great if someone could point them out to me.

Any other pointers are also much appreciated.

Maybe start creating it as a pytorch extension?

It doesn’t need to be written inside core pytorch in the first go, I guess.

Can you point me to the implementation of where and relu functions?