Anyone have any thoughts on this? Recent exchanges with others running Intel cpus suggest there is a large performance difference between systems under certain circumstances.
What, if anything, can be done to optimize performance for modern AMD CPU's?
141 次查看(过去 30 天)
显示 更早的评论
Wick
2018-4-20
I have a AMD Threadripper CPU. I've seen suggestions that AMD-based computers will benefit from changing the math library from Intel's MKL to the AMD Core Math Library (ACML) along with recommendations to change the BLAS.SPEC file. Any threads relating to this seem quite old and it appears that AMD might have changed the name of its math library.
Is it still possible to optimize the math library for AMD's CPUs? If so, what do I need to do?
Thanks!
27 个评论
MikeCC
2018-10-4
Just wondering if you have any updates? My new 2950x threadripper build is way below expectation...I'm talking about 50% more in terms of running time comparing with the i7 6700HQ laptop pc I got.
Wick
2018-10-4
Unfortunately, I've found nothing that helps.
Hopefully Mathworks recognizes the improvements AMD has made to their processors and their disruption in the small workstation market and releases a tool to switch math libraries. But as of yet, I haven't heard anything.
Philip Borghesani
2018-10-4
I suggest that people who care about this put in an enhancement request with support. This is your typical chicken and egg or squeaky wheel issue. Until there are (large? noisy? pre-sales?) customers who want this, and we know about it, improvement will be a low priority.
For many customers with typical smaller problems less fast cores with MATLAB will beat more slower cores, this does still favor Intel.
Wick
2019-5-24
@Philip Borghesani, I'm checking in on this thread after a while. AMD's hardware seems to be selling well. PErhaps now is the time to revisit this. How exactly does one submit an enhancement request? The link I found was a blog post from 2008 that doesn't match today's website.
Star Strider
2019-5-24
编辑:Walter Roberson
2019-5-24
Submit an enhancement request by using the Contact Us link (the telephone handset icon) in the upper right corner of this page.
I’m definitely hoping for this, since my primary MATLAB machine has a Ryzen 7 1800X.
Wick
2019-5-24
I submitted this as a request and got the response "As of right now, AMD's support page does not appear to have a link to download the AMD Math Library for users on Windows machines.
I will make sure to convey your suggestion to the development team and they may consider it for a future release of MATLAB."
So it appears not much will happen. I'll see if I can't consince someone at AMD to reach out to Mathworks to make this happen. The Zen family seems like it was made for MATLAB.
Star Strider
2019-5-24
Never say ‘never’!
I’m ‘following’ this post, so I’m eager to see any developments.
Ned Flanders
2019-6-6
编辑:Ned Flanders
2019-6-6
The problem does not arise from the AMD CPU but from the Intel MKL library which uses a 'discriminating CPU dispatcher' which does not only discriminate CPUs by their SIMD extensions (e.g. AVX2) but also (and that sucks) by their vendor string. Every CPU that does not report back 'Genuine Intel' will make the dispatcher to use the slowest option excluding for example the use of AVX2 although the CPU supports it.
Thats Intels scummy way to boost their CPU sales.
The only option you have is to use other math libraries than the MKL.
AMD offerst the LibM which includes 128bit and 256bit vector extensions and has recently been updated to version 3.3.0
IMHO Matlab developers should spend some efforts on this given that we are all (well paying) customers and not only people with an Intel CPU.
Wick
2019-6-6
编辑:Wick
2019-6-6
@Sven, that matches my understanding of the issue as well. However, incorporating those libraries requires Mathworks' involvement and isn't just something an end-user can change, right? I can't imagine that Mathworks is interested in leaving performance on the table if it's just a matter of including an alternate math library during compile time. On C code my AMD cpu is about 80% the performance of my Intel CPU on a per-thread basis. On MATLAB it's closer to 50%. Jumping from 50 to 80 would be a 60% performance gain across the board for all AMD users essentially for free. I'm quite surprised the support rep. that answered my ticket was so uninterested. I'll send that link back to them. Edit: it appears the math libraries linked are only for *nix operating systems. Not sure why they'd ignore Windows.
Ned Flanders
2019-6-6
编辑:Ned Flanders
2019-6-6
Maybe you want to address this on a more public social media channel like Twitter and ad some hashtags for visability. This is a widespread problem. Many of us use AMD Ryzen now as they are fantastic of most usecases.
In this case, to my understanding, it would be relatively simple to implement and at least offer an alternative Math Lib like OpenBLAS that includes the libM in Matlab.
Look at Octave... you can choose the Lib when installing it. So why would Matlab not be able to do the same in the interest of their paying customers.
It really should happen!
I am not sure whether it is possible to tweak Matlab to use other libs. I will look into this when I have some more time.
I also dont quite understand how your thread can have 59 views and only 3 vote ups. This should be in everys matlab users unterest to be able to freely chose your hardware.
Wick
2019-6-6
编辑:Wick
2019-6-6
I would be very interested if some Linux users out there could tell us if it's as simple as choosing the AMD libraries. The comment I got from Mathworks was that there aren't any Windows libraries there for download. If it's as simple as swapping BLAS libraries in *nix then perhaps the issue is we need to push AMD to build Windows libraries. Edit: And the post is more than a year old. So it's seen 60+ views in the last 30 days but more than that in total I'm sure.
Ned Flanders
2019-11-15
@Wick
In case you are still reading this. I came across this:
I have recently seen some people recommending using MKL on AMD, with the MKL_DEBUG_CPU_TYPE environment variable set to 5, as in:
export MKL_DEBUG_CPU_TYPE=5
This overrides the CPU dispatching in MKL, and forces the AVX2 codepath (the one MKL naturally uses on Intel parts without AVX512), otherwise MKL chooses an unoptimized SSE path with abysmal performance. But with the AVX2 path, MKL performs very well on Zen2, usually even outperforming BLIS and OpenBLAS!
Not sure whether this is possible in Matlab, but if so, you should definately try.
Star Strider
2019-11-15
@Ned Flanders — Please enlarge on this, ideally with relevant links that explain this in more detail. (I am not as knowledgable on this as others may be, and need to be brought up to speed.)
Ned Flanders
2019-11-15
编辑:Ned Flanders
2019-11-15
I wish I could elaborate on this, but I don't know much about these things either.
Just Google export MKL_DEBUG_CPU_TYPE=5
As many people seem to be using AMD Epyc now, this came up and seems to solve the problem with the MKL on AMD CPUs. What I can't tell is whether this is something you can do or whether this is something Mathworks could patch into Matlab. In anycase... it works. CPU Performance on AMD CPUs is restored that way.
See for example: https://www.phoronix.com/forums/forum/hardware/processors-memory/1126558-amd-epyc-7302-7402-7502-7742-linux-performance-benchmarks?p=1126644#post1126644
Or:
"Note that by default, PyTorch uses the Intel MKL, that gimps AMD processors. In order to prevent that, execute those lines before starting the benchmark:"
"export MKL_DEBUG_CPU_TYPE=5"
To my understanding (which is limited) one could include this in the startup script in Matlab itself, but someone will have to explain the details to us.
Wick
2019-11-15
That's a comment for a Python environment. That is, I believe, a change to the compiler used to execute the Python. Unfortunately, Matlab is already compiled. Also, that was a thread about Linux performance. The Mathworks person with whom I communicated pointed out there are optimized libraries available from AMD for the Zen and later architecture for *nix-based systems, but not for Windows. So unless AMD steps up and provides Windows-optimized math routines, I don't think Mathworks is going to include proper fat binaries.
Ned Flanders
2019-11-15
编辑:Ned Flanders
2019-11-15
I opened up a reddit thread on this. There are some suggestions.
Maybe you could try:
And no, I believe its only how the mkl is run not compiled. If you run it in this debug mode, it is forced to use AVX2
Here is how to set environment variables for the mkl in windows:
https://software.intel.com/en-us/mkl-windows-developer-guide-setting-environment-variables
We'll get this fixed gentlemen!
Wick
2019-11-17
Ned - you da man!
Post your solution as an answer and I'll accept it. Put the text from the batch file in your answer so people can roll their own (nobody likes to run random batch files). Also, you might want to take the spaces out of your script name. After I changed it, MATLAB was happier. Nice test script btw.
A couple notes on running this. The shell that executed matlab after the 'call' function remains using the debug cpu. So if you run it once from the batch file it's gone (since the command window disappears). However, if you run the batch file from a prompt, any future executions of Matlab will use the debug cpu. But matlab executed any other way will not. That made side-by-side testing easier.
Any documentation on the various debug cpu extension options? The new TR's have some AVX commands (not the full 512) so it would be nice if there were a debug cpu that supported those.
Thanks again!!!!
Ned Flanders
2019-11-17
Told you! Never give up! hehe
Thanks for the feedback, I reworked the post on reddit accordingly. No download needed anymore. Ideally, if you're happy, use system variables to make the fix permanent. --> see reddit.
So how much do you gain on the TR?
Unfortunately this Debug Mode is undocumented by Intel (for very good reasons i guess... these gangsters)
Wick
2019-11-17
My gains on TR were very much inline with yours percentage-wise. However, an FFT-heavy code didn't see any speed up. I suspect that one was bound by memory access. However, the matrix multiplication speedup is worth the hack alone! I'm hoping to upgrade to a new TR this season. The memory access should be superior.
Put up an answer so I can accept it. This is worth immortalizing!
Ned Flanders
2019-12-10
编辑:Ned Flanders
2019-12-10
@wick
Could you test on your TR whether disabled SMT is faster? Matlab starts one thread per Core (not available thread) on Intel and AMD CPUs and my quick test suggests that SMT off is somewhat faster. (another 5-10%)
Wick
2019-12-12
I've tested SMT off in TR before. It's generally a bit faster that way. However, for my code at least, I'm still faster to run two instances of MATLAB and load up all cores. It's certainly not double, but it's something like 1.5X depending on the amount of memory access.
Ned Flanders
2020-3-29
@wick
Apparently 2020a includes the Workaround but setting the workaround does not work on all systems reliably yet. Can you confirm it works on your build? You possibly need to remove the sys variable before you upgrade to 2020a.
Ned
Wick
2020-9-6
@Ned Flanders; I haven't kept my subscription up so I haven't updated for a while. Sorry.
采纳的回答
Ned Flanders
2019-11-18
编辑:Ned Flanders
2019-12-2
You should read it if you want to understand the background.
EDIT: Before you start I have a short request for you that you could help me with and serve your own interest. Matlab will not implement this. If you think that Matlab should offer a permanent solution that serves all users independent of whether they use Intel or AMD CPUs, please make a feature request at Matlab to implement a nummeric library (e.g. OpenBLAS) that does not discriminate against non Intel CPUs. Mathworks will not make this change without people advocating for it. Thanks!
tl;dr
Solution 1 (Windows): Create a .bat file using e.g. "Notepad" with the following lines to start Matlab in AVX2 Mode.
@echo off
set MKL_DEBUG_CPU_TYPE=5
matlab.exe
Save as .txt and rename to .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.
You can also download the .bat file from my highdrive if you trust me (which typically you should not as I am a random guy from the internet). If you delete the startup batch file provided in the download or the one you created yourself, its gone and your computer will be as it has been before.
Solution 2 (Windows): If you are happy with the results (which you surely will be :-)), you should make the setting permanent by entering MKL_DEBUG_CPU_TYPE=5 into the System Environment Variables. This has several advantages, one of them being that it applies to all instances of Matlab and not just the one opened using the .bat file.
Doing this will make the change permanent and available to ALL Programs using the MKL on your system until you delete the entry again.
![](https://preview.redd.it/bcofbtrhvfz31.png?width=981&format=png&auto=webp&s=d486bd5e8f102f33d5207e9a4c0b9767618e304d)
LINUX: (Thanks to foreignrobot)
Simply type in a terminal:
export MKL_DEBUG_CPU_TYPE=5
and then run matlab from the same terminal.
For benchmarking, you can use this script:
To make it permanent in Linux edit your shell's configuration scripts (~/.bashrc for bash, ~/.zshrc for zsh etc) adding the line export MKL_DEBUG_CPU_TYPE=5. That'll apply in any newly opened shell and to apply it in an already open one simply do . ~/.bashrc or whatever your config script name is. (Thanks to lowpolybutt)
P.S.: In case you are on an older AMD FX CPU, you could test whether MKL_DEBUG_CPU_TYPE=4 works for you. This should enable AVX, but I haven't tested this.
15 个评论
Wick
2019-11-18
I doubt this is the oldest accepted answer on here, but it's got to be in the highest possible percentile. I see no problem cutting/pasting the text from your reddit post here so it's a self-contained answer. The batch file was a very good intermediate step for back-to-back testing. May as well leave that in there (or just as a series of DOS commands, doesn't have to be a batch file).
Ned Flanders
2019-11-18
编辑:Ned Flanders
2019-12-4
Agreed, I copied the entire solution part.
Quite a remarkable story your thread here developed into!
Take good care everyone!
Ned
Ken M.
2019-11-19
Clear prove/sign to Mathwork that they have to do something about it unless they want to go through life known as being in intels pocket against AMD.
Wick
2019-11-20
FYI, neural network training appears to speed up by 50% on my 1st-gen TR.
I have submitted a follow-up to my original support enhancement request related to this topic. There's zero chance Mathworks is going to enable an undocumented debug option for Intel's MKL library. However, it appears the OpenBLAS library performs well for things like R and Julia. I've submitted a request that Mathworks include a simple option to switch math libraries. I would request that everyone following this thread submit a similar enhancement request and try to drum up support in other forums as well. Mathworks will not make this chance without people advocating for it.
Ned Flanders
2019-11-20
编辑:Ned Flanders
2019-12-4
I did that of course too. Everybody really should!
I also think they should and will have to implement OpenBLAS. I had a chance to have a short look at how the upcoming Threadripper 3k performs in several Benchmarks. Given the fact that Intel is basically losing competitiveness entirely, they will not be able to ignore giving support for the by far fastest CPUs available on the market.
My feeling is, that they haven't really been aware of the reason why AMD CPUs were underwhelming in Matlab. They recommend in system requirements that you should have an Intel or AMD CPU with AVX2 support. Yet, AVX2 has never been used on AMD CPUs because of the discriminating dispatcher in the MKL.
Given the attention this has drawn, they might get into action but as you say, please folks, submit a request in your very own interest.
I also added this to the post on Reddit.
Your 50% speedup.... is indeed quite impressive!
Pat Quillen
2019-12-3
At MathWorks, we are continuing to investigate this to determine if we can qualify a change to the full production release of MATLAB. Note that in the meantime we are unable to confirm that using these environment variables will work correctly throughout our products, so use at your own risk.
In addition to the approach suggested above, it is possible to substitute a different BLAS implementation for the BLAS qualified by MathWorks for use in MATLAB. This can be done by specifying the full path to the .so/.dll containing your BLAS implementation in an environment variable called BLAS_VERSION. This comes with the same caveats that MathWorks has not qualified our products against alternate BLAS implementations, so as above, we can't confirm that using your own BLAS, such as OpenBLAS, will work correctly throughout our products.
Wick
2019-12-3
@PatQuillen, thanks for your comment. As this thread is a year and a half old and this is a new solution, it's pretty apparent that the ability to switch BLAS libraries is not well known to the MATLAB community.
So what you're saying is that MATLAB checks for a variable BLAS_VERSION and will use it rather than the built-in MKL if it exists? And I set the variable the same way @NedFlanders describes how one sets the variables for Linux or Windows?
Will MATLAB fall back to MKL if a call is not supported by the replacement library or will it crash? That's the nice bit about the hack above. We know the MKL library supports everything because you've built MATLAB to use it.
I've seen suggestions that flame/BLIS is faster even than MKL on Intel's own hardware and faster than OpenBLAS everywhere. Perhaps some folks that know what they're doing can try that out and provide some pointers.
Pat Quillen
2019-12-3
@Wick, yes, this is not well-known. It is not documented, and we usually only tell folks about it when they call into customer support.
To help clarify, what I'm saying is that upon load of the BLAS, MATLAB checks for the existence of BLAS_VERSION and loads whatever library is pointed to by that variable in lieu of the default specified by MATLAB. MATLAB looks for symbols corresponding to those in the BLAS standard: netlib.org/blas and uses them as the BLAS. If you have a complete BLAS from your vendor, or if you've compiled one, you should have no problem.
MATLAB will not fall back to MKL if the function is not supported by the implementation. Instead, you might get a crash or an error. On the other hand, you can layer by specifying a whole bunch of library implementations in your BLAS_VERSION.
You can use the environment variable BLAS_VERBOSITY to see what MATLAB is trying to do. Set that to 1 to get a little info, set it to 2 to get a lot.
And yes, set environment variables as described above for either Windows or Linux.
Pat Quillen
2019-12-3
I should add that you need to execute something in MATLAB that will cause the BLAS to be loaded, like norm.
Wick
2019-12-4
@PatQuillen, thanks I figured that out. The BLAS_VERBOSITY is handy (no spaces allowed in the DOS command I learned). Is there a way to for the BLAS library to reload or do I have to restart MATLAB each time? If you want to stack paths, use a semicolon to separate them (again, in Windows).
I found out how to download a DLL for BLIS but it errors out immediately on "caxpy" (which is pretty basic). So I'm working on it. OpenBlas is next.
Pat Quillen
2019-12-4
@Wick, you have to restart MATLAB every time. There's (currently) no way to force unloading the BLAS.
Valid separators between libraries on the list are space, semicolon, or comma---that's platform independent.
Wick
2019-12-4
@PatQuillen thanks. That would explain why BLAS_VERSION cannot be set to something within the "Program Files" directory - the default location for MKL. It's breaking the parse at the space in the folder name. I had to copy the mkl.dll to another folder to try setting it as the fall-over library.
Yair Altman
2019-12-17
@Wick - try setting the Program Files path within quotation marks, as in "C:\Program Files\bla\bla\blas.dll";"C:\Program Files\bla2\bla2\blast.dll"
Aldo Corbellini
2020-4-4
@Wick - Where did you find BLIS and/or OpenBLAS .dll for win64? I would like to test these libraries on my new AMD TR. All I was able to find are some build recipes to Linux GCC compilers!
[Hi, Yair!]
更多回答(3 个)
Heiko Weichelt
2022-3-15
After intense collaboration between MathWorks and AMD, as of MATLAB R2022a, MATLAB ships a custom-built version of AOCL 3.1 that can be activated as described here:
Notice that AOCL versions from other sources might not be configured / built correctly and may cause MATLAB to error, crash, or return incorrect results.
2 个评论
Wick
2019-12-4
编辑:Wick
2019-12-4
The Accepted Answer by @NedFlanders is the best solution so far. Use that one.
But in the comments of that answer, MathWorks staff member @PatQuillen shared some useful undocumented environment variables that allow anyone to hook into any external BLAS library. This has the potential to be very useful for getting other BLAS packages such as OpenBLAS or BLIS working within MATLAB. Those comments are already buried in that thread so I'm pulling them out as a stand-alone solution. I'll repeat the warning from those comments: "This comes with the same caveats that MathWorks has not qualified our products against alternate BLAS implementations, so as above, we can't confirm that using your own BLAS, such as OpenBLAS, will work correctly throughout our products."
We're going to be setting environment variables for the host operating system. This can be done in a temporary or permanent way outside of MATLAB for both Linux and Windows as can be seen in @NedFlander's reddit thread. However, I'm only going to use the setenv command to set these for only one instance of MATLAB.
MATLAB loads the BLAS library the first time it tries to execute a computation so you can make changes before that point. Once the BLAS library is loaded, there's no way to unload it. You'll have to restart.
The environment variable BLAS_VERBOSITY will set MATLAB to detail information to the Command Window about the loading process. A value of 1 is minimal information, 2 is more.
setenv('BLAS_VERBOSITY','1')
The environment variable BLAS_VERSION, if defined, will direct MATLAB to load the BLAS library from the specified file(s) rather than use its built-in default. The files should be the .so/.dll for the BLAS implementation you plan to use that follows the symbols defined by https://netlib.org/blas/.
setenv('BLAS_VERSION','c:\temp\mkl.dll')
Would load a copy of the MKL library copied into c:\temp. You can use a semicolon, comma, or space to join multiple file locations into a single definition of BLAS_VERSION. So if you're writing your own BLAS that doesn't support all the possible methods you could roll over to MKL as a failsafe, e.g.
3 个评论
Rasoul Nikbakht
2020-10-14
Could you please elaborate on this comment?
I have an AMD CPU, Ryzen 2970wx, and It seems they have a very efficient implementation of the BLAS library, which they call it BLIS. I would like to change the Matlab default BLAS library (intel) to the AMD one. Currently, even with applying the trick export MKL_DEBUG_CPU_TYPE=5 Matlab on AMD CPU (using Ubuntu 18) is not as fast as it supposed to be.
I think any other library rather than Intel MKL should work fine for AMD CPUS.
Bernhard Wistawel
2021-2-24
Will 2021a correct this behaviour? Or let us choose the BLAS distribution?
Ken M.
2019-11-9
You are saying don't use windows for matlab.
Since that is the easy way around, people stop complaining about it after the switch.
Many programs just work faster with linux so if speed is important then linux is an obvious choice also for matlab.
9 个评论
Bruno Luong
2019-11-9
"Many programs just work faster with linux"
Any evident to back up this claim?
I did a benchmark might be 10 year back and they are comparable.
If you run BENCH on R2019B you'll see the fastest benchmark make by TMW is Windows 7 followed by Linux, though it is not the same HW.
Ken M.
2019-11-9
编辑:Ken M.
2019-11-9
Some compare test from Hardware Unboxed
If you don't mind the change, I wouldn't stay with windows. Overal I think it is a win for everyone. Maybe the main reason is that linux can handle more cores easier.
I also use an astronomy program pixinsight and it also works much faster on linux than windows.
Wick
2019-11-10
Changing to Linux is not necessarily a possibility in the work flows for many people. Since Windows users on desktops vastly outnumber Linux users, it would be nice if Mathworks could compile with good options for Ryzen/Threadripper/Epyc users.
However, if someone does have the ability to run both operating systems back-to-back, I'd be more than happy to see a comparison of the two addressing per-thread performance.
Mark Smith
2020-1-5
Many thanks to Ned Flanders and others that have commented here. I have had some correspondence with Mathworks and indicated to them that Matlab should have optimized binaries for AMD cpus. As a lark, I decided to use the bench command in Win 10 and Kubuntu in various configurations to demonstrate the efficacy of having optimized binaries for AMD cpus. I primarily use Win 10 and am a Linux novice. I was able to get Kubuntu 19.10 installed on a separate drive and ran a few bench commands. I have 5 screen shots showing how use of the environmental variable changes performance in both Win 10 and Kubuntu which I was prevented from uploading. I also downloaded the AMD AOCL precompiled Ubuntu binaries and AMD Math Library (LibM) Ubuntu binary and used those with the bench command.
My machine for these tests is a Threadripper 2950x running on Asrock X399 Pro Gaming motherboard with Gigabyte 1080 Ti. For all these tests, the bios was set to defaults with Precision Boost Overdrive not active (3.5 Ghz base clock). I normally run Win 10 with the 2950x at 4.4 Ghz with powerful custom cooling. All tests were run with 64 GB ram.
The simple summary is that Win 10 is not suited for Matlab with a score of ~55 on the bar chart (below the Surface Pro 3). This is improved to ~75 using the Win 10 environmental variable MKL_DEBUG_CPU_TYPE=5. If I perform bench overclocked to 4.4 Ghz with 32 GB ram, the score goes to ~85. Not much jump for possibly running this fine chip at too high a clock.
For Kubuntu with bios default settings, no overclocking and no setting of MKL_DEBUG_CPU_TYPE=5 prior to starting Matlab results in a score of ~65. Adding export MKL_DEBUG_CPU_TYPE=5 prior to starting Matlab results in a score of ~95, thats right ~95. Adding export commands to link the AMD Ubuntu binaries along with MKL_DEBUG_CPU_TYPE=5 results in a score of ~98. With these changes it is the second ranked machine below entry for Win 7 running on Xeon E5-1650 v3 at 3.5 Ghz.
My takeaway is that if Mathworks major market is tied to Win 10, better math binaries are needed. The simple setting of an environmental variable is not sufficient in Win 10. The great benefit obtained in Linux by just setting the environment variable needs to be explained. I would be interested in knowing what is different between Linux and Win 10 that allows the MKL_DEBUG_CPU_TYPE=5 environmental variable to have such a much better effect in Linux. At this point I infer that Microsoft is also in bed with Intel in hampering AMD performance or just ignorant of the effects of its software on math libraries.
I like Matlab, it is powerful and a major tool in the industry. It needs to be better optimized for different cpu configurations.
Tyler Moskov
2020-4-23
Could you go into more detail on adding export commands to link the AMD Ubuntu binaries or post a link on how to?
Thank you
Ken M.
2020-4-24
@Tyler as of 2020a the MKL_DEBUG_CPU_TYPE=5 workaround should not longer be needed for AMD CPU's
Tyler Moskov
2020-4-24
That's what I've heard, but I still have 2019b and want to see if there are any added benified of using AMD's AOCL.
Yavor Dobrev
2021-3-26
Can you please provide details on how you link the AMD Ubuntu binaries (AOCL). I have tried:
export BLAS_VERSION=/home/dobrev/amd/aocl/3.0-6/lib/libblis.so
However, when use bench I get:
cpu_id: x86 Family 143 Model 96 Stepping 1, AuthenticAMD
BLAS: trying environment...
BLAS: loading /home/dobrev/amd/aocl/3.0-6/lib/libblis.so
BLAS: loaded /home/dobrev/amd/aocl/3.0-6/lib/libblis.so@0x7fcbf7ab2220
BLAS: /home/dobrev/amd/aocl/3.0-6/lib/libblis.so is not a compatibility layer.
I also tried using openBLAS with the same result.
Heiko Weichelt
2022-3-15
As of MATLAB R2022a, MATLAB ships a version of AOCL 3.1 that AMD custom-build for MATLAB. It can be activated as described here:
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!发生错误
由于页面发生更改,无法完成操作。请重新加载页面以查看其更新后的状态。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
亚太
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)