Skip to content

Commit 36b3b1f

Browse files
authored
use neon instructions on arm (#1451)
1 parent 7c627b6 commit 36b3b1f

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ before_build:
101101
- cmd: IF %NAME%==cpu-dnnl SET EXTRA=-Db_vscrt=md
102102
- cmd: IF %ANDROID%==false meson build --backend vs2017 --buildtype release -Dgtest=%GTEST% -Dopencl=%OPENCL% -Dblas=%BUILD_BLAS% -Ddnnl=true -Ddx=%DX% -Dcudnn=%CUDNN% -Dispc_native_only=false -Dpopcnt=false -Dcudnn_include="%CUDA_PATH%\include","%CUDA_PATH%\cuda\include" -Dcudnn_libdirs="%CUDA_PATH%\lib\x64","%CUDA_PATH%\cuda\lib\x64" -Dopenblas_include="%PKG_FOLDER%\OpenBLAS\dist64\include" -Dopenblas_libdirs="%PKG_FOLDER%\OpenBLAS\dist64\lib" -Ddnnl_dir="%PKG_FOLDER%\dnnl_win_1.5.0_cpu_vcomp" -Dopencl_include="%PKG_FOLDER%\opencl-nug.0.777.77\build\native\include" -Dopencl_libdirs="%PKG_FOLDER%\opencl-nug.0.777.77\build\native\lib\x64" -Ddefault_library=static %EXTRA%
103103
- cmd: IF %ANDROID%==true meson arm64-v8a --buildtype release -Dgtest=false -Dopenblas_include="%PKG_FOLDER%\OpenBLAS\android-aarch64\include" -Dopenblas_libdirs="%PKG_FOLDER%\OpenBLAS\android-aarch64\lib" -Dembed=%EMBED% -Ddefault_library=static --cross-file crossfile-aarch64
104-
- cmd: IF %ANDROID%==true meson armeabi-v7a --buildtype release -Dgtest=false -Dopenblas_include="%PKG_FOLDER%\OpenBLAS\android-armv7a\include" -Dopenblas_libdirs="%PKG_FOLDER%\OpenBLAS\android-armv7a\lib" -Dembed=%EMBED% -Ddefault_library=static --cross-file crossfile-armv7a -Dispc=false
104+
- cmd: IF %ANDROID%==true meson armeabi-v7a --buildtype release -Dgtest=false -Dopenblas_include="%PKG_FOLDER%\OpenBLAS\android-armv7a\include" -Dopenblas_libdirs="%PKG_FOLDER%\OpenBLAS\android-armv7a\lib" -Dembed=%EMBED% -Ddefault_library=static --cross-file crossfile-armv7a -Dispc=false -Dneon=false
105105
build_script:
106106
- cmd: IF %ANDROID%==false call scripts\appveyor_win_build.cmd
107107
- cmd: IF %ANDROID%==true call scripts\appveyor_android_build.cmd

meson.build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ endif
4848
if host_machine.system() == 'windows'
4949
add_project_arguments('-DNOMINMAX', language : 'cpp')
5050
endif
51+
if host_machine.cpu_family() == 'arm'
52+
if get_option('neon')
53+
add_project_arguments(cc.get_supported_arguments(['-mfpu=neon']), language : 'cpp')
54+
add_project_link_arguments(cc.get_supported_arguments(['-mfpu=neon']), language : 'cpp')
55+
endif
56+
endif
5157

5258
# Files to compile.
5359
deps = []

meson_options.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ option('pext',
123123
value: false,
124124
description: 'Use the pext instruction')
125125

126+
option('neon',
127+
type: 'boolean',
128+
value: true,
129+
description: 'Use neon instructions on arm processors')
130+
126131
option('gtest',
127132
type: 'boolean',
128133
value: true,

0 commit comments

Comments
 (0)