Solved by albanD in post #2 
              
              
                Hi, 
It actually sets a global flag that is checked by the backend whenever an op is done on a variable. 
The guard itself saved the current status and set it to false in the constructor. And restore the saved status in it’s destructor. That way it is similar to a with torch.no_grad(): block in pyth…