How to write custom functions which doesn't need backward?

I am trying to implement a custom function which doesn’t need backward propagation. However, in the tutorial here, I only find the example with both forward and backward functions.

So how can I implement my function? Should I write a blank backward function or just not bind backward function with PYBIND11_MODULE?

You can just skip the backward & autograd.Function part.

Best regards

Thomas