Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 26 additions & 5 deletions ci_scripts/report_preview_url.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=()

Expand All @@ -31,9 +45,16 @@ done
if [ ${#output_lines[@]} -gt 0 ]; then
cat <<-EOF
<details>
<summary>📚 本次 PR 文档预览链接 (点击展开)</summary>
以下是本次 PR 中变更文档的预览链接:
<summary>📚 本次 PR 文档预览链接(点击展开)</summary>
<table>
<tr>
<td>
ℹ️ <b>预览提醒</b><br>
请等待 <code>Docs-NEW</code> 流水线运行完成后再点击预览链接,否则可能会看到旧版本内容或遇到链接无法访问的情况。
</td>
</tr>
</table>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

诶?summary 里不能用 NOTE 么?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

想起来了,确实有这回事

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的用不了,会被当成普通引用,用 html table 搞了一个比较显眼的

$(printf '%s\n' "${output_lines[@]}")
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/flags/cudnn_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这边要引入 typos 么?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我没有要引入,我想增加一些测试文件,发现 typos 正好有用,因为 typo 有好多(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

后面可以引入下,文档这边检查 typos 也很重要

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以考虑发个任务

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好滴好滴


Values accepted
---------------
Expand Down Expand Up @@ -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
---------------
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/performance_improving/profiling_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ Time Unit: s, IPS Unit: steps/s

### 3.3 Benchmark 信息展示

Benckmark 信息用于展示模型的吞吐量以及时间开销。
Benchmark 信息用于展示模型的吞吐量以及时间开销。

```plain
============================================Perf Summary============================================
Expand Down