-
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
Building for Windows on Arm wiki page will need updating once LLVM17 is out #3973
Comments
There was some link waterholing/spamming incidents, @martin-frbg can help |
Yes, please suggest additions and corrections here - we had to clamp down the wiki as having to create a throwaway github id was too weak a deterrent for spammers, and even with best effort there would always be a time window of at least a few hours in which any phishing or malware links edited into the wiki would stay up. |
@everton1984 Not sure how to proceed here without your input - we do not have a Windows-on-Arm system available for testing, and at least the Linaro tracker for "Arm LLVM Toolchain Enhancement" lists an open issue LLVM-760 as holding back OpenBLAS compilation with "flang-new". (This ticket has not been updated since last summer, but the download page at llvm.org has only sketchy flang release notes from 15.0.0 even with the recent release of LLVM16) |
@martin-frbg Yeah I thought I had something working but when I got the unit tests to compile one of them are failing so I had to hold on before sending the updated text. Sorry about this delay. I can close this and reopen when I get it solved if you want. |
I'd think it depends on how long you expect the delay to be - and if it is something we can help with (without having accesss to a Windows-on-Arm system). I notice the f_check script currently does not know |
I've been fighting against two issues, the first one is that the CMake command |
Eeek... not too keen to debug the lovely CMAKE system... is this something in OpenBLAS' own CMakelists.txt ? (Assumed to work on both Arm64 and Windows, just not tested on WoA...). Things hanging could mean problems with multithreading, unless the hangs also happen in single-threaded mode. |
hahaha same feelings here, I guess this is a weird combination of cmake + WoA + flang-new, still doing some tests to properly find the culprit. How can I run the tests in single-threaded mode? |
setting OPENBLAS_NUM_THREADS=1 in the environment should hopefully do. Or if in doubt, build everything with `-DUSE_THREAD=0' |
Btw, is your flang executable still called flang-new ? While the CMAKE build files do no rely on the f_check I mentioned above, they use whatever CMAKE thinks CMAKE_Fortran_COMPILER is, and cmake/fc.cmake adds some compiler options (only) if the capitalized name is STREQUAL "FLANG". (Not sure if this plays a role for your problem, would mostly affect handling of complex numbers) |
Yeah, they are still releasing it as flang-new for some reason I think it is going to be fused with normal flang just later this year. I noticed that as well but it does not seem to make a difference for this particular problem. Thanks for the tips. I will let you know if I make any progress, if I find this to be too complex I will close this issue and re-open it once everything is working and the wiki can be updated. Btw, I noticed that on the CI for Windows the |
IIRC that was just to keep jobs from exceeding their time limit. Maybe I'll try to activate it on Cirrus (once I get the windows_container build working there) |
flang(.exe) has messy history, it was different LLVM-based compiler, then wrapper around gfortran, now the flang-new rename would be 3rd compiler under same name. |
Generally curious about the state of flang(-new) in LLVM16 - is it considered stable on all major LLVM platforms ? I just noticed that at least the "Chocolatey" package for Windows x86_64 (as suggested for Cirrus CI jobs) does not appear to include it. (And as mentioned above, the LLVM download page has only a draft 15.0.0 release note for flang under the 16.0.0 heading, with an empty section entitled "Windows support") |
Afaik flang-new is not being distributed on x86 by default, only for Windows on Arm, at least for now but I believe the plan is to make flang-new the 'main' flang. It's hard to track flang state, it is always a moving target. |
@martin-frbg Even with threads disabled *blasN (N >= 2) is hanging. Can I create an Issue for this or at least have a way to contact somebody if I need a bit of help? |
Well, you certainly can - but it looks like you are the flang-on-WoA expert here, there's very scant documentation for this compiler and at least I would not know better than you how to debug or trace a program on that system. Perhaps make sure that a pure C build (NOFORTRAN=1 which pulls in f2c-converted LAPACK sources) works first, if you haven't done that already. Not sure if @mmuetzel can help with his recent experience with flang-new/LLVMFlang on x86_64 Windows (PR #4016) ? |
@martin-frbg Trying a pure C build fails for me with a bunch of errors similar to
is this known or something related to WoA? I am using tag v0.3.21 btw. |
Please update to 0.3.23 (or the current state of the develop branch) so that you do not have to rediscover all the bugs that were fixed since last summer. If you really really absolutely need to use the old version, apply PR #3765 to it. |
MSYS2 applies a couple of patches for their OpenBLAS binary packages: In particular this one might be relevant for you: (Not sure why it hasn't been upstreamed to here.) |
If you prefer a binary distribution over compiling everything yourself locally, you might be able to use the CLANGARM64 environment of MSYS2. It includes binaries of OpenBLAS for Windows on ARM: I don't have access to such a platform though. So, I don't know how well it is working... |
Interesting - I'd hazard a guess that it is not built with flang-whatever though ? |
You're guessing correctly. It's built using your f2c version of LAPACK with LLVM Clang. |
Yeah that's part of the point, I am trying to make native OpenBLAS compile with flang-new with LAPACK everything + testing. I can make it compile with some cmake options tweaks, it's just the tests that are giving me headache. |
Fwiw, it's building for me locally with MSYS2's version of LLVM Flang 16 on Windows x86 64-bit.
|
Thanks thats a good data point, I'm guessing my problem is the mix cmake + flang-new on WoA but I need to pinpoint the problem to open up the proper issue on the LLVM team. Although with LAPACK disabled its works fine here as well. |
Not sure why you point that out. But please notice that it does build LAPACK with LLVM Flang with the above configuration. I only added |
I pointed that out because I can't read :) I thought it was |
Looks like this is really a flang-new + cmake bug, gonna close this issue for now. I will get this sorted and reopen it when it is ready. Thanks for all the comments. |
@everton1984 any news on the status of LLVM17 and especially its flang-new on WoA ? |
Hi,
I wanted to update the wiki page How to build OpenBLAS for Windows on ARM64 because the instructions are deprecated but the edit button is gone. What is the proper way to get those instructions updated? There is a new flang version and you can now build LAPACK along with OpenBLAS on Windows on Arm and I wanted to mention that.
The text was updated successfully, but these errors were encountered: