diff options
author | Nikolay Bogoychev <nheart@gmail.com> | 2021-12-16 18:07:34 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-16 18:07:34 +0300 |
commit | e26e5b6faf7c826868efe12316e0b02499d4edcf (patch) | |
tree | df0201120d217e8bd7098796a4bce348a4261298 | |
parent | e8a1a2530fb84cbff7383302ebca393e5875c441 (diff) |
Use apple accelerate on MacOs by default (#897)
-rw-r--r-- | .github/workflows/macos.yml | 11 | ||||
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | CMakeLists.txt | 6 |
3 files changed, 8 insertions, 10 deletions
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 5e3e57c6..20907d9b 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -18,16 +18,10 @@ jobs: submodules: recursive - name: Install dependencies - run: brew install boost openblas openssl protobuf + run: brew install boost openssl protobuf - # Openblas location is exported explicitly because openblas is keg-only, - # which means it was not symlinked into /usr/local/. - # CMake cannot find BLAS on GitHub runners if Marian is being compiled - # statically, hence USE_STATIC_LIBS=off - name: Configure CMake run: | - export LDFLAGS="-L/usr/local/opt/openblas/lib" - export CPPFLAGS="-I/usr/local/opt/openblas/include" mkdir -p build cd build cmake .. \ @@ -37,8 +31,7 @@ jobs: -DCOMPILE_SERVER=on \ -DCOMPILE_TESTS=on \ -DUSE_FBGEMM=on \ - -DUSE_SENTENCEPIECE=on \ - -DUSE_STATIC_LIBS=off + -DUSE_SENTENCEPIECE=on - name: Compile working-directory: build diff --git a/CHANGELOG.md b/CHANGELOG.md index 80715ad3..a5dd305f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Enforce validation for the task alias in training mode. ### Changed +- MacOS marian uses Apple Accelerate framework by default, as opposed to openblas/mkl. - Optimize LSH for speed by treating is as a shortlist generator. No option changes in decoder - Set REQUIRED_BIAS_ALIGNMENT = 16 in tensors/gpu/prod.cpp to avoid memory-misalignment on certain Ampere GPUs. - For BUILD_ARCH != native enable all intrinsics types by default, can be disabled like this: -DCOMPILE_AVX512=off diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e6f24c7..eb6ca97b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,11 @@ option(COMPILE_CUDA "Compile GPU version" ON) option(COMPILE_EXAMPLES "Compile examples" OFF) option(COMPILE_SERVER "Compile marian-server" OFF) option(COMPILE_TESTS "Compile tests" OFF) -option(USE_APPLE_ACCELERATE "Compile with Apple Accelerate" OFF) +if(APPLE) + option(USE_APPLE_ACCELERATE "Compile with Apple Accelerate" ON) +else(APPLE) + option(USE_APPLE_ACCELERATE "Compile with Apple Accelerate" OFF) +endif(APPLE) option(USE_CCACHE "Use ccache compiler cache (https://ccache.dev)" OFF) option(USE_CUDNN "Use CUDNN library" OFF) option(USE_DOXYGEN "Build documentation with Doxygen" ON) |