mirror of
https://github.com/ravenscroftj/turbopilot.git
synced 2024-09-29 20:25:56 +00:00
try to move arm options to top level
This commit is contained in:
parent
3f3bff73b6
commit
00ec442860
@ -5,6 +5,29 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS "on")
|
|||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
||||||
|
|
||||||
|
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64")
|
||||||
|
message(STATUS "ARM detected")
|
||||||
|
if (MSVC)
|
||||||
|
# TODO: arm msvc?
|
||||||
|
message(STATUS "ARM+MSVC= :( ")
|
||||||
|
else()
|
||||||
|
add_compile_options(())
|
||||||
|
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv6")
|
||||||
|
# Raspberry Pi 1, Zero
|
||||||
|
add_compile_options(-mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access)
|
||||||
|
endif()
|
||||||
|
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv7")
|
||||||
|
# Raspberry Pi 2
|
||||||
|
add_compile_options(-mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access -funsafe-math-optimizations)
|
||||||
|
endif()
|
||||||
|
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv8")
|
||||||
|
# Raspberry Pi 3, 4, Zero 2 (32-bit)
|
||||||
|
add_compile_options(-mfp16-format=ieee -mno-unaligned-access)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
add_subdirectory(extern/ggml)
|
add_subdirectory(extern/ggml)
|
||||||
add_subdirectory(extern/argparse)
|
add_subdirectory(extern/argparse)
|
||||||
add_subdirectory(extern/spdlog)
|
add_subdirectory(extern/spdlog)
|
||||||
|
@ -3,28 +3,6 @@ set(TURBOPILOT_TARGET turbopilot)
|
|||||||
find_package(Boost REQUIRED)
|
find_package(Boost REQUIRED)
|
||||||
include_directories(${Boost_INCLUDE_DIRS})
|
include_directories(${Boost_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
|
||||||
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64")
|
|
||||||
message(STATUS "ARM detected")
|
|
||||||
if (MSVC)
|
|
||||||
# TODO: arm msvc?
|
|
||||||
else()
|
|
||||||
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv6")
|
|
||||||
# Raspberry Pi 1, Zero
|
|
||||||
add_compile_options(-mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access)
|
|
||||||
endif()
|
|
||||||
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv7")
|
|
||||||
# Raspberry Pi 2
|
|
||||||
add_compile_options(-mfpu=neon-fp-armv8 -mfp16-format=ieee -mno-unaligned-access -funsafe-math-optimizations)
|
|
||||||
endif()
|
|
||||||
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv8")
|
|
||||||
# Raspberry Pi 3, 4, Zero 2 (32-bit)
|
|
||||||
add_compile_options(-mfp16-format=ieee -mno-unaligned-access)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
add_executable(${TURBOPILOT_TARGET}
|
add_executable(${TURBOPILOT_TARGET}
|
||||||
main.cpp
|
main.cpp
|
||||||
gptj.cpp
|
gptj.cpp
|
||||||
|
Loading…
Reference in New Issue
Block a user