Skip to content

Conversation

jzhang533
Copy link
Contributor

@jzhang533 jzhang533 commented May 17, 2024

PR Category

Environment Adaptation

PR Types

New features

Description

Use Apple’s implementation of the BLAS on Mac.

Benefits:

  • possibly resolve long standing issues reported in the community, that PaddlePaddle freeze on some Mac settings.
  • Speedup on Mac, since Accelerate Framework is generally faster than openblas on Apple's platform.

Updates

  • 2024-5-23 update:
    our nightly build pipeline has been updated, it's possible to use the package with Apple's BLAS by : pip install --no-cache paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/mac/cpu/develop.html.
    I did a quick test, recognizing 15 random images by using time paddleocr --image_dir images, it shows 25% speedup compared with paddlepaddle with openblas on my mac m1. (paddlepaddle using accelerate framework V.S. paddlepaddle using openblas: 1m15.297s V.S. 1m34.525s).

  • 2024-5-21 update:
    The required CI has turned green, so I think we can go ahead and merge this PR. Meanwhile, we should wait for feedback to see if it resolves the PaddlePaddle freeze on some Mac settings.

  • 2024-5-20 update:
    I can successfully build the package on my mac m1 using command:

cmake -S . -B build-ninja -GNinja -DPY_VERSION=3.9 -DWITH_GPU=OFF -DWITH_TESTING=OFF -DWITH_AVX=OFF -DWITH_ARM=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build-ninja

and successfully run the script in #63344, but building the package with test cases failed on CI pipeline : PR-CI-Mac-Python3.

please ignore the following

PCard-67164

Copy link

paddle-bot bot commented May 17, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@risemeup1 risemeup1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants