-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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 compile_paddle_lib_en.md #9795
Conversation
TBD | ||
### Download & Install | ||
|
||
Download the latest C-API development package from CI system and install, you can find the required version in the table below: |
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.
install, you -> install. You
|
||
### From source | ||
|
||
User also can compile the C-API library from PaddlePaddle source code, just compiling with the following compilation options: |
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.
This sentence should be:
Users can also compile the C-API library from PaddlePaddle source code by compiling with the following compilation options:
<td>ON/OFF</td> | ||
</tr></tbody></table> | ||
|
||
It is best to set up with recommended values to avoid link with unnecessary libraries. Set other compilation options as you need. |
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.
link -> linking
.. | ||
``` | ||
|
||
After run the above code to generate Makefile , run: `make && make install`. After successfully compiled, the dependencies are required by C-API(includes: (1)PaddlePaddle inference library and header files; (2) Third-party libraries and header files) will be stored in the `PADDLE_ROOT` directory. |
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.
run -> running
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.
compiled -> compilation
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.
the dependencies are required by -> the dependencies required by
|
||
### Linking Description: | ||
|
||
There are three kinds of link methods: |
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.
link ->linking
There are three kinds of link methods: | ||
|
||
1. Linking with dynamic library `libpaddle_capi_shared.so`(This way is much more convenient and easier, **Without special requirements, it is recommended**), refer to the following: | ||
1. Compiling with CPU version and using `OpenBLAS`; only need link one library named `libpaddle_capi_shared.so` to develop prediction program through C-API. |
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.
need link -> need to link
|
||
1. Linking with dynamic library `libpaddle_capi_shared.so`(This way is much more convenient and easier, **Without special requirements, it is recommended**), refer to the following: | ||
1. Compiling with CPU version and using `OpenBLAS`; only need link one library named `libpaddle_capi_shared.so` to develop prediction program through C-API. | ||
1. Compiling with CPU version and using `MKL` lib, you need link MKL library directly to develop prediction program through PaddlePaddle C-API, due to `MKL` has its own dynamic library. |
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.
need link -> need to link
1. Linking with dynamic library `libpaddle_capi_shared.so`(This way is much more convenient and easier, **Without special requirements, it is recommended**), refer to the following: | ||
1. Compiling with CPU version and using `OpenBLAS`; only need link one library named `libpaddle_capi_shared.so` to develop prediction program through C-API. | ||
1. Compiling with CPU version and using `MKL` lib, you need link MKL library directly to develop prediction program through PaddlePaddle C-API, due to `MKL` has its own dynamic library. | ||
1. Compiling with GPU version, CUDA library will be loaded dynamic on prediction program run-time, and also set CUDA library to `LD_LIBRARY_PATH` environment variable. |
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.
dynamic -> dynamically
1. This linking methods is mainly used for mobile prediction. | ||
1. Split `libpaddle_capi_whole.a` into two static linking library at least to reduce the size of linking libraries. | ||
1. Specify `-Wl,--whole-archive -lpaddle_capi_layers` and `-Wl,--no-whole-archive -lpaddle_capi_engine` for linking. | ||
1. The dependencies of third-party need explicitly link same as method 2 above. |
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.
dependencies of third-party -> third-party dependencies
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!
Fix #8916