Solved by albanD in post #2 
              
              
                Hi, 
What I usually do when I need this is to trigger it directly from inside the backward function with     import pdb; pdb.set_trace(): 
import torch
from torch import autograd

class F(autograd.Function):
  @staticmethod
  def forward(ctx, foo):
    return foo.clone()

  @staticmethod
  def backw…