In my case, I tested the pretrained ResNet34 with both PyTorch and libtorch, I use 400 images, the the preprocess is the same.
On my MAC:
PyTorch used 34s, CPU usage > 90%;
libtorch used 73s, CPU usage < 40%.
Why did this happen?.
The libtorch is download from the official website