Skip to content

Commit 5d46c48

Browse files
author
Huaishun Hu
committed
fix musa build on aarch64
1 parent d405804 commit 5d46c48

File tree

5 files changed

+16
-2
lines changed

5 files changed

+16
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ set(CMAKE_WARN_UNUSED_CLI YES)
77

88
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
99

10+
#set(CMAKE_VERBOSE_MAKEFILE ON)
11+
1012
if (NOT XCODE AND NOT MSVC AND NOT CMAKE_BUILD_TYPE)
1113
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
1214
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")

docs/build.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ This provides GPU acceleration using the MUSA cores of your Moore Threads MTT GP
148148
- Using `CMake`:
149149

150150
```bash
151-
cmake -B build -DGGML_MUSA=ON
152-
cmake --build build --config Release
151+
cmake -B build -DGGML_MUSA=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
152+
cmake --build build --config Release -j$(($(nproc)-2))
153153
```
154154

155155
The environment variable [`MUSA_VISIBLE_DEVICES`](https://docs.mthreads.com/musa-sdk/musa-sdk-doc-online/programming_guide/Z%E9%99%84%E5%BD%95/) can be used to specify which GPU(s) will be used.

ggml/include/ggml-cuda.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#pragma once
22

3+
#ifdef GGML_USE_MUSA
4+
#undef __ARM_NEON
5+
#endif
6+
37
#include "ggml.h"
48
#include "ggml-backend.h"
59

ggml/src/ggml-cuda/common.cuh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#pragma once
22

3+
#ifdef GGML_USE_MUSA
4+
#undef __ARM_NEON
5+
#endif
6+
37
#include "ggml.h"
48
#include "ggml-cuda.h"
59

ggml/src/ggml-cuda/opt-step-adamw.cu

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#ifdef GGML_USE_MUSA
2+
#undef __ARM_NEON
3+
#endif
4+
15
#include "ggml-impl.h"
26
#include "opt-step-adamw.cuh"
37

0 commit comments

Comments
 (0)