richard:

(but the code goes through different code paths depending on the contiguity of inputs)


Can you point me to the relevant code in the pytorch source? Right now I am just worried about the forward pass, backward I will think about later, I need to speed up things in the MSELoss forward path. I put in a lot of contiguous statements in my model forward, but the MSELoss still takes 150ms in its forward pass