Solved by tom in post #2 
              
              
                This is when the JIT does its optimizations. 
Typically, the first pass is an unoptimized profiling pass where the JIT collects tensor shape and layout information (and profiling means that, not something with timing). Then before the second pass, the JIT specializes the graph for the observed shape…