Crippled No Longer: Now Matlab Runs At Full Speed On AMD CPUs

Matlab no longer has any issues running on AMD CPUs. The popular computing platform is quite an important and popular tool among members of the scientific community. It allows them to manipulate matrices and plot functions among other things.

No Frustration For AMD CPU Users

MathWorks, the company that developed this software, recently released an update that would make life easier for those using it on systems that have AMD CPUs. The Matlab R2020a release, as its called, significantly boosts performance on AMD’s Ryzen and Threadripper CPUs.

AMD

Also Read:

See How Whisper Left Personal Data Of People Exposed Over The Years

Netflix: The App Brings In A New Update By Allowing You To Turn Off The Autoplay For Previews

A Previous Workaround

Previously, users who had computers with AMD CPUs had to implement workarounds to get it running properly. Reddit user u/nedflanders1976 first posted this workaround on the r/matlab subreddit. He explained in his post why AMD CPUs saw an inferior performance as compared to their Intel counterparts in Matlab.

“Matlab runs notoriously slow on AMD CPUs for operations that use the Intel Math Kernel Library (MKL). This is because the Intel MKL uses a discriminative CPU Dispatcher that does not use efficient codepath according to SIMD support by the CPU, but based on the result of a vendor string query,” it reads.

The user then goes on to explain how to work around this issue in the same post. Offering two different solutions, this Reddit user then goes through a detailed, step-by-step guide instructing others what they can do to sort this issue out.

AMD

The first method is a temporary fix that doesn’t require Windows admin rights. It reads as follows: “Create a .bat file with the following lines to start Matlab in AVX2 Mode

@echo off
set MKL_DEBUG_CPU_TYPE=5
matlab.exe

This is straight forward. You open Notepad, copy and paste the above three lines and save the file as Matlab-AVX2. Notepad will save the file as Matlab-AVX2.txt. Now replace the extension “.txt” with “.bat”.

If you double-click that file, Matlab will start the MKL in AVX2 Mode. If you start it the normal way, it will remain as always.”

The second method this user proposed allows others to make this change permanent. It involves making changes to the Windows Registry, requiring admin right. Take a look at u/nedflanders1976’s entire post to read the whole guide.

Workaround Now Supported Officially

In another post, u/nedflanders1976 informed people that MathWorks has applied this same workaround officially in the newest update. Those who either used this workaround or are running the latest version of Matlab should see anywhere from a 20% to 300% increase in performance as compared to their previous numbers.

AMD