Note that the different paths are triggered, if the target requires gradients, not the model output.
Most likely the backward pass for the output and target are not yet implemented in the dispatched torch._C path, so that the loss will be calculated using the Python frontend.