Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vrnmthr authored Feb 7, 2024
1 parent 7604996 commit ebdfcba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "iOS" )
list(APPEND ALL_WARNINGS -Wno-shorten-64-to-32;)
endif()

# ARM support
# ARM support: currently ONLY armv8. armv8 includes NEON by default
# we do not currently have good support for automatic architecture detection, including for cross-compilation
# this is planned for future PRs
if(ARM)

# Apple by default has Apple Accelerate. Otherwise fallback to RUY for GEMM
if(APPLE)
message(STATUS "Using Apple Accelerate SGEMM")
Expand All @@ -100,12 +103,11 @@ if(ARM)
option(USE_RUY_SGEMM "Compile with Ruy SGEMM" ON)
endif(APPLE)

# Define that we are using ARM
# Define that we are using ARM as required by simd_utils. See their README for info
add_compile_definitions(ARM FMA SSE)
# Some warnings as errors. I don't feel comfortable about the strict aliasing.
set(ARM_WARNINGS "-fno-strict-aliasing -Wno-comment")

# @TODO this assumes ArmV8. We should also look at armv7
if(MSVC)
add_compile_options(/flax-vector-conversions)
else(MSVC)
Expand Down
2 changes: 1 addition & 1 deletion src/functional/operators.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ struct Ops<double> {
#ifndef ARM
#include "3rd_party/sse_mathfun.h"
#else
#include "3rd_party/simd_utils/simd_utils.h" // @TODO this might be dependent on NEON
#include "3rd_party/simd_utils/simd_utils.h"
#endif

namespace marian {
Expand Down

0 comments on commit ebdfcba

Please sign in to comment.