Get the daily emailDaily email
  1. Home
  2. Guides
  3. This story

PyTorch benchmark: a 13.8x bfloat16 gap between Intel Xe3 and Apple M2

A developer ran the same PyTorch benchmark on a MacBook Air M2 (MPS backend) and a Lenovo laptop with an Intel Core Ultra 7 355 and Xe3 GPU (XPU backend). A bf16 matmul hit 17.3 TFLOPS on Xe3 but only 1.25 TFLOPS on M2, because the M2 GPU has no native bf16…

Published Read the original

Why it matters

Before switching code to bf16, check that your hardware actually accelerates it, or it can run slower than fp32.

What happened

1 min read

A developer ran the same PyTorch benchmark on a MacBook Air M2 (MPS backend) and a Lenovo laptop with an Intel Core Ultra 7 355 and Xe3 GPU (XPU backend). A bf16 matmul hit 17.3 TFLOPS on Xe3 but only 1.25 TFLOPS on M2, because the M2 GPU has no native bf16 matrix path and MPS converts to fp32. With fp16 the gap shrinks to 6x and with fp32 to 1.1x.

inscraper analysis

Our analysis

The finding is not new but it is useful: the lack of a bf16 matrix engine on Apple Silicon before M5 is known, and this post puts concrete numbers on it. It is one script on two machines, and the Mac still wins attention and the training step, so it is not a general platform comparison. For anyone running or fine-tuning models on a laptop, the practical takeaway is simple: on M1/M2 use fp16, not bf16.

More in Guides