worked for me on 1.8 build:
torch.ops.myops.SpikeFunction(torch.ones(1).requires_grad_(), torch.ones(1).requires_grad_())
Out[10]: tensor(cpu,(1,)[1.], grad_fn=<CppNode>)
Note that at least one of tensors must have requires_grad, otherwise backward pass is omitted and grad_fn is not set.