Effacer les filtres
Effacer les filtres

Different Numerical results between Intel and AMD

139 vues (au cours des 30 derniers jours)
Huiyu
Huiyu le 1 Août 2024 à 5:36
Modifié(e) : Walter Roberson le 13 Août 2024 à 21:20
I am using R2023b on an Intel (desktop) machine and comparing results with the AMD machine (Threadripper using the zen architecture). I noticed tht the Intel machine uses AVX2, while the MKL libraries for the AMD machine uses AVX auto when I check which version is being used.
There have been differences in numerical results between the Intel and AMD machine, which builds up over time and these results don't converge. Using the AOCL libraries on AMD give me worse results, hence I am wondering what are some possible sources of these numerical differences and whether it is possible to force the AMD MKL libraries version to be on AVX2 so we can determine if this affects the results.

Réponses (1)

Tejas
Tejas le 13 Août 2024 à 9:02
Hello Huiyu,
My understanding from the above question is, that you want to know why there is difference in numerical values when using AVX and AVX2, and whether it is possible to configure the MKL libraries to utilize AVX2.
The variation in numerical values arises from the distinct ways AVX and AVX2 interpret and process floating-point numbers. For a more comprehensive explanation, refer to the links provided below.
To configure the MKL libraries to use AVX2, follow these steps:
  • Open Notepad and paste the following code:
@echo off
set MKL_DEBUG_CPU_TYPE=5
matlab.exe
  • Save this file. It will be saved as a .TXT file. Change the extension to .BAT.
  • Double-clicking this file will start MATLAB with MKL in AVX2 mode on an AMD machine.
The above solution creates an instance of MATLAB with MKL in AVX2 mode. Starting MATLAB without this method will start MATLAB with default settings.
To always start MATLAB with MKL in AVX2 mode, make a new variable in System Environment Variables with the name ‘MKL_DEBUG_CPU_TYPE’ and set its value as 5. For more details, refer the MATLAB answer provided below:

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Tags

Produits


Version

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by