Have your problem been solved? I am implementing a custom operator according to https://pytorch.org/docs/master/notes/extending.html 23, and also get zero analytical gradients. I am wondering whether it is the problem of the inputs or the problem of my implementation of the backward function.