Does matlab use the AVX instruction set? If so what version?

71 ビュー (過去 30 日間)
Anthony Barone
Anthony Barone 2017 年 3 月 20 日
コメント済み: Christine Tobler 2018 年 4 月 26 日
Advanced Vector Instructions, or AVX, allows multiple floating point and integer operaions to be performed simultaneously, and is useful in vectorizing code (as I understand it anyhow, which admittedly my understanding of AVX is not very good). As such, it seems like the type of thing that would benefit Matlab, but I cant seem to find any info about whether or not Matlab actually does use it, or which version.
There seem to be 3 versions of AVX. AVX and AVX2 seem to be supported on most modern intel and AMD CPU's. AVX3 Appears to only be on some of the higher-end Intel server CPUs for the moment, but might be coming to mainstream CPU's when cannonlake CPU's that are due to be released later this year. AVX3 allows twice as many simultaneous calculations as AVX2.
It seems like AVX would be useful to Matlab, but I can't seem to find any info regarding if Matlab actually uses it. Does anyone know if matlab uses the AVX instruction set, and if so what version?

採用された回答

Jyotish Robin
Jyotish Robin 2017 年 3 月 24 日
Hi Anthony!
The AVX support in MATLAB is limited to Linear Algebra functions and 'FFT' functions. The Linear Algebra support started in R2011b, and 'FFT' support started in R2012b. In some cases, the AVX support improved incrementally, so with newer MATLAB versions, you may see improved performance gain.
MATLAB takes advantage of the AVX2 instruction set through the MKL library only, meaning the usage is limited to linear algebra operations.
For example, element-wise operations such as +, .* would not use AVX2. But matrix multiply *, or backslash / would use AVX2.
Hope it helps!
  2 件のコメント
Christine Tobler
Christine Tobler 2018 年 4 月 26 日
The Intel MKL has been adding support for AVX-512 instructions ( release notes ). As MATLAB updates to newer versions, more linear algebra operations will start using AVX-512 instructions.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by