@martinjankowiak thanks for your answer. If I understand correctly, the difference is due to the backend framework.
Is there a case in which it is possible to speed up pytorch? From your answer, it should be the case that in big models/big tensors regimes pytorch can be a reasonable choice.
(For context, in my actual application I will deal with the latter case)