Solved by albanD in post #4 
              
              
                The cpp engine is based on Function which are similar to the python ones. They are the elementary operations that are considered. 
The forward pass attaches a grad_fn to the Tensors during the forward pass. Then you have a graph of Functions stored in cpp. Accessed from the next_functions field. 
Wh…