Skip to content

ROCm versus Metal Performance Tests

After installing Ubuntu 20.04.03 with ROCm 5.2.0 on my experimental stand with Mac OS Monterey 12.4 Metal API and Windows 11 with Adrenalin AMD GPU drivers I decided to do some performance Machine Learning tests and compare the same hardware versus different software platform.

Geekbench5 Results:

StandMetal/VulcanOutputOpenGLOpenGL Output
Monterey163223 Metaloutput96870output
Ubuntu58474 Vulcanoutput121388output
Windows 1167802 Vulcanoutput149357output
Ubuntu 690076636 Vulcanoutput149107output

Built on this hardware:

  • Intel Core i9-10850K
  • 64.00 GB DDR4 3200 MT/s
  • AMD Radeon PRO W6800
  • MSI 6900 XT

OpenGL graphics performance is incredibly fast on Windows 11. The next winner is Monterey OS and finally we have outsider Ubuntu with latest AMD drivers. For tests was installed only latest software available on current day.

Here is the list of 4 ML general purpose training tasks with the same frameworks:

  1. MLP Classifier: A 3 layer multilayer perceptron with ReLU activations, 2500 units in the intermediate layers and 10 output classes, trained on synthetic data. source
  2. ResNet50 CIFAR10: The standard ResNet50 computer vision model on the CIFAR10 dataset. source
  3. BERT IMDb: Implementation of the BERT natural language processing model from the Huggingface Transformers library trained on the IMDb dataset. source
  4. BERT Glue/Mrpc: Again BERT, but with the Glue/Mrpc dataset. source

For all tests the fastest performance per epoch was used for comparision. In Windows there is no Metal API or ROCm support, therefore no tests for Machine Learning are possible for now.

ML Results:

TestMetalMetal OutputROCmROCm OutputROCm 6900
MLP23soutput33soutput27s
ResNet5014soutput17soutput12s
Bert87soutput58soutput44s
Bert-Mrpc90soutput63soutput49s

Here we see that ROCm works signinicantly better than Metal for transformer-like models, whereas Metal outperfoms on CNN and ReLU models.

We do not have a clear winner between them, depending on your tasks you can switch to one or another.

Last updated:

Deep Learning · Algorithms · Engineering