Skip to content
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

Get ARM64 TARGET information from the registry on Windows #5082

Merged
merged 1 commit into from
Jan 18, 2025

Conversation

martin-frbg
Copy link
Collaborator

No description provided.

@martin-frbg martin-frbg added this to the 0.3.30 milestone Jan 18, 2025
@martin-frbg martin-frbg merged commit 76db346 into OpenMathLib:develop Jan 18, 2025
80 checks passed
@dnoan
Copy link
Contributor

dnoan commented Jan 22, 2025

@martin-frbg , it's great to see support for Snapdragon X Elite on WoA. However, has anyone successfully built and tested the code? I decided to give it a try with clang-cl 19.1.7, but I'm encountering these two LLVM bugs when compiling the NEOVERSEN1 kernels:
llvm/llvm-project#66912
llvm/llvm-project#47432

[8900/12616] Building C object kernel\CMakeFiles\kernel_NEOVERSEN1.dir\CMakeFiles\sasum_k_NEOVERSEN1.c.obj
FAILED: kernel/CMakeFiles/kernel_NEOVERSEN1.dir/CMakeFiles/sasum_k_NEOVERSEN1.c.obj
C:\install\llvm-19.7.0\bin\clang-cl.exe  /nologo  -IC:\src\OpenBLAS\lapack-netlib\LAPACKE\include -IC:\src\OpenBLAS -IC:\src\OpenBLAS\build\kernel_config\NEOVERSEN1 -MD -Wno-everything  -DHAVE_C11 -DMS_ABI -Xclang -fopenmp -DUSE_OPENMP -Wall -DF_INTERFACE_GFORT -DGEMM_GEMV_FORWARD -DSMALL_MATRIX_OPT -DDYNAMIC_ARCH -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=256 -DMAX_PARALLEL_NUMBER=1 -DBUFFERSIZE=22 -DNO_AFFINITY -DVERSION="\"0.3.29\"" -DBUILD_SINGLE -DBUILD_DOUBLE -DBUILD_COMPLEX -DBUILD_COMPLEX16 /O2 /Ob2 /DNDEBUG /Zi -DBUILD_KERNEL -DTABLE_NAME=gotoblas_NEOVERSEN1  -DTS=_NEOVERSEN1 /showIncludes /Fokernel\CMakeFiles\kernel_NEOVERSEN1.dir\CMakeFiles\sasum_k_NEOVERSEN1.c.obj /Fdkernel\CMakeFiles\kernel_NEOVERSEN1.dir\ -c -- C:\src\OpenBLAS\build\kernel\CMakeFiles\sasum_k_NEOVERSEN1.c
fatal error: error in backend: Failed to evaluate function length in SEH unwind info
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: C:\\install\\llvm-19.7.0\\bin\\clang-cl.exe /nologo -IC:\\src\\OpenBLAS\\lapack-netlib\\LAPACKE\\include -IC:\\src\\OpenBLAS -IC:\\src\\OpenBLAS\\build\\kernel_config\\NEOVERSEN1 -MD -Wno-everything -DHAVE_C11 -DMS_ABI -Xclang -fopenmp -DUSE_OPENMP -Wall -DF_INTERFACE_GFORT -DGEMM_GEMV_FORWARD -DSMALL_MATRIX_OPT -DDYNAMIC_ARCH -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=256 -DMAX_PARALLEL_NUMBER=1 -DBUFFERSIZE=22 -DNO_AFFINITY -DVERSION=\"0.3.29\" -DBUILD_SINGLE -DBUILD_DOUBLE -DBUILD_COMPLEX -DBUILD_COMPLEX16 /O2 /Ob2 /DNDEBUG /Zi -DBUILD_KERNEL -DTABLE_NAME=gotoblas_NEOVERSEN1 -DTS=_NEOVERSEN1 /showIncludes /Fokernel\\CMakeFiles\\kernel_NEOVERSEN1.dir\\CMakeFiles\\sasum_k_NEOVERSEN1.c.obj /Fdkernel\\CMakeFiles\\kernel_NEOVERSEN1.dir\\ -c -- C:\\src\\OpenBLAS\\build\\kernel\\CMakeFiles\\sasum_k_NEOVERSEN1.c
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'C:\src\OpenBLAS\build\kernel\CMakeFiles\sasum_k_NEOVERSEN1.c'.
4.      Running pass 'AArch64 Assembly Printer' on function '@sasum_k_NEOVERSEN1'
Exception Code: 0xE0000046
 #0 0x00007ff931696248 (C:\WINDOWS\System32\KERNELBASE.dll+0xb6248)
 #1 0x00007ff7a9e18788 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0xbb8788)
 #2 0x00007ff7a92f50d4 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x950d4)
 #3 0x00007ff7a9e1f2fc (C:\install\llvm-19.7.0\bin\clang-cl.exe+0xbbf2fc)
 #4 0x00007ff7a9e1f48c (C:\install\llvm-19.7.0\bin\clang-cl.exe+0xbbf48c)
 #5 0x00007ff7a9ccdb28 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0xa6db28)
 #6 0x00007ff7a9ccc150 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0xa6c150)
 #7 0x00007ff7a9ccd948 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0xa6d948)
 #8 0x00007ff7a9cb525c (C:\install\llvm-19.7.0\bin\clang-cl.exe+0xa5525c)
 #9 0x00007ff7aa8c1e24 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x1661e24)
#10 0x00007ff7aa8c1e9c (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x1661e9c)
#11 0x00007ff7aa88006c (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x162006c)
#12 0x00007ff7a931666c (C:\install\llvm-19.7.0\bin\clang-cl.exe+0xb666c)
#13 0x00007ff7a9814cd4 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x5b4cd4)
#14 0x00007ff7a9a8028c (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x82028c)
#15 0x00007ff7a9a80484 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x820484)
#16 0x00007ff7a9a8067c (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x82067c)
#17 0x00007ff7a9a80018 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x820018)
#18 0x00007ff7aa06a688 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0xe0a688)
#19 0x00007ff7aa069a18 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0xe09a18)
#20 0x00007ff7aa06a018 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0xe0a018)
#21 0x00007ff7aa51029c (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x12b029c)
#22 0x00007ff7ab2d2248 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x2072248)
#23 0x00007ff7aa6ef354 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x148f354)
#24 0x00007ff7aa50f308 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x12af308)
#25 0x00007ff7aa6ef210 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x148f210)
#26 0x00007ff7aa6daaf8 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x147aaf8)
#27 0x00007ff7aa76f344 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x150f344)
#28 0x00007ff7a92f6bd8 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x96bd8)
#29 0x00007ff7a92f1210 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x91210)
#30 0x00007ff7aa5ead6c (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x138ad6c)
#31 0x00007ff7a9e185b0 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0xbb85b0)
#32 0x00007ff7aa5eb4bc (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x138b4bc)
#33 0x00007ff7aa54de08 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x12ede08)
#34 0x00007ff7aa54e044 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x12ee044)
#35 0x00007ff7aa5335dc (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x12d35dc)
#36 0x00007ff7a92f3068 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x93068)
#37 0x00007ff7a92ffb90 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x9fb90)
#38 0x00007ff7ac34a624 (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x30ea624)
#39 0x00007ff7ac34a6bc (C:\install\llvm-19.7.0\bin\clang-cl.exe+0x30ea6bc)
#40 0x00007ff932d18740 (C:\WINDOWS\System32\KERNEL32.DLL+0x8740)
#41 0x00007ff9359b1084 (C:\WINDOWS\SYSTEM32\ntdll.dll+0xd1084)
clang-cl: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 19.1.7
Target: aarch64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\install\llvm-19.7.0\bin
clang-cl: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-cl: note: diagnostic msg: C:\Users\buildusr\AppData\Local\Temp\sasum_k_NEOVERSEN1-6937e0.c
clang-cl: note: diagnostic msg: C:\Users\buildusr\AppData\Local\Temp\sasum_k_NEOVERSEN1-6937e0.sh
clang-cl: note: diagnostic msg:

********************

@martin-frbg
Copy link
Collaborator Author

are you building 0.3.29 or the develop branch ? 0.3.29 will only build with the ARMV8 target on WoA, the workarounds for the unsupported parts of the Neoverse kernels are only in the develop branch ( in the PR before this one)

@dnoan
Copy link
Contributor

dnoan commented Jan 22, 2025

That was 0.3.29 with some modifications. I just tried the develop branch and I got these errors:

FAILED: kernel/CMakeFiles/kernel_NEOVERSEN1.dir/CMakeFiles/cdotc_k_NEOVERSEN1.c.obj
C:\install\llvm-19.7.0\bin\clang-cl.exe  /nologo  -IC:\src\OpenBLAS\lapack-netlib\LAPACKE\include -IC:\src\OpenBLAS -IC:\src\OpenBLAS\build\kernel_config\NEOVERSEN1 -MD -Wno-everything  -DHAVE_C11 -DMS_ABI -Xclang -fopenmp -DUSE_OPENMP -Wall -DF_INTERFACE_GFORT -DGEMM_GEMV_FORWARD -DSMALL_MATRIX_OPT -DDYNAMIC_ARCH -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=256 -DMAX_PARALLEL_NUMBER=1 -DBUFFERSIZE=22 -DNO_AFFINITY -DVERSION="\"0.3.29.dev\"" -DBUILD_SINGLE -DBUILD_DOUBLE -DBUILD_COMPLEX -DBUILD_COMPLEX16 /O2 /Ob2 /DNDEBUG /Zi -DBUILD_KERNEL -DTABLE_NAME=gotoblas_NEOVERSEN1  -DTS=_NEOVERSEN1 /showIncludes /Fokernel\CMakeFiles\kernel_NEOVERSEN1.dir\CMakeFiles\cdotc_k_NEOVERSEN1.c.obj /Fdkernel\CMakeFiles\kernel_NEOVERSEN1.dir\ -c -- C:\src\OpenBLAS\build\kernel\CMakeFiles\cdotc_k_NEOVERSEN1.c
In file included from C:\src\OpenBLAS\build\kernel\CMakeFiles\cdotc_k_NEOVERSEN1.c:9:
C:/src/OpenBLAS/kernel/arm64/zdot_thunderx2t99.c(301,5): error: expected expression
  301 |         cf=OPENBLAS_MAKE_COMPLEX_FLOAT(dotr, doti);
      |            ^
C:\src\OpenBLAS\common.h(622,42): note: expanded from macro 'OPENBLAS_MAKE_COMPLEX_FLOAT'
  622 | #define OPENBLAS_MAKE_COMPLEX_FLOAT(r,i) openblas_make_complex_float(r,i)
      |                                          ^
C:\src\OpenBLAS\common.h(579,54): note: expanded from macro 'openblas_make_complex_float'
  579 |   #define openblas_make_complex_float(real, imag)    {(real), (imag)}
      |                                                      ^
In file included from C:\src\OpenBLAS\build\kernel\CMakeFiles\cdotc_k_NEOVERSEN1.c:9:
C:/src/OpenBLAS/kernel/arm64/zdot_thunderx2t99.c(350,11): error: expected expression
  350 |                         zdot = OPENBLAS_MAKE_COMPLEX_FLOAT (CREAL(zdot) + CREAL(*ptr), CIMAG(zdot) + CIMAG(*ptr));
      |                                ^
C:\src\OpenBLAS\common.h(622,42): note: expanded from macro 'OPENBLAS_MAKE_COMPLEX_FLOAT'
  622 | #define OPENBLAS_MAKE_COMPLEX_FLOAT(r,i) openblas_make_complex_float(r,i)
      |                                          ^
C:\src\OpenBLAS\common.h(579,54): note: expanded from macro 'openblas_make_complex_float'
  579 |   #define openblas_make_complex_float(real, imag)    {(real), (imag)}
      |                                                      ^

FAILED: kernel/CMakeFiles/kernel_NEOVERSEN1.dir/CMakeFiles/cdotu_k_NEOVERSEN1.c.obj
C:\install\llvm-19.7.0\bin\clang-cl.exe  /nologo  -IC:\src\OpenBLAS\lapack-netlib\LAPACKE\include -IC:\src\OpenBLAS -IC:\src\OpenBLAS\build\kernel_config\NEOVERSEN1 -MD -Wno-everything  -DHAVE_C11 -DMS_ABI -Xclang -fopenmp -DUSE_OPENMP -Wall -DF_INTERFACE_GFORT -DGEMM_GEMV_FORWARD -DSMALL_MATRIX_OPT -DDYNAMIC_ARCH -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=256 -DMAX_PARALLEL_NUMBER=1 -DBUFFERSIZE=22 -DNO_AFFINITY -DVERSION="\"0.3.29.dev\"" -DBUILD_SINGLE -DBUILD_DOUBLE -DBUILD_COMPLEX -DBUILD_COMPLEX16 /O2 /Ob2 /DNDEBUG /Zi -DBUILD_KERNEL -DTABLE_NAME=gotoblas_NEOVERSEN1  -DTS=_NEOVERSEN1 /showIncludes /Fokernel\CMakeFiles\kernel_NEOVERSEN1.dir\CMakeFiles\cdotu_k_NEOVERSEN1.c.obj /Fdkernel\CMakeFiles\kernel_NEOVERSEN1.dir\ -c -- C:\src\OpenBLAS\build\kernel\CMakeFiles\cdotu_k_NEOVERSEN1.c
In file included from C:\src\OpenBLAS\build\kernel\CMakeFiles\cdotu_k_NEOVERSEN1.c:8:
C:/src/OpenBLAS/kernel/arm64/zdot_thunderx2t99.c(301,5): error: expected expression
  301 |         cf=OPENBLAS_MAKE_COMPLEX_FLOAT(dotr, doti);
      |            ^
C:\src\OpenBLAS\common.h(622,42): note: expanded from macro 'OPENBLAS_MAKE_COMPLEX_FLOAT'
  622 | #define OPENBLAS_MAKE_COMPLEX_FLOAT(r,i) openblas_make_complex_float(r,i)
      |                                          ^
C:\src\OpenBLAS\common.h(579,54): note: expanded from macro 'openblas_make_complex_float'
  579 |   #define openblas_make_complex_float(real, imag)    {(real), (imag)}
      |                                                      ^
In file included from C:\src\OpenBLAS\build\kernel\CMakeFiles\cdotu_k_NEOVERSEN1.c:8:
C:/src/OpenBLAS/kernel/arm64/zdot_thunderx2t99.c(350,11): error: expected expression
  350 |                         zdot = OPENBLAS_MAKE_COMPLEX_FLOAT (CREAL(zdot) + CREAL(*ptr), CIMAG(zdot) + CIMAG(*ptr));
      |                                ^
C:\src\OpenBLAS\common.h(622,42): note: expanded from macro 'OPENBLAS_MAKE_COMPLEX_FLOAT'
  622 | #define OPENBLAS_MAKE_COMPLEX_FLOAT(r,i) openblas_make_complex_float(r,i)
      |                                          ^
C:\src\OpenBLAS\common.h(579,54): note: expanded from macro 'openblas_make_complex_float'
  579 |   #define openblas_make_complex_float(real, imag)    {(real), (imag)}
      |    
                                                  ^
2 errors generated.

@martin-frbg
Copy link
Collaborator Author

ok, I need to check that - zdot_thunderx2t99.c should not get compiled on WoA due to these, but my original patch of the KERNEL file used bad syntax and I did not get around to retesting on WoA after fixing that on Unix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants