fix musa build on aarch64

This commit is contained in:
Huaishun Hu 2024-12-16 14:42:53 +08:00
parent d405804be8
commit 5d46c48137
5 changed files with 16 additions and 2 deletions

View file

@ -7,6 +7,8 @@ set(CMAKE_WARN_UNUSED_CLI YES)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
#set(CMAKE_VERBOSE_MAKEFILE ON)
if (NOT XCODE AND NOT MSVC AND NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")

View file

@ -148,8 +148,8 @@ This provides GPU acceleration using the MUSA cores of your Moore Threads MTT GP
- Using `CMake`:
```bash
cmake -B build -DGGML_MUSA=ON
cmake --build build --config Release
cmake -B build -DGGML_MUSA=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
cmake --build build --config Release -j$(($(nproc)-2))
```
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.

View file

@ -1,5 +1,9 @@
#pragma once
#ifdef GGML_USE_MUSA
#undef __ARM_NEON
#endif
#include "ggml.h"
#include "ggml-backend.h"

View file

@ -1,5 +1,9 @@
#pragma once
#ifdef GGML_USE_MUSA
#undef __ARM_NEON
#endif
#include "ggml.h"
#include "ggml-cuda.h"

View file

@ -1,3 +1,7 @@
#ifdef GGML_USE_MUSA
#undef __ARM_NEON
#endif
#include "ggml-impl.h"
#include "opt-step-adamw.cuh"