From 9994e4fe2df082d57b137cdbb24575fbf67a05c4 Mon Sep 17 00:00:00 2001 From: ooooo <3164076421@qq.com> Date: Thu, 9 Oct 2025 12:06:16 +0800 Subject: [PATCH 1/4] fix: support only report the url in pr change && fix _en.rst's url --- ci_scripts/report_preview_url.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/ci_scripts/report_preview_url.sh b/ci_scripts/report_preview_url.sh index 993bd53da18..e2147480f15 100644 --- a/ci_scripts/report_preview_url.sh +++ b/ci_scripts/report_preview_url.sh @@ -11,12 +11,26 @@ generate_preview_url() { local file_path="$1" local pr_id="$2" local path_no_ext="${file_path%.*}" - local base_url="http://preview-pr-${pr_id}.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/" + + # Check if file ends with _en (English version) + # _en.rst will only reach English preview, _en.md can be reached in both English and Chinese previews + # To Simplify, we treat all _en files as English version + if [[ "$path_no_ext" == *_en ]]; then + local base_url="http://preview-pr-${pr_id}.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/en/" + else + # Use /zh/ path for Chinese version + local base_url="http://preview-pr-${pr_id}.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/" + fi + local final_url="${base_url}${path_no_ext}.html" echo "$final_url" } -mapfile -t all_git_files < <(git diff --name-only --diff-filter=ACMR develop | sed 's#^docs/##') +# Use merge-base to find the common ancestor between PR branch and develop +# This ensures we only get changes from this PR, excluding commits merged to develop after PR creation +BASE_COMMIT=$(git merge-base HEAD develop 2>/dev/null || echo "develop") + +mapfile -t all_git_files < <(git diff --name-only --diff-filter=ACMR "$BASE_COMMIT" | sed 's#^docs/##') output_lines=() From 324cf8bb2bc5ca2ef6c0b433b7521123bd9fbb20 Mon Sep 17 00:00:00 2001 From: ooooo <3164076421@qq.com> Date: Thu, 9 Oct 2025 12:08:24 +0800 Subject: [PATCH 2/4] add note for bot comment --- ci_scripts/report_preview_url.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ci_scripts/report_preview_url.sh b/ci_scripts/report_preview_url.sh index e2147480f15..69f1b2dcee9 100644 --- a/ci_scripts/report_preview_url.sh +++ b/ci_scripts/report_preview_url.sh @@ -44,8 +44,11 @@ done if [ ${#output_lines[@]} -gt 0 ]; then cat <<-EOF +> [!NOTE] +> 请等待 \`Docs-NEW\` 流水线运行完成后再点击预览链接,否则可能会看到旧版本内容或遇到链接无法访问的情况。 +
-📚 本次 PR 文档预览链接 (点击展开) +📚 本次 PR 文档预览链接(点击展开) 以下是本次 PR 中变更文档的预览链接: From e1ab703caa000aed51d96993cc90909e76e8c1bd Mon Sep 17 00:00:00 2001 From: ooooo <3164076421@qq.com> Date: Thu, 9 Oct 2025 12:25:26 +0800 Subject: [PATCH 3/4] use typos to add examples --- docs/guides/flags/cudnn_en.rst | 4 ++-- docs/guides/performance_improving/profiling_model.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/guides/flags/cudnn_en.rst b/docs/guides/flags/cudnn_en.rst index 4e470490572..93a8238bab6 100644 --- a/docs/guides/flags/cudnn_en.rst +++ b/docs/guides/flags/cudnn_en.rst @@ -7,7 +7,7 @@ FLAGS_conv_workspace_size_limit ******************************************* (since 0.13.0) -The workspace limit size in MB unit for choosing cuDNN convolution algorithms. The inner funciton of cuDNN obtain the fastest suited algorithm that fits within this memory limit. Usually, large workspace size may lead to choose faster algorithms, but significant increasing memory workspace. Users need to trade-off between memory and speed. +The workspace limit size in MB unit for choosing cuDNN convolution algorithms. The inner function of cuDNN obtain the fastest suited algorithm that fits within this memory limit. Usually, large workspace size may lead to choose faster algorithms, but significant increasing memory workspace. Users need to trade-off between memory and speed. Values accepted --------------- @@ -60,7 +60,7 @@ FLAGS_cudnn_exhaustive_search ******************************************* (since 1.2.0) -Whether to use exhaustive search method to choose convolution algorithms. There are two search methods, heuristic search and exhaustive search in cuDNN. The exhaustive search attempts all cuDNN algorithms to choose the fastest algorithm. This method is time-consuming, the choosed algorithm will be cached for the given layer specifications. Once the layer specifications (like batch size, feature map size) are changed, it will search again. +Whether to use exhaustive search method to choose convolution algorithms. There are two search methods, heuristic search and exhaustive search in cuDNN. The exhaustive search attempts all cuDNN algorithms to choose the fastest algorithm. This method is time-consuming, the chosen algorithm will be cached for the given layer specifications. Once the layer specifications (like batch size, feature map size) are changed, it will search again. Values accepted --------------- diff --git a/docs/guides/performance_improving/profiling_model.md b/docs/guides/performance_improving/profiling_model.md index 19f0f294605..94c9afb2bcb 100644 --- a/docs/guides/performance_improving/profiling_model.md +++ b/docs/guides/performance_improving/profiling_model.md @@ -575,7 +575,7 @@ Time Unit: s, IPS Unit: steps/s ### 3.3 Benchmark 信息展示 -Benckmark 信息用于展示模型的吞吐量以及时间开销。 +Benchmark 信息用于展示模型的吞吐量以及时间开销。 ```plain ============================================Perf Summary============================================ From 7b469dd3d4fe8494ccb8b790f5f93e223f5f0857 Mon Sep 17 00:00:00 2001 From: ooooo <3164076421@qq.com> Date: Fri, 10 Oct 2025 16:06:00 +0800 Subject: [PATCH 4/4] move note inside \details\ --- ci_scripts/report_preview_url.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ci_scripts/report_preview_url.sh b/ci_scripts/report_preview_url.sh index 69f1b2dcee9..b243c04a853 100644 --- a/ci_scripts/report_preview_url.sh +++ b/ci_scripts/report_preview_url.sh @@ -44,13 +44,17 @@ done if [ ${#output_lines[@]} -gt 0 ]; then cat <<-EOF -> [!NOTE] -> 请等待 \`Docs-NEW\` 流水线运行完成后再点击预览链接,否则可能会看到旧版本内容或遇到链接无法访问的情况。 -
📚 本次 PR 文档预览链接(点击展开) -以下是本次 PR 中变更文档的预览链接: + + + + +
+ℹ️ 预览提醒
+请等待 Docs-NEW 流水线运行完成后再点击预览链接,否则可能会看到旧版本内容或遇到链接无法访问的情况。 +
$(printf '%s\n' "${output_lines[@]}")