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

can not compile under Visual Studio 17 2022 / ARM64 #558

Open
savelov opened this issue Jun 29, 2024 · 6 comments
Open

can not compile under Visual Studio 17 2022 / ARM64 #558

savelov opened this issue Jun 29, 2024 · 6 comments

Comments

@savelov
Copy link

savelov commented Jun 29, 2024

after
mkdir build
cd build
cmake ..
cmake --build . --config Release -- /maxcpucount:1

getting error

C:\Users\savel\sleef\build\src\libm\dispscalar.c(26,1): error C2065: 'Sleef_sind1_u35purec': undeclared identifier [C:
Users\savel\sleef\build\src\libm\dispscalar_obj.vcxproj]
C:\Users\savel\sleef\build\src\libm\dispscalar.c(26,1): error C2065: 'Sleef_sind1_u35purecfma': undeclared identifier [
C:\Users\savel\sleef\build\src\libm\dispscalar_obj.vcxproj]

@savelov
Copy link
Author

savelov commented Jun 29, 2024

fixed by forcing setting of aarch64 architecture

cmake -DSLEEF_ARCH_AARCH64=1 ..
cmake --build . --clean-first --config Release -- /maxcpucount:1

@savelov
Copy link
Author

savelov commented Jun 29, 2024

probably CMAKE_SYSTEM_PROCESSOR does not correctly match arm64 or aarch64?
https://github.com/shibatch/sleef/blob/master/Configure.cmake#L115
I checked and it is ARM64 uppercase (equal to %PROCESSOR_ARCHITECTURE%)

@joanaxcruz
Copy link
Contributor

Thank you so much, for looking into this and letting us know. We will investigate on our side and keep you updated if we escalate it with a PR.

@blapie
Copy link
Collaborator

blapie commented Jul 8, 2024

@savelov At the moment Windows assumes x86, but as you observed we are actually not far off supporting Windows on Arm (ARM64).
Happy to see that you managed to bypass the architecture detection and force your config, in order to solve your issue.

The more concerning issue we have on Windows (on x86 and Arm) is actually testing, that's only possible in a Cygwin/POSIX-compliant environment. So even though they can be compiled for ARM64, they cannot be tested (natively) yet.

I will try to merge a config.cmake fix so that at least you don't have to force your config and we can close this issue. But we will have to disable tests, so we cannot claim full support yet.

@savelov
Copy link
Author

savelov commented Jul 8, 2024

actually after fixing Configure.cmake, I could not properly compile using AdvSIMD instructions, as these variables are being set:
set(COMPILER_SUPPORTS_ADVSIMD 1)
set(COMPILER_SUPPORTS_ADVSIMDNOFMA 1)

probably Microsoft compiler is not fully compatible - e.g. compare with this PR for llama for visual c++ support, especially re float32x4_t initializers
https://github.com/ggerganov/llama.cpp/pull/7191/files

@blapie
Copy link
Collaborator

blapie commented Oct 4, 2024

Sorry for the late reply. Have you tried compiling with llvm/clang.
We believe MSVC might not be fully compatible yet, however there was no issue compiling with clang.

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

No branches or pull requests

3 participants