Does matlab use the AVX instruction set? If so what version?
72 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
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
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!