Solved by mcarilli in post #4 
              
              
                If the forward pass of your op consists only of the custom kernel itself, that’s fine. Autocast doesn’t know about your kernel (unless you register it like in the dispatch tutorial) and won’t touch the inputs. 
If your op consists of your custom kernel + a few torch.* ops, and you don’t locally aut…