marian-nmt / marian-dev

Fast Neural Machine Translation in C++ - development repository
https://marian-nmt.github.io
Other
257 stars 126 forks source link

add iOS and armv8 build #1014

Closed vrnmthr closed 9 months ago

vrnmthr commented 1 year ago

Description

Adds iOS compilation support to marian, and adds memory-mapping support to TranslateService in translator.h. Everything should be backwards-compatible. Compilation for iOS is intended to be done using the added cmake toolchain file. It is detected via CMAKE_SYSTEM_NAME in the cmake build.

Also fixes one bug in the memory mapping in binary.cpp that allows us to read mmap files with fewer memory allocations.

Added dependencies: simd_utils, ruy

How to test

Build cmake . -Bbuild -DCOMPILE_CUDA=off -DCMAKE_TOOLCHAIN_FILE=./cmake/ios.toolchain.cmake -DPLATFORM=OS64 -DDEPLOYMENT_TARGET=13.0 for iOS

Build cmake . -Bbuild -DCOMPILE_CUDA=off -DARM=on for ARM

Checklist