diff --git a/doc/mobile/CMakeLists.txt b/doc/mobile/CMakeLists.txt deleted file mode 100644 index 7b34ba8d0768427802b11614c6962f3c3f6ef4e3..0000000000000000000000000000000000000000 --- a/doc/mobile/CMakeLists.txt +++ /dev/null @@ -1,52 +0,0 @@ -if(NOT DEFINED SPHINX_THEME) - set(SPHINX_THEME default) -endif() - -if(NOT DEFINED SPHINX_THEME_DIR) - set(SPHINX_THEME_DIR) -endif() - -# configured documentation tools and intermediate build results -set(BINARY_BUILD_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/_build") - -# Sphinx cache with pickled ReST documents -set(SPHINX_CACHE_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/_doctrees") - -# HTML output director -set(SPHINX_HTML_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/html") - -set(IMPORT_PADDLE_STRING "") -set(IMPORT_PADDLEV2_STRING "") - -configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/../templates/conf.py.en.in" - "${BINARY_BUILD_DIR_EN}/conf.py" - @ONLY) - -sphinx_add_target(paddle_mobile_docs - html - ${BINARY_BUILD_DIR_EN} - ${SPHINX_CACHE_DIR_EN} - ${CMAKE_CURRENT_SOURCE_DIR} - ${SPHINX_HTML_DIR_EN}) - -# configured documentation tools and intermediate build results -set(BINARY_BUILD_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/_build") - -# Sphinx cache with pickled ReST documents -set(SPHINX_CACHE_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/_doctrees") - -# HTML output director -set(SPHINX_HTML_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/html") - -configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/../templates/conf.py.cn.in" - "${BINARY_BUILD_DIR_CN}/conf.py" - @ONLY) - -sphinx_add_target(paddle_mobile_docs_cn - html - ${BINARY_BUILD_DIR_CN} - ${SPHINX_CACHE_DIR_CN} - ${CMAKE_CURRENT_SOURCE_DIR} - ${SPHINX_HTML_DIR_CN}) diff --git a/doc/mobile/cross_compiling_for_android_cn.md b/doc/mobile/cross_compiling_for_android_cn.md deleted file mode 100644 index 0607748b751e9f2d606236d9e98868335379b05c..0000000000000000000000000000000000000000 --- a/doc/mobile/cross_compiling_for_android_cn.md +++ /dev/null @@ -1,187 +0,0 @@ -# Android平台编译指南 - -用户可通过如下两种方式,交叉编译Android平台上适用的PaddlePaddle库: - -- [基于Docker容器的编译方式](#基于docker容器的编译方式) -- [基于Linux交叉编译环境的编译方式](#基于linux交叉编译环境的编译方式) - -## 基于Docker容器的编译方式 -Docker能在所有主要操作系统(包括Linux,Mac OS X和Windows)上运行,因此,使用基于Docker容器的编译方式,用户可在自己熟悉的开发平台上编译Android平台上适用的PaddlePaddle库。 - -### 构建PaddlePaddle的Android开发镜像 -我们把PaddlePaddle的交叉编译环境打包成一个镜像,称为开发镜像,里面涵盖了交叉编译Android版PaddlePaddle库需要的所有编译工具。 - -```bash -$ git clone https://github.com/PaddlePaddle/Paddle.git -$ cd Paddle -$ docker build -t username/paddle-android:dev . -f Dockerfile.android -``` - -用户也可以使用PaddlePaddle提供的官方开发镜像: - -```bash -$ docker pull paddlepaddle/paddle:latest-dev-android -``` - -对于国内用户,我们提供了加速访问的镜像源: - -```bash -$ docker pull docker.paddlepaddlehub.com/paddle:latest-dev-android -``` - -### 编译PaddlePaddle C-API库 -构建好开发镜像后,即可使用开发镜像来编译Android版PaddlePaddle C-API库。 -Android的Docker开发镜像向用户提供两个可配置的参数: - -
Argument | -Optional Values | -Default | -
---|---|---|
ANDROID_ABI | -armeabi-v7a, arm64-v8a | -armeabi-v7a | -
ANDROID_API | ->= 16 | -21 | -
Argument | -Optional Values | -Default | -
---|---|---|
ANDROID_ABI | -armeabi-v7a, arm64-v8a | -armeabi-v7a | -
ANDROID_API | ->= 16 | -21 | -
IOS_PLATFORM | -IOS_ARCH | -
---|---|
OS | -armv7, armv7s, arm64 | -
SIMULATOR | -i386, x86_64 | -
IOS_PLATFORM | -IOS_ARCH | -
---|---|
OS | -armv7, armv7s, arm64 | -
SIMULATOR | -i386, x86_64 | -
Name | -Open Source | -License | -Descriptions | -
---|---|---|---|
MKL | -No | -Proprietary | -Accelerate math processing routines | -
MKLML | -No | -Proprietary | -Small package of MKL, especially for Machine Learning | -
MKL-DNN | -Yes | -Apache 2.0 | -Accelerate primitives processing routines especially for Deep Neural Networks | -
版本说明 | -C-API | -
---|---|
cpu_avx_mkl | -paddle.tgz | -
cpu_avx_openblas | -paddle.tgz | -
cpu_noavx_openblas | -paddle.tgz | -
cuda7.5_cudnn5_avx_mkl | -paddle.tgz | -
cuda8.0_cudnn5_avx_mkl | -paddle.tgz | -
cuda8.0_cudnn7_avx_mkl | -paddle.tgz | -
cuda9.0_cudnn7_avx_mkl | -paddle.tgz | -
选项 | -值 | -
---|---|
WITH_C_API | -ON | -
WITH_PYTHON | -OFF(推荐) | -
WITH_SWIG_PY | -OFF(推荐) | -
WITH_GOLANG | -OFF(推荐) | -
WITH_GPU | -ON/OFF | -
WITH_MKL | -ON/OFF | -
Version Tips | -C-API | -
---|---|
cpu_avx_mkl | -paddle.tgz | -
cpu_avx_openblas | -paddle.tgz | -
cpu_noavx_openblas | -paddle.tgz | -
cuda7.5_cudnn5_avx_mkl | -paddle.tgz | -
cuda8.0_cudnn5_avx_mkl | -paddle.tgz | -
cuda8.0_cudnn7_avx_mkl | -paddle.tgz | -
cuda9.0_cudnn7_avx_mkl | -paddle.tgz | -
Options | -Value | -
---|---|
WITH_C_API | -ON | -
WITH_PYTHON | -OFF(recommended) | -
WITH_SWIG_PY | -OFF(recommended) | -
WITH_GOLANG | -OFF(recommended) | -
WITH_GPU | -ON/OFF | -
WITH_MKL | -ON/OFF | -
-
图1. 稀疏矩阵存储示意图
-
-
图2. 序列输入示意图
-
Python 端数据类型 | -C-API 输入数据类型 | -
---|---|
paddle.data_type.integer_value | -整型数组,无需附加序列信息 | -
paddle.data_type.dense_vector | -浮点型稠密矩阵,无需附加序列信息 | -
paddle.data_type.sparse_binary_vector | -浮点型稀疏矩阵,无需提供非零元的值,默认为1,无需附加序列信息 | -
paddle.data_type.sparse_vector | -浮点型稀疏矩阵,需提供非零元的值,无需附加序列信息 | -
paddle.data_type.integer_value_sequence | -整型数组,需附加序列信息 | -
paddle.data_type.dense_vector_sequence | -浮点型稠密矩阵,需附加序列信息 | -
paddle.data_type.sparse_binary_vector_sequence | -浮点型稀疏矩阵,无需提供非零元的值,默认为1,需附加序列信息 | -
paddle.data_type.sparse_vector_sequence | -浮点型稀疏矩阵,需提供非零元的值,需附加序列信息 | -
paddle.data_type.integer_value_sub_sequence | -整型数组,需附加双层序列信息 | -
paddle.data_type.dense_vector_sub_sequence | -浮点型稠密矩阵,需附加双层序列信息 | -
paddle.data_type.sparse_binary_vector_sub_sequence | -浮点型稀疏矩阵,无需提供非零元的值,默认为1,需附加双层序列信息 | -
paddle.data_type.sparse_vector_sub_sequence | -浮点型稀疏矩阵,需提供非零元的值,需附加双层序列信息 | -
-
图1. C-API使用流程示意图
-
- | 参数 | -本地训练 | -集群训练 | -本地测试 | -集群测试 | -
---|---|---|---|---|---|
通用 | -job | -√ | √ | √ | √ | -
use_gpu | -√ | √ | √ | √ | -|
local | -√ | √ | √ | √ | -|
config | -√ | √ | √ | √ | -|
config_args | -√ | √ | √ | √ | -|
num_passes | -√ | √ | √ | √ | -|
trainer_count | -√ | √ | √ | √ | -|
version | -√ | √ | √ | √ | -|
show_layer_stat | -√ | √ | √ | √ | -|
训练 | dot_period | -√ | √ | - | |
test_period | -√ | √ | - | ||
saving_period | -√ | √ | - | ||
show_parameter_stats_period | -√ | √ | - | ||
init_model_path | -√ | √ | √ | - | |
load_missing_parameter_strategy | -√ | √ | - | ||
saving_period_by_batches | -√ | √ | - | ||
use_old_updater | -√ | √ | - | ||
enable_grad_share | -√ | √ | - | ||
grad_share_block_num | -√ | √ | - | ||
log_error_clipping | -√ | √ | - | ||
log_clipping | -√ | √ | - | ||
save_only_one | -√ | √ | - | ||
start_pass | -√ | √ | - | ||
训练/测试 | save_dir | -√ | √ | √ | √ | -
训练过程中测试 | test_period | -√ | √ | - | |
average_test_period | -√ | √ | - | ||
测试 | model_list | -√ | √ | -||
test_wait | -√ | √ | -|||
test_pass | -√ | √ | -|||
predict_output_dir | -√ | √ | -|||
distribute_test | -√ | √ | -|||
Auc/正负对验证(PnpairValidation) | predict_file | -√ | √ | -||
GPU | gpu_id | -√ | √ | √ | √ | -
parallel_nn | -√ | √ | √ | √ | -|
allow_only_one_model_on_one_gpu | -√ | √ | √ | √ | -|
cudnn_dir | -√ | √ | √ | √ | -|
cuda_dir | -√ | √ | √ | √ | -|
cudnn_conv_workspace_limit_in_mb | -√ | √ | √ | √ | -|
递归神经网络(RNN) | -beam_size | -√ | √ | -||
rnn_use_batch | -√ | √ | √ | √ | -|
prev_batch_state | -√ | √ | - | ||
diy_beam_search_prob_so | -√ | √ | -|||
参数服务器(PServer) | start_pserver | -√ | √ | -||
pservers | -√ | √ | -|||
port | -√ | √ | -|||
port_num | -√ | √ | -|||
ports_num_for_sparse | -√ | √ | -|||
nics | -√ | √ | -|||
rdma_tcp | -√ | √ | -|||
small_messages | -√ | - | |||
loadsave_parameters_in_pserver | -√ | √ | -|||
log_period_server | -√ | - | |||
pserver_num_threads | -√ | - | |||
sock_send_buf_size | -√ | - | |||
sock_recv_buf_size | -√ | - | |||
num_gradient_servers | -√ | - | |||
parameter_block_size | -√ | - | |||
parameter_block_size_for_sparse | -√ | - | |||
异步随机梯度下降(Async SGD) | async_count | -√ | - | ||
async_lagged_ratio_min | -√ | - | |||
async_lagged_ratio_default | -√ | - | |||
性能调优(Performance Tuning) | log_barrier_abstract | -√ | - | ||
log_barrier_lowest_nodes | -√ | - | |||
log_barrier_show_log | -√ | - | |||
check_sparse_distribution_batches | -√ | - | |||
check_sparse_distribution_ratio | -√ | - | |||
check_sparse_distribution_unbalance_degree | -√ | - | |||
check_sparse_distribution_in_pserver | -√ | - | |||
show_check_sparse_distribution_log | -√ | - | |||
数据提供器(Data Provider) | memory_threshold_on_load_data | -√ | √ | - | |
随机数 | seed | -√ | √ | - | |
thread_local_rand_use_global_seed | -√ | √ | - | ||
单元测试 | checkgrad_eps | -- | |||
矩阵/向量 | enable_parallel_vector | -√ | √ | √ | √ | -
- | args | -local train | -cluster train | -local test | -cluster test | -
---|---|---|---|---|---|
common | -job | -√ | √ | √ | √ | -
use_gpu | -√ | √ | √ | √ | -|
local | -√ | √ | √ | √ | -|
config | -√ | √ | √ | √ | -|
config_args | -√ | √ | √ | √ | -|
num_passes | -√ | √ | √ | √ | -|
trainer_count | -√ | √ | √ | √ | -|
version | -√ | √ | √ | √ | -|
show_layer_stat | -√ | √ | √ | √ | -|
train | dot_period | -√ | √ | - | |
test_period | -√ | √ | - | ||
saving_period | -√ | √ | - | ||
show_parameter_stats_period | -√ | √ | - | ||
init_model_path | -√ | √ | √ | - | |
load_missing_parameter_strategy | -√ | √ | - | ||
saving_period_by_batches | -√ | √ | - | ||
use_old_updater | -√ | √ | - | ||
enable_grad_share | -√ | √ | - | ||
grad_share_block_num | -√ | √ | - | ||
log_error_clipping | -√ | √ | - | ||
log_clipping | -√ | √ | - | ||
save_only_one | -√ | √ | - | ||
start_pass | -√ | √ | - | ||
train/test | save_dir | -√ | √ | √ | √ | -
testing during training | test_period | -√ | √ | - | |
average_test_period | -√ | √ | - | ||
test | model_list | -√ | √ | -||
test_wait | -√ | √ | -|||
test_pass | -√ | √ | -|||
predict_output_dir | -√ | √ | -|||
distribute_test | -√ | √ | -|||
Auc/PnpairValidation | predict_file | -√ | √ | -||
GPU | gpu_id | -√ | √ | √ | √ | -
parallel_nn | -√ | √ | √ | √ | -|
allow_only_one_model_on_one_gpu | -√ | √ | √ | √ | -|
cudnn_dir | -√ | √ | √ | √ | -|
cuda_dir | -√ | √ | √ | √ | -|
cudnn_conv_workspace_limit_in_mb | -√ | √ | √ | √ | -|
RNN | -beam_size | -√ | √ | -||
rnn_use_batch | -√ | √ | √ | √ | -|
prev_batch_state | -√ | √ | - | ||
diy_beam_search_prob_so | -√ | √ | -|||
PServer | start_pserver | -√ | √ | -||
pservers | -√ | √ | -|||
port | -√ | √ | -|||
port_num | -√ | √ | -|||
ports_num_for_sparse | -√ | √ | -|||
nics | -√ | √ | -|||
rdma_tcp | -√ | √ | -|||
small_messages | -√ | - | |||
loadsave_parameters_in_pserver | -√ | √ | -|||
log_period_server | -√ | - | |||
pserver_num_threads | -√ | - | |||
sock_send_buf_size | -√ | - | |||
sock_recv_buf_size | -√ | - | |||
num_gradient_servers | -√ | - | |||
parameter_block_size | -√ | - | |||
parameter_block_size_for_sparse | -√ | - | |||
Async SGD | async_count | -√ | - | ||
async_lagged_ratio_min | -√ | - | |||
async_lagged_ratio_default | -√ | - | |||
Performance Tuning | log_barrier_abstract | -√ | - | ||
log_barrier_lowest_nodes | -√ | - | |||
log_barrier_show_log | -√ | - | |||
check_sparse_distribution_batches | -√ | - | |||
check_sparse_distribution_ratio | -√ | - | |||
check_sparse_distribution_unbalance_degree | -√ | - | |||
check_sparse_distribution_in_pserver | -√ | - | |||
show_check_sparse_distribution_log | -√ | - | |||
Data Provider | memory_threshold_on_load_data | -√ | √ | - | |
RandomNumber | seed | -√ | √ | - | |
thread_local_rand_use_global_seed | -√ | √ | - | ||
UnitTest | checkgrad_eps | -- | |||
Matrix/Vector | enable_parallel_vector | -√ | √ | √ | √ | -