-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the Build PaddlePaddle for Raspberry Pi document #5177
Conversation
Made some minor edits. Otherwise, LGTM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just a few nits :)
|
||
1. Build it: Log in to a Raspberry Pi via SSH and build the library. The required development tools and third-party dependencies are listed in [`/Dockerfile`](https://github.com/PaddlePaddle/Paddle/blob/develop/Dockerfile). | ||
|
||
1. Cross-compile: This article explains how to cross-compile PaddlePaddle for Raspberry Pi on a Linux/x64 computer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- -> 2. Cross-compile: We talk about how to cross-compile PaddlePaddle for Raspberry Pi on a Linux/x64 machine, in more detail in this article.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
I didn't change 1 to 2, because Github can automatically generate the enumeration.
# Build PaddlePaddle for Raspberry Pi | ||
You may use any of the following two approaches to build the inference library of PaddlePaddle for Raspberry Pi: | ||
|
||
1. Build it: Log in to a Raspberry Pi via SSH and build the library. The required development tools and third-party dependencies are listed in [`/Dockerfile`](https://github.com/PaddlePaddle/Paddle/blob/develop/Dockerfile). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rephrase: Build using SSH: Log in to a Raspberry Pi using SSH and build the library. The required development tools and third-party dependencies are listed here: /Dockerfile
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
## The Cross-Compiling Toolchain | ||
|
||
Step 1. Clone the following Github repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rephrase: Step 1. Clone the Github repo by running the following command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
## CMake Arguments | ||
|
||
CMake supports [cross-compiling](https://cmake.org/cmake/help/v3.0/manual/cmake-toolchains.7.html#cross-compiling). All CMake configuraition arguments required for the cross-compilation for Raspberry Pi can be found in [`cmake/cross_compiling/raspberry_pi.cmake`](https://github.com/PaddlePaddle/Paddle/blob/develop/cmake/cross_compiling/raspberry_pi.cmake). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
configuraition => configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
- `RPI_TOOLCHAIN`: The absolute path of the cross-compiling toolchain. | ||
|
||
- `RPI_ARM_NEON`: Use ARM NEON Intrinsics. Must be and default to `ON`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rephrase: RPI_ARM_NEON
: Use ARM NEON Intrinsics. This is a required argument and set default to ON
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
make install | ||
``` | ||
|
||
The intermediate files will be in `build`. Third-party libraries will be in `build/third_party`. If you have built for other platforms, e.g., Android or iOS, you may want to clear these directories by running `rm -rf build`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rephrase: The intermediate files will be stored in build
. Third-party libraries will be located in build/third_party
. If you have already built it for other platforms like Android or iOS, you may want to clear these directories by running the command: rm -rf build
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the very detailed review!
# Build PaddlePaddle for Raspberry Pi | ||
You may use any of the following two approaches to build the inference library of PaddlePaddle for Raspberry Pi: | ||
|
||
1. Build it: Log in to a Raspberry Pi via SSH and build the library. The required development tools and third-party dependencies are listed in [`/Dockerfile`](https://github.com/PaddlePaddle/Paddle/blob/develop/Dockerfile). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
1. Build it: Log in to a Raspberry Pi via SSH and build the library. The required development tools and third-party dependencies are listed in [`/Dockerfile`](https://github.com/PaddlePaddle/Paddle/blob/develop/Dockerfile). | ||
|
||
1. Cross-compile: This article explains how to cross-compile PaddlePaddle for Raspberry Pi on a Linux/x64 computer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
I didn't change 1 to 2, because Github can automatically generate the enumeration.
|
||
## The Cross-Compiling Toolchain | ||
|
||
Step 1. Clone the following Github repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
## CMake Arguments | ||
|
||
CMake supports [cross-compiling](https://cmake.org/cmake/help/v3.0/manual/cmake-toolchains.7.html#cross-compiling). All CMake configuraition arguments required for the cross-compilation for Raspberry Pi can be found in [`cmake/cross_compiling/raspberry_pi.cmake`](https://github.com/PaddlePaddle/Paddle/blob/develop/cmake/cross_compiling/raspberry_pi.cmake). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
- `RPI_TOOLCHAIN`: The absolute path of the cross-compiling toolchain. | ||
|
||
- `RPI_ARM_NEON`: Use ARM NEON Intrinsics. Must be and default to `ON`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
make install | ||
``` | ||
|
||
The intermediate files will be in `build`. Third-party libraries will be in `build/third_party`. If you have built for other platforms, e.g., Android or iOS, you may want to clear these directories by running `rm -rf build`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
## CMake Arguments | ||
|
||
CMake supports [cross-compiling](https://cmake.org/cmake/help/v3.0/manual/cmake-toolchains.7.html#cross-compiling). All CMake configuration arguments required for the cross-compilation for Raspberry Pi can be found in [`cmake/cross_compiling/raspberry_pi.cmake`](https://github.com/PaddlePaddle/Paddle/blob/develop/cmake/cross_compiling/raspberry_pi.cmake). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, we have little experiment on RPi, so I am not sure whether the raspberry_pi.cmake
is detailed enough for RPi. Maybe we need to complete it in the future.
.. | ||
``` | ||
|
||
To build the inference library, please set the argument WITH_API to ON: `WITH_C_API=ON`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please set the argument WITH_API to ON -> please set the argument WITH_C_API to ON
We also need to name the English documentation file to |
Got it. I added the suffix. @Xreki |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #5176