add iOS and armv8 build#1014
Conversation
… into vamathur/ios
snukky
left a comment
There was a problem hiding this comment.
LGTM, I only had minor suggestions and clarifying questions.
emjotde
left a comment
There was a problem hiding this comment.
Request for small clarifications, will be good to merge afterwards.
| io::Item getItem(const void* current, const std::string& varName) { | ||
| std::vector<io::Item> items; | ||
| loadItems(current, items); | ||
| loadItems(current, items, /*mapped=*/true); |
There was a problem hiding this comment.
How sure are we this is always OK?
There was a problem hiding this comment.
I have tested this with the iOS build and with through our quicksand paths and have had no issues. If there are other scenarios that you know of that you want to test to ensure they don't break we can try and test them as well
There was a problem hiding this comment.
in binary.cpp in the loadItems function there is a comment that indicates that perhaps there may be some hardware-specific compatibility we should test?
// @TOOD: verify this actually works for the hardware-specific ones like intgemm8avx2
There was a problem hiding this comment.
if you are uncomfortable with this, we can also pass the mapped variable through the callchain to let callers set it as they see fit. we need this change in iOS otherwise loading/parsing the YAML is too slow
There was a problem hiding this comment.
There have been a lot of changes in the mmapping interface in internal master, so we will take a look in the merge PR what is going on there.
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 viaCMAKE_SYSTEM_NAMEin the cmake build.Also fixes one bug in the memory mapping in
binary.cppthat 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.0for iOSBuild
cmake . -Bbuild -DCOMPILE_CUDA=off -DARM=onfor ARMChecklist