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

How to build a librwkv.dylib file with "arm64" on Mac M1 #115

Closed
realcarlos opened this issue Jul 17, 2023 · 2 comments
Closed

How to build a librwkv.dylib file with "arm64" on Mac M1 #115

realcarlos opened this issue Jul 17, 2023 · 2 comments

Comments

@realcarlos
Copy link

realcarlos commented Jul 17, 2023

❯ cmake . -DRWKV_CUBLAS=ON
-- Accelerate framework found
-- Could not find nvcc, please set CUDAToolkit_ROOT.
CMake Warning at CMakeLists.txt:125 (message):
cuBLAS not found

-- CMAKE_SYSTEM_PROCESSOR: arm64
-- ARM detected
-- Configuring done (0.2s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/xxx/rwkv.cpp
❯ cmake --build . --config Release
[ 7%] Built target ggml
[ 23%] Built target rwkv
[ 38%] Built target test_ggml_basics
[ 53%] Built target test_tiny_rwkv
[ 69%] Built target test_context_cloning
[ 84%] Built target rwkv_cpu_info
[100%] Built target rwkv_quantize
❯ lipo -info librwkv.dylib
Non-fat file: librwkv.dylib is architecture: x86_64

@realcarlos realcarlos changed the title How to build a librwkv.dylib file with "arb64" How to build a librwkv.dylib file with "arm64" on Mac M1 Jul 17, 2023
@schamane
Copy link
Contributor

@realcarlos check your toolset and terminal settings. Maybe you running inside rosetta?

cmake ..
-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Accelerate framework found
-- CMAKE_SYSTEM_PROCESSOR: arm64
-- ARM detected
-- Configuring done (0.5s)
cmake --build . --config Release
lipo -info librwkv.dylib
Non-fat file: librwkv.dylib is architecture: arm64

@realcarlos
Copy link
Author

@realcarlos check your toolset and terminal settings. Maybe you running inside rosetta?

cmake ..
-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Accelerate framework found
-- CMAKE_SYSTEM_PROCESSOR: arm64
-- ARM detected
-- Configuring done (0.5s)
cmake --build . --config Release
lipo -info librwkv.dylib
Non-fat file: librwkv.dylib is architecture: arm64

Thank you @schamane , so cool , now I could get the arm64 one .

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

2 participants