-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MIPS64 MADPS instruction illegal instruction #2621
Comments
Unfortunately there has not been any significant work on the Loongson kernels in recent years, and I am not really familiar with the architecture. |
I use the latest develop branch cloned from git. It's really possible that my input is not very good, because my colleague compiled openblas on the same machine and used it on other project but didn't get my problem. I want to ask whether the code for loongson will be well mantained in the future?
发自我的小米手机
在 Martin Kroeker <notifications@github.com>,2020年5月19日 下午10:44写道:
Unfortunately there has not been any significant work on the Loongson kernels in recent years, and I am not really familiar with the architecture.
From what I could find, apparently an illegal instruction error can be raised when the madd instruction ("MADPS" is expanded to "madd.ps" in common_mips64.h) is called with arguments that are denormalized or NaN, so perhaps it depends on what input values you have in your matrix. (But it could also be a problem in the code. Which version of OpenBLAS did you build ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#2621 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APURSFGE736QVY4LDSY7WW3RSKLMVANCNFSM4NFA5I6A>.
|
I certainly hope so, as Loongson Ltd. has already expressed their intention to help with development in #2368 - unfortunately the ongoing health crisis has delayed everything. |
Thank you very much for your reply. I get in touch with the software engineer worked for loongson. |
It would probably help to know the register contents for the failing instruction, or to have a minimal testcase that reproduces the fault. You could also try to revert the changes from cb02147 (param.h and KERNEL.LOONGSON3A) to go back to the earlier 4x4 SGEMM kernel. (Or compile for TARGET=GENERIC to get a less performant OpenBLAS without all the hand-coded assembler routines) |
I test the easier way: compile on
and it works! Thank you martin~ I also test another way based on the advice from loongson engineer:
code can be ran using this way,but the result is totally wrong. So I decide to use the first way temporarily. |
If you take the advice of the Loongson engineer, you also need to make the other changes related to the commit I linked to (change param.h and change also the sgemm ncopy/tcopy entries in KERNEL.LOONGSON3A) |
@yaoguangchao. Thank you for your feedback. Could you show me more details about your problems like toolchain, compile command? |
Hi All,
Today, I tried to compile openblas on linux system with loongson3a cpu. The compilation didn't get any problem, but when i ran cblas_sgemm, I got an illegal instruction failure. After then, I recompiled openblas with DEBUG=1, and got more detailed core information like below:
I checked the file in kernel/mips64/sgemm_kernel_8x4_ps.S, and found that it does use MADPS instruction! But why did I get an illegal instruction failure?
Could anyone give me a correct compile options?
Thanks a lot.
The text was updated successfully, but these errors were encountered: