Skip to content

Commit bcf5b62

Browse files
committed
refine CMakeLists.txt and build_doc.sh
1 parent 4ca2209 commit bcf5b62

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

doc/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
add_subdirectory(api)
2+
add_subdirectory(v2)

doc/v2/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ set(SPHINX_CACHE_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/_doctrees")
1616
set(SPHINX_HTML_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/html")
1717

1818
configure_file(
19-
"${CMAKE_CURRENT_SOURCE_DIR}/templates/conf.py.en.in"
19+
"${CMAKE_CURRENT_SOURCE_DIR}/../templates/conf.py.en.in"
2020
"${BINARY_BUILD_DIR_EN}/conf.py"
2121
@ONLY)
2222

@@ -37,7 +37,7 @@ set(SPHINX_CACHE_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/_doctrees")
3737
set(SPHINX_HTML_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/html")
3838

3939
configure_file(
40-
"${CMAKE_CURRENT_SOURCE_DIR}/templates/conf.py.cn.in"
40+
"${CMAKE_CURRENT_SOURCE_DIR}/../templates/conf.py.cn.in"
4141
"${BINARY_BUILD_DIR_CN}/conf.py"
4242
@ONLY)
4343

@@ -47,5 +47,3 @@ sphinx_add_target(paddle_docs_cn
4747
${SPHINX_CACHE_DIR_CN}
4848
${CMAKE_CURRENT_SOURCE_DIR}
4949
${SPHINX_HTML_DIR_CN})
50-
51-
add_subdirectory(api)

doc/v2/howto/optimization/gpu_profiling_cn.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ above profilers.
5555

5656
:code:`paddle/math/test` 目录中的 :code:`test_GpuProfiler` 就是用于展示上述分析工具的用法。
5757

58-
.. literalinclude:: ../../../paddle/math/tests/test_GpuProfiler.cpp
58+
.. literalinclude:: ../../../../paddle/math/tests/test_GpuProfiler.cpp
5959
:language: c++
6060
:lines: 137-151
6161
:linenos:
@@ -83,7 +83,7 @@ program crashes when CPU version of PaddlePaddle invokes them.
8383

8484
1. 加入 :code:`REGISTER_TIMER_INFO` 和 :code:`printAllStatus` 函数(如高亮部分)。
8585

86-
.. literalinclude:: ../../../paddle/math/tests/test_GpuProfiler.cpp
86+
.. literalinclude:: ../../../../paddle/math/tests/test_GpuProfiler.cpp
8787
:language: c++
8888
:lines: 137-151
8989
:emphasize-lines: 8-12,14
@@ -130,7 +130,7 @@ nvprof 工具
130130
131131
1. 将 :code:`REGISTER_GPU_PROFILER` 函数加到代码中(参考强调部分)。
132132
133-
.. literalinclude:: ../../../paddle/math/tests/test_GpuProfiler.cpp
133+
.. literalinclude:: ../../../../paddle/math/tests/test_GpuProfiler.cpp
134134
:language: c++
135135
:lines: 137-151
136136
:emphasize-lines: 6-7

doc/v2/howto/optimization/gpu_profiling_en.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ In this tutorial, we will focus on nvprof and nvvp.
5454
:code:`test_GpuProfiler` from :code:`paddle/math/tests` directory will be used to evaluate
5555
above profilers.
5656

57-
.. literalinclude:: ../../../paddle/math/tests/test_GpuProfiler.cpp
57+
.. literalinclude:: ../../../../paddle/math/tests/test_GpuProfiler.cpp
5858
:language: c++
5959
:lines: 137-151
6060
:linenos:
@@ -80,7 +80,7 @@ As a simple example, consider the following:
8080

8181
1. Add :code:`REGISTER_TIMER_INFO` and :code:`printAllStatus` functions (see the emphasize-lines).
8282

83-
.. literalinclude:: ../../../paddle/math/tests/test_GpuProfiler.cpp
83+
.. literalinclude:: ../../../../paddle/math/tests/test_GpuProfiler.cpp
8484
:language: c++
8585
:lines: 137-151
8686
:emphasize-lines: 8-12,14
@@ -127,7 +127,7 @@ To use this command line profiler **nvprof**, you can simply issue the following
127127
128128
1. Add :code:`REGISTER_GPU_PROFILER` function (see the emphasize-lines).
129129
130-
.. literalinclude:: ../../../paddle/math/tests/test_GpuProfiler.cpp
130+
.. literalinclude:: ../../../../paddle/math/tests/test_GpuProfiler.cpp
131131
:language: c++
132132
:lines: 137-151
133133
:emphasize-lines: 6-7

paddle/scripts/travis/build_doc.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ make -j `nproc` copy_paddle_pybind
1212
make -j `nproc` paddle_docs paddle_docs_cn paddle_api_docs
1313

1414
# check websites for broken links
15-
linkchecker doc/en/html/index.html
16-
linkchecker doc/cn/html/index.html
15+
linkchecker doc/v2/en/html/index.html
16+
linkchecker doc/v2/cn/html/index.html
1717
linkchecker doc/api/en/html/index.html
1818

1919
# Parse Github URL
@@ -55,8 +55,8 @@ function deploy_docs() {
5555
set +e
5656
rm -rf ${DIR}/doc ${DIR}/doc_cn ${DIR}/api_doc
5757
set -e
58-
cp -r ../doc/cn/html ${DIR}/doc_cn
59-
cp -r ../doc/en/html ${DIR}/doc
58+
cp -r ../doc/v2/cn/html ${DIR}/doc_cn
59+
cp -r ../doc/v2/en/html ${DIR}/doc
6060
cp -r ../doc/api/en/html ${DIR}/api_doc
6161
git add .
6262
}

0 commit comments

Comments
 (0)