repo
stringlengths
5
53
pr_number
int32
1
321k
task_type
stringclasses
2 values
issue_text
stringlengths
0
81.2k
pr_title
stringlengths
1
319
pr_body
stringlengths
0
105k
base_sha
stringlengths
40
40
head_sha
stringlengths
40
40
gold_diff
stringlengths
0
202M
changed_files
listlengths
0
100
review_threads
listlengths
0
100
test_patch
stringlengths
0
23.4M
merged
bool
1 class
PaddlePaddle/Paddle
67,371
issue_to_patch
【Mthreads】support features for llama 13 b
1. Support/optimize operators for LLaMA 13B - [x] mudnn matmul - [x] mudnn flashattn - [x] some unary/binary ops - [x] optimze cross entropy/rope 2. redefine macro, PADDLE_ENFORCE and PADDLE_ENFORCE_NOT_NULL for improving performance. 3. extend cpp_extension module for building rmsnorm of paddlenlp repo. 4. skip...
cb5568b738f291724573c9b03690a5e075bbfb36
65d9c5886090bab5dafa12e086cfa83824c96264
diff --git a/build.sh b/build.sh new file mode 100644 index 00000000000000..08d3542ecbccff --- /dev/null +++ b/build.sh @@ -0,0 +1,7 @@ +#!/bin/bash +mkdir -p build +pushd build +cmake .. -DWITH_MKL=ON -DWITH_MUSA=ON -DWITH_MCCL=ON -DWITH_GPU=OFF -DPY_VERSION=3.9 -DWITH_CINN=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=on +mak...
[ "build.sh", "cmake/configure.cmake", "cmake/musa.cmake", "cmake/phi.cmake", "paddle/fluid/memory/allocation/stream_safe_cuda_allocator.cc", "paddle/fluid/operators/ops_signature/generated_fused_sig.cc", "paddle/fluid/operators/ops_signature/generated_sig.cc", "paddle/fluid/operators/ops_signature/gene...
[]
diff --git a/test/collective/fleet/dygraph_group_sharded_stage2.py b/test/collective/fleet/dygraph_group_sharded_stage2.py index 81f6df163f1db5..b7213e819e2f4c 100644 --- a/test/collective/fleet/dygraph_group_sharded_stage2.py +++ b/test/collective/fleet/dygraph_group_sharded_stage2.py @@ -208,7 +208,7 @@ def test_dp_s...
true
PaddlePaddle/Paddle
79,277
issue_to_patch
[API Compatibility] align smooth_l1_loss by adding it to compat module -part
### PR Category User Experience ### PR Types New features ### Description 对 smooth_l1_loss 的修复 相关 PR: - https://github.com/PaddlePaddle/Paddle/pull/78811#discussion_r3256346398 ### 是否引起精度变化 否
e3133879709c6bf869b8952d62109f9296c64cd5
6974db011f184153077b113d4d95f8c5cf343ea3
diff --git a/python/paddle/compat/nn/__init__.py b/python/paddle/compat/nn/__init__.py index a567b396d8815b..7f0c1f3cb39bef 100644 --- a/python/paddle/compat/nn/__init__.py +++ b/python/paddle/compat/nn/__init__.py @@ -15,6 +15,7 @@ from __future__ import annotations import collections +import warnings from iterto...
[ "python/paddle/compat/nn/__init__.py", "python/paddle/compat/nn/functional/__init__.py", "test/legacy_test/test_compat_smooth_l1_loss.py" ]
[ { "comment": "把这些注释移除一下", "path": "python/paddle/compat/nn/functional/__init__.py", "hunk": "@@ -380,3 +383,96 @@ def to_list_if_necessary(x):\n paddings=to_list_if_necessary(padding),\n dilations=to_list_if_necessary(dilation),\n )\n+\n+\n+@ForbidKeywordsDecorator(\n+ illegal_key...
diff --git a/test/legacy_test/test_compat_smooth_l1_loss.py b/test/legacy_test/test_compat_smooth_l1_loss.py new file mode 100644 index 00000000000000..9dfafeacac257d --- /dev/null +++ b/test/legacy_test/test_compat_smooth_l1_loss.py @@ -0,0 +1,229 @@ +# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +# ...
true
PaddlePaddle/Paddle
79,307
issue_to_patch
[Allocator] Add generic all block info API (#79272)
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
d3c4748dfe0f71ada11774cf2518f3a3ad2327d8
e37974522fe115a975a41fb932e484ae37727ded
diff --git a/paddle/fluid/pybind/pybind.cc b/paddle/fluid/pybind/pybind.cc index 70b6c6263bbb33..5df439fe6ebc6a 100644 --- a/paddle/fluid/pybind/pybind.cc +++ b/paddle/fluid/pybind/pybind.cc @@ -3753,8 +3753,11 @@ All parameter, weight, gradient are variables in Paddle. m.def("vmm_free_block_info", [](int device_id)...
[ "paddle/fluid/pybind/pybind.cc", "paddle/phi/core/memory/allocation/auto_growth_best_fit_allocator.h", "paddle/phi/core/memory/mem_utils.cc", "paddle/phi/core/memory/mem_utils.h", "paddle/phi/core/memory/mem_visitor.cc", "paddle/phi/core/memory/mem_visitor.h", "python/paddle/device/cuda/memory_analyzer....
[ { "comment": "**🔴 兼容性** 这里把已导出的 `AllBlockInfoOfVmmAllocator` 直接改名成 `AllBlockInfoOfAllocator`,但没有保留旧 C++ 符号。\n\n`mem_utils.h` 中旧函数带 `PADDLE_API extern`,下游 C++ 代码或已编译扩展如果继续包含/链接 `paddle::memory::AllBlockInfoOfVmmAllocator`,在 release/3.4 分支升级后会出现源码或链接兼容性破坏。Python 的 `vmm_all_block_info` 旧入口已经保留,C++ 层也应保持同样的兼容 alia...
diff --git a/test/cpp/fluid/memory/allocator_visitor_test.cc b/test/cpp/fluid/memory/allocator_visitor_test.cc index 1df632e3b1eac4..91c9dce4f59800 100644 --- a/test/cpp/fluid/memory/allocator_visitor_test.cc +++ b/test/cpp/fluid/memory/allocator_visitor_test.cc @@ -12,6 +12,8 @@ // See the License for the specific la...
true
PaddlePaddle/Paddle
79,263
issue_to_patch
[CI] Fix empty C++ coverage reports
### PR Category Execute Infrastructure ### PR Types Bug fixes ### Description 修复 Coverage 任务中 C++ 覆盖率数据为空仍可能通过的问题。 背景是部分 Coverage job 中构建使用的 GCC 与采集阶段默认 gcov 主版本不一致,lcov/gcov 读取 gcno/gcda 失败后会生成空的 coverage-diff.info。后续 coverage_judge.sh 对空数据只输出 no data found,没有把这种采集失败识别为失败,导致 C++ diff coverage 没有实际数据也可能被判定通过。 本 PR ...
4d12baa6a2c7ea4dbb0e799e6475bc1d0a9e6794
cd6fd34f1b1a8d50cdbc477f0fc765347f4f8977
diff --git a/ci/coverage_info.sh b/ci/coverage_info.sh index 703a3d886151d..d785719f99987 100644 --- a/ci/coverage_info.sh +++ b/ci/coverage_info.sh @@ -32,6 +32,92 @@ echo "::endgroup::" cd ${PADDLE_ROOT}/build +function init_gcov_tool() { + local cxx_compiler="" + local compiler_version="" + local compi...
[ "ci/coverage_info.sh" ]
[ { "comment": "init_gcov_tool() does not reset the global GCOV_TOOL before searching. If GCOV_TOOL is already set in the environment and no candidate gcov binary is found, the function will silently reuse the stale value and skip the intended \"no gcov\" failure path (and version match check), which can undermin...
true
PaddlePaddle/Paddle
79,233
issue_to_patch
【Hackathon 10th Spring No.51】Apply yaml-cpp GCC 15 compatibility patch - part 5
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
8d925a3e4842bc41c4c11af8d37265d2be635d4f
fb301d72c2725f4fcabf78c513b91a1b5b108364
diff --git a/cmake/external/yaml.cmake b/cmake/external/yaml.cmake index 9c094ea4e573f2..93ae4ba9204371 100644 --- a/cmake/external/yaml.cmake +++ b/cmake/external/yaml.cmake @@ -23,6 +23,12 @@ set(SOURCE_INCLUDE_DIR ${SOURCE_DIR}/include) include_directories(${YAML_INCLUDE_DIR}) +file(TO_NATIVE_PATH + ${PADDL...
[ "cmake/external/yaml.cmake", "patches/yaml-cpp/emitterutils.cpp.patch" ]
[]
true
PaddlePaddle/Paddle
79,203
issue_to_patch
[CI] Upgrade H-Coverage to Python 3.12
### PR Category Environment Adaptation ### PR Types Improvements ### Description 本 PR 仅将 H-Coverage (`CI-H`) 流水线从 Python 3.10 升级到 Python 3.12,不修改 Linux-CPU / NPU / 普通 Coverage 等其它流水线。 主要改动: - `H-Coverage.yml`:build / test / Fleet 相关 job 的 `PY_VERSION` 改为 `"3.12"`,并同步更新显式 `cmake -DPY_VERSION=3.12`。 - H-Coverage 相关容器统...
8da1ec306684956ad70cc6f06bbc6f626d51243a
175d43b72937821819d4467b64e02057c5fd0ff4
diff --git a/.github/workflows/H-Coverage.yml b/.github/workflows/H-Coverage.yml index 49f9efa3ba31fc..766fd8092fb9fa 100644 --- a/.github/workflows/H-Coverage.yml +++ b/.github/workflows/H-Coverage.yml @@ -104,7 +104,7 @@ jobs: LITE_GIT_TAG: develop WITH_UNITY_BUILD: "ON" WITH_FA_BUILD...
[ ".github/workflows/H-Coverage.yml", "test/test_flashmask_ci/flashmask_gt.json", "test/test_flashmask_ci/run.sh" ]
[ { "comment": "![P1](https://img.shields.io/badge/P1-high-orange) **优先级:P1**\n\n这里直接假设 `cuda129-coverage-test` 容器内已经有 `python3.12`/`pip3.12`,但当前 H-Coverage `Coverage build` 已在这组新增检查处失败:日志在 flashattn URL 检查后没有进入 `pip install`/`cmake`,随后退出 1(见 https://github.com/PaddlePaddle/Paddle/actions/runs/26721401586/job/787...
diff --git a/test/test_flashmask_ci/flashmask_gt.json b/test/test_flashmask_ci/flashmask_gt.json index e644d6e4e2faff..768a3c2f1df60c 100644 --- a/test/test_flashmask_ci/flashmask_gt.json +++ b/test/test_flashmask_ci/flashmask_gt.json @@ -19,16 +19,16 @@ "gen_startend_row_indices7-1-8192-33792-2-1-1-80-80-3-dtype0":...
true
PaddlePaddle/Paddle
79,119
issue_to_patch
[CI] Upgrade Linux-CPU and NPU CI to Python 3.10
### PR Category Environment Adaptation ### PR Types Deprecations ### Description 按 @SigureMo 的建议,单独把 Linux-CPU CI 从 Python 3.9 升级,并同步更新下游 Linux-NPU 消费 CPU wheel 的路径。 NPU 现有 CI 镜像只显式准备了 Python 3.9 / 3.10 相关依赖;本 PR 的目标是退掉 3.9,不强制升到 3.12。因此当前改为 Linux-CPU 与 Linux-NPU 统一使用 Python 3.10,继续使用现有 NPU 镜像。 主要改动: - `_Linux-CPU....
7ac7614c37f9cd21a8f6bb009ec857afa253aee7
50ad302f5da18f8ec0debb8e9bc7dfff6e6a9c90
diff --git a/.github/workflows/_Linux-CPU.yml b/.github/workflows/_Linux-CPU.yml index 91e2c6fec445ff..d54486e1430ee5 100644 --- a/.github/workflows/_Linux-CPU.yml +++ b/.github/workflows/_Linux-CPU.yml @@ -63,7 +63,7 @@ jobs: WITH_DISTRIBUTE: "ON" PREC_SUFFIX: .py3 WITH_UNITY_BUILD: "O...
[ ".github/workflows/_Linux-CPU.yml", ".github/workflows/_Linux-NPU.yml" ]
[ { "comment": "这个文件的改动是不是只应该是 3.9 -> 3.10 的改动,现在是否有一些没有必要的改动?", "path": ".github/workflows/_Linux-NPU.yml", "hunk": "", "resolving_sha": "50ad302f5da18f8ec0debb8e9bc7dfff6e6a9c90", "resolving_diff": "diff --git a/.github/workflows/_Linux-NPU.yml b/.github/workflows/_Linux-NPU.yml\nindex 6e143c106...
true
PaddlePaddle/Paddle
79,107
issue_to_patch
【Hackathon 10th Spring No.52】[CI] Update `Coverage` Python version to 3.12 in CI configuration and scripts - part 2
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
2665e9e6d263e7b022ab54cacc0cbafd7ae5b2d5
cbff14314b9c05c75ad02ee82be3767b945eb9b1
diff --git a/.github/workflows/Coverage.yml b/.github/workflows/Coverage.yml index d4e2786fa15a50..687e1d39be5421 100644 --- a/.github/workflows/Coverage.yml +++ b/.github/workflows/Coverage.yml @@ -109,7 +109,7 @@ jobs: WITH_FLAGCX: "ON" LITE_GIT_TAG: develop WITH_UNITY_BUILD: "ON" - ...
[ ".github/workflows/Coverage.yml", "ci/coverage_test.sh", "paddle/phi/kernels/fusion/gpu/block_multi_head_attention_kernel.cu", "paddle/phi/kernels/fusion/gpu/quant_dequant_kernel.h", "python/paddle/distributed/auto_parallel/process_mesh.py", "test/ai_edited_test/test_ai_amp_advanced.py", "test/ai_edited...
[ { "comment": "This change bumps Paddle's global CMake `PY_VERSION` default/minimum from 3.9 to 3.10, which is broader than the PR description (Coverage CI to py3.12) and conflicts with the current Python support contract elsewhere (e.g., `setup.py` enforces >=3.9 and docs list 3.9 support). As-is, builds config...
diff --git a/ci/coverage_test.sh b/ci/coverage_test.sh index dfd9abca4fac67..fed2ed0b3048c6 100644 --- a/ci/coverage_test.sh +++ b/ci/coverage_test.sh @@ -52,8 +52,9 @@ unset GREP_OPTIONS source $(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/utils.sh init -ln -sf $(which python3.9) /usr/local/bin/python -ln -sf $(wh...
true
PaddlePaddle/Paddle
79,275
issue_to_patch
[API Compatibility] Align torch.nn.attention.flex_attention.or_masks/and_masks
### PR Category User Experience ### PR Types New features ### Description - 新增 python/paddle/nn/attention/flex_attention.py - or_masks(*mask_mods):返回一个新 mask,结果是多个 mask 的逻辑 OR。 - and_masks(*mask_mods):返回一个新 mask,结果是多个 mask 的逻辑 AND。 - 入参非 callable 时按 PyTorch 抛 RuntimeError。 ### 是否引起精度变化 否 ...
8cacdfd15bc89296682c784df5b1685a7ca6e408
48788851973ac09bea02bdfa12a231a9846b8538
diff --git a/python/paddle/nn/attention/__init__.py b/python/paddle/nn/attention/__init__.py index ba0ae208316b33..dbc795783c277a 100644 --- a/python/paddle/nn/attention/__init__.py +++ b/python/paddle/nn/attention/__init__.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # l...
[ "python/paddle/nn/attention/__init__.py", "python/paddle/nn/attention/flex_attention.py", "test/legacy_test/test_api_compatibility_part2.py" ]
[ { "comment": "pir下也有new_zeros,这个是动静统一的", "path": "python/paddle/nn/attention/flex_attention.py", "hunk": "@@ -0,0 +1,130 @@\n+# Copyright (c) 2026 PaddlePaddle Authors. All Rights Reserved.\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except i...
diff --git a/test/legacy_test/test_api_compatibility_part2.py b/test/legacy_test/test_api_compatibility_part2.py index 4ce6d5c0f789cb..85b498f44de23d 100644 --- a/test/legacy_test/test_api_compatibility_part2.py +++ b/test/legacy_test/test_api_compatibility_part2.py @@ -19,6 +19,125 @@ import paddle +# Test flex_a...
true
PaddlePaddle/Paddle
79,267
issue_to_patch
[API Compatibility] Support `create_graph` in `paddle.Tensor.backward()` and `paddle.autograd.backward()`
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category User Experience ### PR Types Improvements ### Description <!-- Describe what you’ve done --> - Support param `create...
c3a820dbcb6b100fcd1cde032753521ebbf88831
709ce80565ad23ad50a36518a77ea73ab954f971
diff --git a/paddle/fluid/eager/backward.cc b/paddle/fluid/eager/backward.cc index f0ace4b0fe828..7ea5bdb003f3e 100644 --- a/paddle/fluid/eager/backward.cc +++ b/paddle/fluid/eager/backward.cc @@ -746,6 +746,7 @@ std::vector<paddle::Tensor> RunBackward( void Backward(const std::vector<paddle::Tensor>& tensors, // out...
[ "paddle/fluid/eager/backward.cc", "paddle/fluid/eager/backward.h", "paddle/fluid/pybind/eager_functions.cc", "python/paddle/autograd/backward_mode.py", "python/paddle/base/dygraph/tensor_patch_methods.py", "test/legacy_test/test_backward.py" ]
[ { "comment": "**🟡 建议** 新增 `create_graph` 公开参数后,docstring 的 `Args` 段仍只说明到 `retain_graph`,没有描述 `create_graph` 的语义、默认值以及和 `retain_graph` 的关系。\n\n`paddle.grad` 已经在文档中说明 `create_graph` 用于构建梯度计算图、支持高阶导数;这里是同类公开入口,缺文档会让生成的 API 文档和用户可见签名不一致。\n\n建议修复方式:\n在 `Args` 中补充 `create_graph(bool, optional)`,说明 `True` 时会构建反向计算过程的...
diff --git a/test/legacy_test/test_backward.py b/test/legacy_test/test_backward.py index 05fdb572c79de..9f18de07f9270 100644 --- a/test/legacy_test/test_backward.py +++ b/test/legacy_test/test_backward.py @@ -101,6 +101,175 @@ def test_strip_grad_suffix(self): self.assertEqual(backward._strip_grad_suffix_(...
true
PaddlePaddle/Paddle
79,259
issue_to_patch
acc paddle.sqrt
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
9d69b2f2501224aff7c69fb7204cd4e8281ec740
14247c71999fbbcff6c9b18a143e36ecb50d9b00
diff --git a/paddle/phi/kernels/funcs/activation_functor.h b/paddle/phi/kernels/funcs/activation_functor.h index 78bec8faa5185a..fd03b6a9e6483a 100644 --- a/paddle/phi/kernels/funcs/activation_functor.h +++ b/paddle/phi/kernels/funcs/activation_functor.h @@ -4608,7 +4608,7 @@ struct CudaRsqrtFunctor<ComplexType<T>> ...
[ "paddle/phi/kernels/funcs/activation_functor.h", "paddle/phi/kernels/gpu/activation_grad_kernel.cu" ]
[ { "comment": "用FLAGS_use_accuracy_compatible_kernel控制一下吧~", "path": "paddle/phi/kernels/funcs/activation_functor.h", "hunk": "@@ -4610,15 +4610,12 @@ struct CudaRsqrtFunctor<ComplexType<T>>\n \n template <typename T>\n struct CudaRsqrtGradFunctor : public BaseActivationFunctor<T> {\n- using MT = typena...
true
PaddlePaddle/Paddle
79,305
issue_to_patch
[Operator Mechanism] Add uint32 max enforce helper
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
4ce8ac4a365da4acdff66a9004fc9bc1596b739e
9b122fc85fc4f9131b22536f5156affcef5aa820
diff --git a/paddle/common/enforce.h b/paddle/common/enforce.h index 430f9ab575df08..fa23e810733413 100644 --- a/paddle/common/enforce.h +++ b/paddle/common/enforce.h @@ -17,6 +17,7 @@ #ifdef __GNUC__ #include <cxxabi.h> // for __cxa_demangle #endif // __GNUC__ +#include <cinttypes> #include <excepti...
[ "paddle/common/enforce.h" ]
[ { "comment": "**🟡 建议** 这个公共 helper 当前没有限制整数类型,后续误传 `double` / `float` 时会先做整数转换。\n\n`std::is_signed<double>` 为 true,负数错误分支会在格式化时执行 `static_cast<int64_t>(var)`;上界分支也会先执行 `static_cast<uint64_t>(__var)` 再比较。对 NaN 或超出目标整数表示范围的浮点值,这个转换本身就可能触发未定义行为;对 `1.5` 这类值还会先截断后通过检查,和 `fit in uint32_t` 的语义不一致。\n\n建议把宏限定为整数输入,例如对 ...
true
PaddlePaddle/Paddle
79,305
comment_to_fix
[Operator Mechanism] Add uint32 max enforce helper
**🟡 建议** 这个公共 helper 当前没有限制整数类型,后续误传 `double` / `float` 时会先做整数转换。 `std::is_signed<double>` 为 true,负数错误分支会在格式化时执行 `static_cast<int64_t>(var)`;上界分支也会先执行 `static_cast<uint64_t>(__var)` 再比较。对 NaN 或超出目标整数表示范围的浮点值,这个转换本身就可能触发未定义行为;对 `1.5` 这类值还会先截断后通过检查,和 `fit in uint32_t` 的语义不一致。 建议把宏限定为整数输入,例如对 `std::decay_t<decltype(__v...
4ce8ac4a365da4acdff66a9004fc9bc1596b739e
9b122fc85fc4f9131b22536f5156affcef5aa820
diff --git a/paddle/common/enforce.h b/paddle/common/enforce.h index 430f9ab575df08..fa23e810733413 100644 --- a/paddle/common/enforce.h +++ b/paddle/common/enforce.h @@ -17,6 +17,7 @@ #ifdef __GNUC__ #include <cxxabi.h> // for __cxa_demangle #endif // __GNUC__ +#include <cinttypes> #include <excepti...
[ "paddle/common/enforce.h" ]
[ { "comment": "**🟡 建议** 这个公共 helper 当前没有限制整数类型,后续误传 `double` / `float` 时会先做整数转换。\n\n`std::is_signed<double>` 为 true,负数错误分支会在格式化时执行 `static_cast<int64_t>(var)`;上界分支也会先执行 `static_cast<uint64_t>(__var)` 再比较。对 NaN 或超出目标整数表示范围的浮点值,这个转换本身就可能触发未定义行为;对 `1.5` 这类值还会先截断后通过检查,和 `fit in uint32_t` 的语义不一致。\n\n建议把宏限定为整数输入,例如对 ...
true
PaddlePaddle/Paddle
79,305
comment_to_fix
[Operator Mechanism] Add uint32 max enforce helper
**🟡 建议** 这里在 inline helper 函数里直接 `PADDLE_THROW`,负数输入的报错位置会固定到 `paddle/common/enforce.h`,而不是 `PADDLE_ENFORCE_LE_UINT32_MAX` 的实际调用点。 `PADDLE_THROW` 展开时使用的是当前函数定义处的 `__FILE__` / `__LINE__`;我用预处理展开验证,`PADDLE_ENFORCE_LE_UINT32_MAX(x, "x")` 的负数分支会生成 `EnforceNotMet(..., "paddle/common/enforce.h", 359)`,而上界检查分支才会保留调用点。这样后续算子...
4ce8ac4a365da4acdff66a9004fc9bc1596b739e
9b122fc85fc4f9131b22536f5156affcef5aa820
diff --git a/paddle/common/enforce.h b/paddle/common/enforce.h index 430f9ab575df08..fa23e810733413 100644 --- a/paddle/common/enforce.h +++ b/paddle/common/enforce.h @@ -17,6 +17,7 @@ #ifdef __GNUC__ #include <cxxabi.h> // for __cxa_demangle #endif // __GNUC__ +#include <cinttypes> #include <excepti...
[ "paddle/common/enforce.h" ]
[ { "comment": "**🟡 建议** 这里在 inline helper 函数里直接 `PADDLE_THROW`,负数输入的报错位置会固定到 `paddle/common/enforce.h`,而不是 `PADDLE_ENFORCE_LE_UINT32_MAX` 的实际调用点。\n\n`PADDLE_THROW` 展开时使用的是当前函数定义处的 `__FILE__` / `__LINE__`;我用预处理展开验证,`PADDLE_ENFORCE_LE_UINT32_MAX(x, \"x\")` 的负数分支会生成 `EnforceNotMet(..., \"paddle/common/enforce.h\",...
true
PaddlePaddle/Paddle
79,270
issue_to_patch
Assert headdim == headdim_v in fa2, fm1, fm3 kernels
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
4ce8ac4a365da4acdff66a9004fc9bc1596b739e
5a4875511d708f52fea3ad00f283fcd5475801b8
diff --git a/paddle/phi/kernels/gpu/flash_attn_grad_kernel.cu b/paddle/phi/kernels/gpu/flash_attn_grad_kernel.cu index 31f56972ff0ba8..206768dfef2f77 100644 --- a/paddle/phi/kernels/gpu/flash_attn_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/flash_attn_grad_kernel.cu @@ -243,7 +243,7 @@ void FlashAttnUnpaddedGradBaseKer...
[ "paddle/phi/kernels/gpu/flash_attn_grad_kernel.cu", "paddle/phi/kernels/gpu/flash_attn_kernel.cu", "paddle/phi/kernels/gpu/flash_attn_v3_grad_kernel.cu", "test/test_flashmask_ci/test_flashmask_ci.py" ]
[ { "comment": "**🔴 Bug** 这里只在 padded `FlashAttnBaseKernel` 中校验了 `q` 和 `v` 的 head dim,`flash_attn_unpadded` 仍会漏过同样的非法输入。\n\n`flash_attn_unpadded` 在同文件的 `FlashAttnUnpaddedBaseKernel` 直接接收独立的 `q/k/v`,并把 `q.dims()[2]` 作为 `params.head_size` 传给 `flash_attn_varlen_fwd`;Python wrapper 也允许用户分别传 `query/key/value`。因此 `v.d...
diff --git a/test/test_flashmask_ci/test_flashmask_ci.py b/test/test_flashmask_ci/test_flashmask_ci.py index 5704c330837ac1..9b0bc0fb2812df 100644 --- a/test/test_flashmask_ci/test_flashmask_ci.py +++ b/test/test_flashmask_ci/test_flashmask_ci.py @@ -261,3 +261,192 @@ def test_flashmask( assert (v.grad - v_ref.gra...
true
PaddlePaddle/Paddle
79,272
issue_to_patch
[Allocator] Add generic all block info API
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
83c656a73c4cede65b9107826d4fc3c153e688be
ae76453b0bd2a4b39adefdbf04a17eb24975a9c6
diff --git a/paddle/fluid/pybind/pybind.cc b/paddle/fluid/pybind/pybind.cc index ef3d512cf882ff..eeea571f8cebc9 100644 --- a/paddle/fluid/pybind/pybind.cc +++ b/paddle/fluid/pybind/pybind.cc @@ -3787,8 +3787,11 @@ All parameter, weight, gradient are variables in Paddle. m.def("vmm_free_block_info", [](int device_id)...
[ "paddle/fluid/pybind/pybind.cc", "paddle/phi/core/memory/allocation/auto_growth_best_fit_allocator.h", "paddle/phi/core/memory/mem_utils.cc", "paddle/phi/core/memory/mem_utils.h", "paddle/phi/core/memory/mem_visitor.cc", "paddle/phi/core/memory/mem_visitor.h", "python/paddle/device/cuda/memory_analyzer....
[ { "comment": "**🔴 兼容性** 这里直接把已导出的 `AllBlockInfoOfVmmAllocator` 声明替换成新名字,会删除旧 C++ 符号。\n\n`AllBlockInfoOfVmmAllocator` 原来是 `PADDLE_API` 声明,`pybind` 之外的 C++ 调用方或外部工具如果包含 `mem_utils.h`,升级后会编译或链接失败;Python 侧虽然保留了 `vmm_all_block_info` 别名,但 C++ 侧没有同等兼容层。\n\n建议保留旧函数作为 wrapper:在头文件继续声明 `AllBlockInfoOfVmmAllocator`,在实现中让...
diff --git a/test/cpp/fluid/memory/allocator_visitor_test.cc b/test/cpp/fluid/memory/allocator_visitor_test.cc index 1df632e3b1eac4..91c9dce4f59800 100644 --- a/test/cpp/fluid/memory/allocator_visitor_test.cc +++ b/test/cpp/fluid/memory/allocator_visitor_test.cc @@ -12,6 +12,8 @@ // See the License for the specific la...
true
PaddlePaddle/Paddle
79,292
issue_to_patch
align kaiming uniform and gaussian with torch
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
9d69b2f2501224aff7c69fb7204cd4e8281ec740
61f4381eace4b5c22b14ce25515b301c67787947
diff --git a/paddle/fluid/ir_adaptor/translator/op_translator.cc b/paddle/fluid/ir_adaptor/translator/op_translator.cc index 64faa56652095..1d8d519717fda 100644 --- a/paddle/fluid/ir_adaptor/translator/op_translator.cc +++ b/paddle/fluid/ir_adaptor/translator/op_translator.cc @@ -4196,6 +4196,43 @@ struct Pad3dOpTransc...
[ "paddle/fluid/ir_adaptor/translator/op_translator.cc", "paddle/fluid/pir/serialize_deserialize/patch/4.yaml", "paddle/phi/infermeta/nullary.cc", "paddle/phi/infermeta/nullary.h", "paddle/phi/kernels/cpu/gaussian_kernel.cc", "paddle/phi/kernels/gaussian_kernel.h", "paddle/phi/kernels/gpu/gaussian_kernel....
[ { "comment": "**🔴 Bug** CPU `gaussian` 仍会把 double 参数截断成 float。\n\n本 PR 将 `GaussianKernel` 签名改成 `double mean/std`,但这里马上 `static_cast<float>` 传给 `NormalDistribution`。该 helper 的通用版本和 `complex128` 特化参数也都是 `const float&`,所以 `dtype=float64`/`complex128` 在 CPU 上仍按 float32 的 `mean/std` 构造分布,PR 目标里的 double 精度不会生效。\n\n建...
true
PaddlePaddle/Paddle
79,301
issue_to_patch
[CodeStyle] Clean up Python 3.9 SOT C++ compatibility code
### PR Category Execute Infrastructure ### PR Types Improvements ### Description Paddle now requires Python >= 3.10, so the SOT C++ pybind code no longer needs Python 3.9 compatibility helpers. This PR cleans up `paddle/fluid/pybind/sot` by: - removing the unused `PY_3_9_0_HEX` and `PY_3_9_PLUS` macros; - simplifyin...
38248622c5716a6900aaea7322667bf0ab233f26
cd48e6a1388b3fce263d7e8c31c1da7d27aec1bb
diff --git a/paddle/fluid/pybind/sot/guards.cc b/paddle/fluid/pybind/sot/guards.cc index 93fe4ad424d2e7..c7c5167dbfcdb9 100644 --- a/paddle/fluid/pybind/sot/guards.cc +++ b/paddle/fluid/pybind/sot/guards.cc @@ -27,10 +27,6 @@ limitations under the License. */ #include <internal/pycore_interpframe.h> #endif -#if !PY...
[ "paddle/fluid/pybind/sot/guards.cc", "paddle/fluid/pybind/sot/macros.h" ]
[ { "comment": "这是为啥?因为触发了检查?#79300 已经移除了这个检查,恢复这里的改动,并 merge 最新的 develop", "path": "ci/coverage_info.sh", "hunk": "@@ -159,6 +159,7 @@ function gen_full_report() {\n \"${PADDLE_ROOT}/paddle/fluid/inference/*\" \\\n \"${PADDLE_ROOT}/paddle/fluid/memory/*\" \\\n \"${PADDLE_ROOT}/pad...
true
PaddlePaddle/Paddle
79,285
issue_to_patch
[Release/3.4][Operator] cherry-pick mm out_dtype dynamic path
### PR Category Operator Mechanism ### PR Types Improvements ### Description 该 PR 基于 release/3.4 手动完整 cherry-pick develop PR #79252 中的 `paddle.mm` dynamic-only `out_dtype` 改动,用于替代自动 cherry-pick PR #79282 中 CI 暴露的问题。 主要内容: - 为动态图 `paddle.mm` 增加临时最小 `out_dtype` 支持,仅支持 CUDA 2-D BF16 x BF16 -> FP32。 - 保持静态图/P...
6627d52e102c596b610068b15a8c319a28e99205
2f4528c34436aebc65850ef2742fbf9cf048ef4f
diff --git a/paddle/phi/infermeta/binary.cc b/paddle/phi/infermeta/binary.cc index d06657173568df..9ee8d920eb2d58 100644 --- a/paddle/phi/infermeta/binary.cc +++ b/paddle/phi/infermeta/binary.cc @@ -3170,6 +3170,60 @@ void MatmulInferMeta(const MetaTensor& x, out->share_lod(x); } +void MmOutDtypeInferMeta(const M...
[ "paddle/phi/infermeta/binary.cc", "paddle/phi/infermeta/binary.h", "paddle/phi/kernels/funcs/blas/blas.h", "paddle/phi/kernels/funcs/blas/blas_impl.cu.h", "paddle/phi/kernels/gpu/matmul_kernel.cu", "paddle/phi/kernels/impl/matmul_kernel_impl.h", "paddle/phi/kernels/matmul_kernel.h", "paddle/phi/ops/ya...
[]
diff --git a/test/legacy_test/test_mm_out.py b/test/legacy_test/test_mm_out.py index 3e9f2cceff5e7b..6677f04eb65b4d 100644 --- a/test/legacy_test/test_mm_out.py +++ b/test/legacy_test/test_mm_out.py @@ -174,5 +174,92 @@ def test_2d_1d(self): ) +class TestMmOutDtypeDynamicOnly(unittest.TestCase): + def s...
true
PaddlePaddle/Paddle
79,283
issue_to_patch
[release/3.4] fix add_n 0-size bug
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
6627d52e102c596b610068b15a8c319a28e99205
4ed3607a07f013e0122bedde3482aeaf54104438
diff --git a/paddle/phi/infermeta/multiary.cc b/paddle/phi/infermeta/multiary.cc index ac98369145405..a2d8336ef397c 100644 --- a/paddle/phi/infermeta/multiary.cc +++ b/paddle/phi/infermeta/multiary.cc @@ -406,6 +406,7 @@ void AddNInferMeta(const std::vector<const MetaTensor*>& x, } bool is_all_0d_tensor = true; ...
[ "paddle/phi/infermeta/multiary.cc", "test/legacy_test/test_add_n_op.py" ]
[]
diff --git a/test/legacy_test/test_add_n_op.py b/test/legacy_test/test_add_n_op.py index ceb89af53dc55..74cbcf5bad07a 100644 --- a/test/legacy_test/test_add_n_op.py +++ b/test/legacy_test/test_add_n_op.py @@ -119,5 +119,17 @@ def test_add_n_zerosize(self): np.testing.assert_allclose(x_g_np_32[i].shape, [0,...
true
PaddlePaddle/Paddle
79,300
issue_to_patch
[CI] Keep gcov tool selection only
### PR Category Execute Infrastructure ### PR Types Bug fixes ### Description 本 PR 调整 Coverage 脚本,保留 #79263 中用于解决 GCC/gcov 主版本不一致的 `GCOV_TOOL` 搜索和 `lcov --gcov-tool` 显式选择逻辑,但撤回基于 `.c/.cc/.cpp/.cxx/.cu` 文件变更强制要求 C++ `coverage-diff.info`/`DA:` 的检查,以及 #79274 为该检查补充的 diff filtering wrapper。 现阶段不适合继续加这个校验:Coverage CI 跑的是...
6e6b2ee3ccb4ca96a5b1802cdd7eb2c30d47e8ab
c2109500acaffbb9e863d2e7a8bdce7fcf5968b6
diff --git a/ci/coverage_info.sh b/ci/coverage_info.sh index 8c80c63557398e..19ab52f9579088 100644 --- a/ci/coverage_info.sh +++ b/ci/coverage_info.sh @@ -90,54 +90,6 @@ function init_gcov_tool() { fi } -function pr_has_cpp_source_changes() { - local diff_file="$1" - - awk ' - index($0, "+++ ") == ...
[ "ci/coverage_info.sh" ]
[ { "comment": "`coverage_info.sh` runs with `set +e`, so failures from `coverage_pull_request.py` here will be silently ignored and the script may continue with an empty `COVERAGE_DIFF_PATTERN` / missing `git-diff.out`, producing incorrect (often empty) diff coverage outputs. Please restore explicit error handli...
true
PaddlePaddle/Paddle
79,291
issue_to_patch
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
### PR Category Environment Adaptation ### PR Types Deprecations ### Description Related to #79289 and #79290. This PR cleans Python 3.10 type-hint modernization diagnostics and enables Ruff's Python 3.10 target: - merge latest `develop` after #79289/#79290 and resolve the resulting conflict without force-push - ...
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/pyproject.toml b/pyproject.toml index 29ce1c5ca4b28c..7137ed71bc29a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ exclude = [ "./python/paddle/utils/gast/**", ] line-length = 80 -target-version = "py39" +target-version = "py310" [tool.ruff.format] # Prevent change to double q...
[ "pyproject.toml", "python/paddle/_ops.py", "python/paddle/_typing/basic.py", "python/paddle/_typing/device_like.py", "python/paddle/_typing/dtype_like.py", "python/paddle/_typing/layout.py", "python/paddle/_typing/shape.py", "python/paddle/amp/auto_cast.py", "python/paddle/amp/debugging.py", "pyth...
[ { "comment": "这里还得测 `Optional[torch.device]`,至少在我们支持 Python 3.10 的时候还需要支持这种 case,可以记一个 TODO,将来不支持 3.10 的时候可以清理掉这块代码", "path": "test/compat/test_torch_proxy.py", "hunk": "@@ -185,15 +185,13 @@ def test_fake_interface(self):\n class TestDeviceAsTypeHints(unittest.TestCase):\n @paddle.use_compat_guard(...
diff --git a/test/compat/test_torch_proxy.py b/test/compat/test_torch_proxy.py index 82f8e6fb155035..57e607c945db79 100644 --- a/test/compat/test_torch_proxy.py +++ b/test/compat/test_torch_proxy.py @@ -15,6 +15,7 @@ import pathlib import sys import unittest +from typing import Optional from unittest.mock import Ma...
true
PaddlePaddle/Paddle
79,291
comment_to_fix
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
这里还得测 `Optional[torch.device]`,至少在我们支持 Python 3.10 的时候还需要支持这种 case,可以记一个 TODO,将来不支持 3.10 的时候可以清理掉这块代码
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/test/compat/test_torch_proxy.py b/test/compat/test_torch_proxy.py index 82f8e6fb155035..57e607c945db79 100644 --- a/test/compat/test_torch_proxy.py +++ b/test/compat/test_torch_proxy.py @@ -15,6 +15,7 @@ import pathlib import sys import unittest +from typing import Optional from unittest.mock import Ma...
[ "test/compat/test_torch_proxy.py" ]
[ { "comment": "这里还得测 `Optional[torch.device]`,至少在我们支持 Python 3.10 的时候还需要支持这种 case,可以记一个 TODO,将来不支持 3.10 的时候可以清理掉这块代码", "path": "test/compat/test_torch_proxy.py", "hunk": "@@ -185,15 +185,13 @@ def test_fake_interface(self):\n class TestDeviceAsTypeHints(unittest.TestCase):\n @paddle.use_compat_guard(...
true
PaddlePaddle/Paddle
79,291
comment_to_fix
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
```suggestion [Any, FunctionGraph, Tracker], "VariableBase" | None ``` 只是一个疑问,是否可以 / 应该改成这样?
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/python/paddle/jit/sot/opcode_translator/executor/variables/base.py b/python/paddle/jit/sot/opcode_translator/executor/variables/base.py index f712bada5e88b4..9ffb81037f0867 100644 --- a/python/paddle/jit/sot/opcode_translator/executor/variables/base.py +++ b/python/paddle/jit/sot/opcode_translator/executor...
[ "python/paddle/jit/sot/opcode_translator/executor/variables/base.py" ]
[ { "comment": "```suggestion\n [Any, FunctionGraph, Tracker], \"VariableBase\" | None\n```\n\n只是一个疑问,是否可以 / 应该改成这样?", "path": "python/paddle/jit/sot/opcode_translator/executor/variables/base.py", "hunk": "@@ -64,7 +64,7 @@\n # Each variable object should implement a method called `from_value`,...
true
PaddlePaddle/Paddle
79,291
comment_to_fix
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
原来的注释可以看看怎么补充一下
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/python/paddle/device/cpu.py b/python/paddle/device/cpu.py index 955dbf2bd8f7f6..d47f96aa6850aa 100644 --- a/python/paddle/device/cpu.py +++ b/python/paddle/device/cpu.py @@ -14,9 +14,7 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Union - -from typing_extensions import TypeA...
[ "python/paddle/device/cpu.py" ]
[ { "comment": "原来的注释可以看看怎么补充一下", "path": "python/paddle/device/cpu.py", "hunk": "@@ -30,11 +28,7 @@\n if TYPE_CHECKING:\n from paddle import CPUPlace\n \n- _CPUPlaceLike: TypeAlias = Union[\n- CPUPlace,\n- str, # some string like \"iluvatar_gpu\" \"metax_gpu:0\", etc.\n- int,...
true
PaddlePaddle/Paddle
79,291
comment_to_fix
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
现在 RUF100 应该可以不用了吧
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/test/compat/test_torch_proxy.py b/test/compat/test_torch_proxy.py index 82f8e6fb155035..57e607c945db79 100644 --- a/test/compat/test_torch_proxy.py +++ b/test/compat/test_torch_proxy.py @@ -15,6 +15,7 @@ import pathlib import sys import unittest +from typing import Optional from unittest.mock import Ma...
[ "test/compat/test_torch_proxy.py" ]
[ { "comment": "现在 RUF100 应该可以不用了吧", "path": "test/compat/test_torch_proxy.py", "hunk": "@@ -185,15 +186,17 @@ def test_fake_interface(self):\n class TestDeviceAsTypeHints(unittest.TestCase):\n @paddle.use_compat_guard()\n def test_device_as_type_hints(self):\n- from typing import Optional\...
true
PaddlePaddle/Paddle
79,291
comment_to_fix
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
和上面的一样,你保留下注释吧
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/python/paddle/device/cuda/__init__.py b/python/paddle/device/cuda/__init__.py index e61d537a71daff..4abda00c0dd28e 100644 --- a/python/paddle/device/cuda/__init__.py +++ b/python/paddle/device/cuda/__init__.py @@ -14,9 +14,7 @@ from __future__ import annotations import os -from typing import TYPE_CHECK...
[ "python/paddle/device/cuda/__init__.py" ]
[ { "comment": "和上面的一样,你保留下注释吧", "path": "python/paddle/device/cuda/__init__.py", "hunk": "@@ -29,12 +27,7 @@\n from paddle import CUDAPlace, CustomPlace\n from paddle.base.libpaddle import _gpuDeviceProperties\n \n- _CudaPlaceLike: TypeAlias = Union[\n- CUDAPlace,\n- CustomPlace,...
true
PaddlePaddle/Paddle
79,291
comment_to_fix
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
这里也保留下注释
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/python/paddle/device/xpu/__init__.py b/python/paddle/device/xpu/__init__.py index 9a47dcb07cd8b5..6c915473bcee54 100644 --- a/python/paddle/device/xpu/__init__.py +++ b/python/paddle/device/xpu/__init__.py @@ -13,9 +13,7 @@ # limitations under the License. from __future__ import annotations -from typin...
[ "python/paddle/device/xpu/__init__.py" ]
[ { "comment": "这里也保留下注释", "path": "python/paddle/device/xpu/__init__.py", "hunk": "@@ -27,11 +25,7 @@\n from paddle import XPUPlace\n from paddle.base.libpaddle import _gpuDeviceProperties\n \n- _XPUPlaceLike: TypeAlias = Union[\n- XPUPlace,\n- str, # some str like 'xpu:0', 'xpu...
true
PaddlePaddle/Paddle
79,291
comment_to_fix
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
这里也
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/python/paddle/device/__init__.py b/python/paddle/device/__init__.py index 1a845df1fdb1b7..067e4fa030f44a 100644 --- a/python/paddle/device/__init__.py +++ b/python/paddle/device/__init__.py @@ -22,9 +22,7 @@ import sys import types from contextlib import contextmanager -from typing import TYPE_CHECKING,...
[ "python/paddle/device/__init__.py" ]
[ { "comment": "这里也", "path": "python/paddle/device/__init__.py", "hunk": "@@ -63,22 +61,13 @@\n from paddle._typing.device_like import PlaceLike\n from paddle.base.core import Place\n \n- _InitStreamBase = Union[\n- core.CUDAStream, core.CustomDeviceStream, core.XPUStream\n- ]\n- ...
true
PaddlePaddle/Paddle
79,291
comment_to_fix
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
对对对,前面的,就像这样保留下
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/python/paddle/device/cpu.py b/python/paddle/device/cpu.py index 955dbf2bd8f7f6..d47f96aa6850aa 100644 --- a/python/paddle/device/cpu.py +++ b/python/paddle/device/cpu.py @@ -14,9 +14,7 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Union - -from typing_extensions import TypeA...
[ "python/paddle/device/cpu.py" ]
[ { "comment": "对对对,前面的,就像这样保留下", "path": "python/paddle/device/cpu.py", "hunk": "@@ -30,11 +28,11 @@\n if TYPE_CHECKING:\n from paddle import CPUPlace\n \n- _CPUPlaceLike: TypeAlias = Union[\n- CPUPlace,\n- str, # some string like \"iluvatar_gpu\" \"metax_gpu:0\", etc.\n- int...
true
PaddlePaddle/Paddle
79,291
comment_to_fix
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
这里也
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/python/paddle/device/custom_device.py b/python/paddle/device/custom_device.py index 161c6c2646138f..3b9cb73a22cfc8 100644 --- a/python/paddle/device/custom_device.py +++ b/python/paddle/device/custom_device.py @@ -13,9 +13,7 @@ # limitations under the License. from __future__ import annotations -from t...
[ "python/paddle/device/custom_device.py" ]
[ { "comment": "这里也", "path": "python/paddle/device/custom_device.py", "hunk": "@@ -30,11 +28,7 @@\n if TYPE_CHECKING:\n from paddle import CustomPlace\n \n- _CustomPlaceLike: TypeAlias = Union[\n- CustomPlace,\n- str, # some string like \"iluvatar_gpu\" \"metax_gpu:0\", etc.\n- ...
true
PaddlePaddle/Paddle
79,291
comment_to_fix
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
这里也别改人家代码语义啊,这不合理啊,如果是我们类型上哪里有问题,就补全,如果实在不行,就 ignore
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/python/paddle/distribution/uniform.py b/python/paddle/distribution/uniform.py index 474ab7b0521f40..7ab12661b75bcb 100644 --- a/python/paddle/distribution/uniform.py +++ b/python/paddle/distribution/uniform.py @@ -28,20 +28,18 @@ if TYPE_CHECKING: from collections.abc import Sequence - from typi...
[ "python/paddle/distribution/uniform.py" ]
[ { "comment": "这里也别改人家代码语义啊,这不合理啊,如果是我们类型上哪里有问题,就补全,如果实在不行,就 ignore", "path": "python/paddle/distribution/uniform.py", "hunk": "@@ -91,8 +91,8 @@ class Uniform(distribution.Distribution):\n >>> u2 = Uniform(low=[1.0, 2.0], high=[3.0, 4.0])\n >>> # 4 distributions\n >>>...
true
PaddlePaddle/Paddle
79,291
comment_to_fix
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
现在是不会认为 `dtype` 是 literal 了吗?不建议改用法哈
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/python/paddle/amp/debugging.py b/python/paddle/amp/debugging.py index 5c158e1906dddb..a24cb6a9b822d0 100644 --- a/python/paddle/amp/debugging.py +++ b/python/paddle/amp/debugging.py @@ -19,7 +19,6 @@ from typing import ( TYPE_CHECKING, Any, - Callable, TypeVar, ) @@ -33,7 +32,7 @@ fr...
[ "python/paddle/amp/debugging.py" ]
[ { "comment": "现在是不会认为 `dtype` 是 literal 了吗?不建议改用法哈", "path": "python/paddle/amp/debugging.py", "hunk": "@@ -103,7 +103,7 @@ def check_layer_numerics(\n ... def forward(self, x):\n ... # return 1/x * self._w + self._b open it you will see the error log\n ...
true
PaddlePaddle/Paddle
79,291
comment_to_fix
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
这里可以改
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/python/paddle/vision/datasets/mnist.py b/python/paddle/vision/datasets/mnist.py index a8fba2c7b0fe7f..4c672ad0c42106 100644 --- a/python/paddle/vision/datasets/mnist.py +++ b/python/paddle/vision/datasets/mnist.py @@ -64,6 +64,7 @@ class MNIST(Dataset[tuple["_ImageDataType", "npt.NDArray[np.int64]"]]): ...
[ "python/paddle/vision/datasets/mnist.py" ]
[ { "comment": "这里可以改", "path": "python/paddle/vision/datasets/mnist.py", "hunk": "", "resolving_sha": "72e139da04d615705fb44b93d329af59b1ffaed8", "resolving_diff": "diff --git a/python/paddle/vision/datasets/mnist.py b/python/paddle/vision/datasets/mnist.py\nindex a8fba2c7b0fe7f..4c672ad0c42106 1...
true
PaddlePaddle/Paddle
79,291
comment_to_fix
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
这个也可以改
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/python/paddle/vision/datasets/voc2012.py b/python/paddle/vision/datasets/voc2012.py index be7b8636e46080..3f84c8f3741f01 100644 --- a/python/paddle/vision/datasets/voc2012.py +++ b/python/paddle/vision/datasets/voc2012.py @@ -75,6 +75,7 @@ class VOC2012(Dataset[tuple["_ImageDataType", "npt.NDArray[Any]"]])...
[ "python/paddle/vision/datasets/voc2012.py" ]
[ { "comment": "这个也可以改", "path": "python/paddle/vision/datasets/voc2012.py", "hunk": "", "resolving_sha": "72e139da04d615705fb44b93d329af59b1ffaed8", "resolving_diff": "diff --git a/python/paddle/vision/datasets/voc2012.py b/python/paddle/vision/datasets/voc2012.py\nindex be7b8636e46080..3f84c8f37...
true
PaddlePaddle/Paddle
79,291
comment_to_fix
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
这个可以改
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/python/paddle/vision/datasets/mnist.py b/python/paddle/vision/datasets/mnist.py index a8fba2c7b0fe7f..4c672ad0c42106 100644 --- a/python/paddle/vision/datasets/mnist.py +++ b/python/paddle/vision/datasets/mnist.py @@ -64,6 +64,7 @@ class MNIST(Dataset[tuple["_ImageDataType", "npt.NDArray[np.int64]"]]): ...
[ "python/paddle/vision/datasets/mnist.py" ]
[ { "comment": "这个可以改", "path": "python/paddle/vision/datasets/mnist.py", "hunk": "", "resolving_sha": "72e139da04d615705fb44b93d329af59b1ffaed8", "resolving_diff": "diff --git a/python/paddle/vision/datasets/mnist.py b/python/paddle/vision/datasets/mnist.py\nindex a8fba2c7b0fe7f..4c672ad0c42106 1...
true
PaddlePaddle/Paddle
79,291
comment_to_fix
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
datasets 的改动我觉得没问题
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/python/paddle/vision/datasets/cifar.py b/python/paddle/vision/datasets/cifar.py index 700efdfd3f6851..a9513c3901ab73 100644 --- a/python/paddle/vision/datasets/cifar.py +++ b/python/paddle/vision/datasets/cifar.py @@ -94,6 +94,7 @@ class Cifar10(Dataset[tuple["_ImageDataType", "npt.NDArray[Any]"]]): ...
[ "python/paddle/vision/datasets/cifar.py" ]
[ { "comment": "datasets 的改动我觉得没问题", "path": "python/paddle/vision/datasets/cifar.py", "hunk": "", "resolving_sha": "72e139da04d615705fb44b93d329af59b1ffaed8", "resolving_diff": "diff --git a/python/paddle/vision/datasets/cifar.py b/python/paddle/vision/datasets/cifar.py\nindex 700efdfd3f6851..a95...
true
PaddlePaddle/Paddle
79,291
comment_to_fix
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
可以考虑 ignore,这种写法对用户来说并不友好
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/python/paddle/amp/debugging.py b/python/paddle/amp/debugging.py index 5c158e1906dddb..a24cb6a9b822d0 100644 --- a/python/paddle/amp/debugging.py +++ b/python/paddle/amp/debugging.py @@ -19,7 +19,6 @@ from typing import ( TYPE_CHECKING, Any, - Callable, TypeVar, ) @@ -33,7 +32,7 @@ fr...
[ "python/paddle/amp/debugging.py" ]
[ { "comment": "可以考虑 ignore,这种写法对用户来说并不友好", "path": "python/paddle/amp/debugging.py", "hunk": "@@ -103,7 +104,7 @@ def check_layer_numerics(\n ... def forward(self, x):\n ... # return 1/x * self._w + self._b open it you will see the error log\n ... ...
true
PaddlePaddle/Paddle
79,291
comment_to_fix
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
ignore
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/python/paddle/incubate/jit/inference_decorator.py b/python/paddle/incubate/jit/inference_decorator.py index de4cb2833c3f43..ca6803f9b111bd 100644 --- a/python/paddle/incubate/jit/inference_decorator.py +++ b/python/paddle/incubate/jit/inference_decorator.py @@ -20,7 +20,7 @@ import textwrap import warnin...
[ "python/paddle/incubate/jit/inference_decorator.py" ]
[ { "comment": "ignore", "path": "python/paddle/incubate/jit/inference_decorator.py", "hunk": "@@ -610,7 +611,7 @@ def inference(\n \n >>> batch = 4096\n >>> hidd = 1024\n- >>> dtype = paddle.bfloat16\n+ >>> dtype: Literal[\"bfloat16\"] = \"bfloat16\"", "r...
true
PaddlePaddle/Paddle
79,291
comment_to_fix
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
```suggestion >>> label = paddle.randint(low=0, high=int(num_classes.item()), size=[batch_size], dtype='int64') # type: ignore[call-overload, arg-type] ```
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/python/paddle/nn/functional/common.py b/python/paddle/nn/functional/common.py index 2b2e4d31c37ea0..3a8ad6c07caa18 100644 --- a/python/paddle/nn/functional/common.py +++ b/python/paddle/nn/functional/common.py @@ -50,8 +50,7 @@ if TYPE_CHECKING: from collections.abc import Sequence - - from typi...
[ "python/paddle/nn/functional/common.py" ]
[ { "comment": "```suggestion\n >>> label = paddle.randint(low=0, high=int(num_classes.item()), size=[batch_size], dtype='int64') # type: ignore[call-overload, arg-type]\n```", "path": "python/paddle/nn/functional/common.py", "hunk": "@@ -2767,7 +2766,7 @@ class centers and the shape of sampled_cl...
true
PaddlePaddle/Paddle
79,291
comment_to_fix
[CodeStyle] Clean up Python 3.10 type-hint diagnostics
```suggestion >>> label = paddle.randint(low=0, high=int(num_classes.item()), size=[batch_size], dtype='int64') # type: ignore[call-overload, arg-type] ```
83c656a73c4cede65b9107826d4fc3c153e688be
72e139da04d615705fb44b93d329af59b1ffaed8
diff --git a/python/paddle/nn/functional/loss.py b/python/paddle/nn/functional/loss.py index f7de9a16718576..2de571f8587169 100644 --- a/python/paddle/nn/functional/loss.py +++ b/python/paddle/nn/functional/loss.py @@ -35,8 +35,8 @@ from ...tensor.manipulation import reshape if TYPE_CHECKING: - from collections....
[ "python/paddle/nn/functional/loss.py" ]
[ { "comment": "```suggestion\n >>> label = paddle.randint(low=0, high=int(num_classes.item()), size=[batch_size], dtype='int64') # type: ignore[call-overload, arg-type]\n```", "path": "python/paddle/nn/functional/loss.py", "hunk": "@@ -2530,7 +2530,7 @@ def margin_cross_entropy(\n ...
true
PaddlePaddle/Paddle
79,289
issue_to_patch
[Typing] Upgrade mypy to 2.1.0 and target Python 3.10
### PR Category User Experience ### PR Types Devs ### Description 本 PR 升级 Paddle 的 mypy 工具链配置,并修复 mypy 2.1.0 / Python 3.10 下暴露出的示例类型检查问题。 #### 1. mypy 版本与配置升级 原因:mypy 2.0 起不再支持 `--python-version 3.9`,因此升级 mypy 时需要同步提升类型检查目标版本。 - `python/unittest_py/requirements.txt`: `mypy==1.19.1` -> `mypy==2.1.0` -...
9d69b2f2501224aff7c69fb7204cd4e8281ec740
d690a2dfff35716e768e925a763e5898db9ae735
diff --git a/pyproject.toml b/pyproject.toml index f9abad63991ae..29ce1c5ca4b28 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -172,8 +172,9 @@ known-first-party = ["paddle"] "test/dygraph_to_static/seq2seq_dygraph_model.py" = ["RUF005"] [tool.mypy] -python_version = "3.9" +python_version = "3.10" cache_dir =...
[ "pyproject.toml", "python/paddle/base/framework.py", "python/paddle/distributed/communication/recv.py", "python/paddle/distributed/communication/send.py", "python/paddle/distributed/fleet/base/topology.py", "python/paddle/nn/functional/loss.py", "python/paddle/nn/initializer/assign.py", "python/paddle...
[ { "comment": "这注释没啥用啊,清理掉吧,另外你看看有没有啥选项自动匹配核心数的,如果没有就用 8 吧\n\n以及我们的 CI type_checking 脚本里加一下 worker 数自动匹配核心数的逻辑吧", "path": "pyproject.toml", "hunk": "@@ -172,8 +172,10 @@ known-first-party = [\"paddle\"]\n \"test/dygraph_to_static/seq2seq_dygraph_model.py\" = [\"RUF005\"]\n \n [tool.mypy]\n-python_version...
diff --git a/python/unittest_py/requirements.txt b/python/unittest_py/requirements.txt index 2b8b2010c65a2..051ecd93892a5 100644 --- a/python/unittest_py/requirements.txt +++ b/python/unittest_py/requirements.txt @@ -17,7 +17,7 @@ wandb>=0.23.1 xlsxwriter==3.0.9 xdoctest==1.3.0 ubelt==1.4.0 # just for xdoctest -mypy...
true
PaddlePaddle/Paddle
79,274
issue_to_patch
[CI] Check C++ coverage before diff filtering
### PR Category Execute Infrastructure ### PR Types Bug fixes ### Description 修复 Coverage C++ 空数据 guard 在 diff 行过滤后误伤 PR 的问题,并补上 diff filtering 失败时的临时文件保护。 背景:#79263 合入后,`ci/coverage_info.sh` 会在 `coverage_diff.py` 过滤 PR diff 行之后检查 `coverage-diff.info` 是否仍有 `DA:` 行。这个检查可以发现 gcov/lcov 采集失败导致的空报告,但也会误伤一种正常场景:C++ covera...
002722386dbe898fb76b3d77f9cd1f20c175180b
e76b8bf3297bbfc9c2a8e54effe64e1dd867f932
diff --git a/ci/coverage_info.sh b/ci/coverage_info.sh index d785719f999872..8c80c63557398e 100644 --- a/ci/coverage_info.sh +++ b/ci/coverage_info.sh @@ -107,17 +107,37 @@ function pr_has_cpp_source_changes() { ' "${diff_file}" } -function ensure_cpp_diff_coverage_data() { +function ensure_cpp_extracted_covera...
[ "ci/coverage_info.sh" ]
[ { "comment": "After moving the C++-coverage DA guard before diff filtering, a failure in `ci/coverage_diff.py` (non-zero exit) can silently produce an empty `coverage-diff.tmp` (due to shell redirection), then `mv` overwrites `coverage-diff.info`. Since `tools/coverage/coverage_lines.py` exits 0 on \"no data fo...
true
PaddlePaddle/Paddle
79,266
issue_to_patch
【Hackathon 10th Spring No.52】[ThirdParty][Crypto] Upgrade Crypto++ to 8.6.0 - part 5
### PR Category Environment Adaptation ### PR Types Improvements ### Description 本 PR 将 Paddle 使用的 Crypto++ 从 `CRYPTOPP_8_2_0` 升级到 `CRYPTOPP_8_6_0`,并同步更新 `cryptopp-cmake` 到对应版本。 升级原因:Crypto++ 8.6.0 已包含上游 PR [weidai11/cryptopp#970](https://github.com/weidai11/cryptopp/pull/970),该修复解决了 GCC 11 在 C++20 模式下编译 `SourceTemp...
4d12baa6a2c7ea4dbb0e799e6475bc1d0a9e6794
b76a1baa7dc4788e4e02f26d367324ff69f9dc91
diff --git a/cmake/external/cryptopp.cmake b/cmake/external/cryptopp.cmake index 84112fe6b7228a..2bb6f450140be8 100644 --- a/cmake/external/cryptopp.cmake +++ b/cmake/external/cryptopp.cmake @@ -21,21 +21,20 @@ set(CRYPTOPP_INSTALL_DIR ${THIRD_PARTY_PATH}/install/cryptopp) set(CRYPTOPP_INCLUDE_DIR "${CRYPTOPP_INS...
[ "cmake/external/cryptopp.cmake", "patches/cryptopp/CMakeLists.txt", "third_party/cryptopp", "third_party/cryptopp-cmake" ]
[ { "comment": "The Aarch64 option block defines `DISABLE_ARM_AES` twice (for both ASIMD and AES), which means the ASIMD toggle is not actually exposed as an option and can also confuse later checks that reference `DISABLE_ARM_ASIMD`. Rename the first option to `DISABLE_ARM_ASIMD`.", "path": "patches/cryptopp...
true
PaddlePaddle/Paddle
79,290
issue_to_patch
[CodeStyle] Clean up Python 3.9 compatibility code
### PR Category Environment Adaptation ### PR Types Improvements ### Description Related to #59685. Python 3.9 has retired, so this PR removes focused Python <3.10 compatibility code: - delete the private `_typing.backport` shim and use `types.EllipsisType` directly - remove SOT `co_lnotab` generation and Python ...
9d69b2f2501224aff7c69fb7204cd4e8281ec740
01a1740aaed3f9a1c8730e98e82ea00741ec5dd8
diff --git a/.github/workflows/H-Coverage.yml b/.github/workflows/H-Coverage.yml index bf5c34b2393cb..2f8e317c26656 100644 --- a/.github/workflows/H-Coverage.yml +++ b/.github/workflows/H-Coverage.yml @@ -505,7 +505,7 @@ jobs: if: needs.build.outputs.can-skip != 'true' runs-on: group: Fleet-H-single-ca...
[ ".github/workflows/H-Coverage.yml", "python/paddle/_typing/__init__.py", "python/paddle/_typing/backport.py", "python/paddle/_typing/basic.py", "python/paddle/jit/dy2static/convert_call_func.py", "python/paddle/jit/sot/opcode_translator/executor/pycode_generator.py", "python/paddle/jit/sot/opcode_transl...
[ { "comment": "backport 文件可以直接清理了,相关地方直接用对应类型就好了", "path": "python/paddle/_typing/backport.py", "hunk": "", "resolving_sha": "01a1740aaed3f9a1c8730e98e82ea00741ec5dd8", "resolving_diff": "diff --git a/python/paddle/_typing/backport.py b/python/paddle/_typing/backport.py\ndeleted file mode 100644\...
diff --git a/test/sot/test_dataclass.py b/test/sot/test_dataclass.py index ea4a78c8e2457..5120ace1c42fc 100644 --- a/test/sot/test_dataclass.py +++ b/test/sot/test_dataclass.py @@ -14,7 +14,6 @@ from __future__ import annotations -import sys import unittest from dataclasses import dataclass, field @@ -161,11 +...
true
PaddlePaddle/Paddle
79,276
issue_to_patch
fix add_n 0-size bug
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
8cacdfd15bc89296682c784df5b1685a7ca6e408
fa6bfed3dde252b97c9db8e32ce4d8bdd813b8a4
diff --git a/paddle/phi/infermeta/multiary.cc b/paddle/phi/infermeta/multiary.cc index 426a04daf3ed43..76b58fda898562 100644 --- a/paddle/phi/infermeta/multiary.cc +++ b/paddle/phi/infermeta/multiary.cc @@ -406,6 +406,7 @@ void AddNInferMeta(const std::vector<const MetaTensor*>& x, } bool is_all_0d_tensor = true;...
[ "paddle/phi/infermeta/multiary.cc", "test/legacy_test/test_add_n_op.py" ]
[ { "comment": "**🔴 Bug** 这里不能直接把 `in_dim` 初始化为 `x[0]->dims()`。\n\n下面的循环仍会跳过 `x[i]->is_selected_rows() && x_dim.size() == 1` 的输入,但 `in_dim` 已经固定成这个被跳过的 shape。动态图 `add_n_impl` 只要输入里有 DenseTensor 就会走 dense `add_n` kernel,并在 kernel 前用 `AddNInferMeta` 设置 Dense 输出;`sum` 也有 `add_n_sr` / `add_n` 的 SelectedRows 路径。因此当首个...
diff --git a/test/legacy_test/test_add_n_op.py b/test/legacy_test/test_add_n_op.py index ceb89af53dc55c..74cbcf5bad07ad 100644 --- a/test/legacy_test/test_add_n_op.py +++ b/test/legacy_test/test_add_n_op.py @@ -119,5 +119,17 @@ def test_add_n_zerosize(self): np.testing.assert_allclose(x_g_np_32[i].shape, [...
true
PaddlePaddle/Paddle
77,430
issue_to_patch
fixing 77340
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category Inference ### PR Types Bug fixes ### Description Fixing #77340 ### 是否引起精度变化 否
c8061a30ad66b0a1e3c47f10fb685bc230758c61
745e94e4d8744e6a9579f1d256757525cb78ca40
diff --git a/paddle/fluid/framework/new_executor/instruction/onednn/onednn_instruction.cc b/paddle/fluid/framework/new_executor/instruction/onednn/onednn_instruction.cc index 175efaab654803..d5685e9986b60c 100644 --- a/paddle/fluid/framework/new_executor/instruction/onednn/onednn_instruction.cc +++ b/paddle/fluid/frame...
[ "paddle/fluid/framework/new_executor/instruction/onednn/onednn_instruction.cc" ]
[]
true
PaddlePaddle/Paddle
79,252
issue_to_patch
[Operator Mechanism] Support mm out_dtype for BF16 CUDA
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization...
d9242d558766b5d24fa3231a798864c37cdd5cda
11579f81f3f9f8b5483c7e4d7294bc8f4aa39b38
diff --git a/paddle/phi/infermeta/binary.cc b/paddle/phi/infermeta/binary.cc index a6be6c5cb89aeb..367230ee6769b2 100644 --- a/paddle/phi/infermeta/binary.cc +++ b/paddle/phi/infermeta/binary.cc @@ -3171,6 +3171,60 @@ void MatmulInferMeta(const MetaTensor& x, out->share_lod(x); } +void MmOutDtypeInferMeta(const M...
[ "paddle/phi/infermeta/binary.cc", "paddle/phi/infermeta/binary.h", "paddle/phi/kernels/funcs/blas/blas.h", "paddle/phi/kernels/funcs/blas/blas_impl.cu.h", "paddle/phi/kernels/gpu/matmul_kernel.cu", "paddle/phi/kernels/impl/matmul_kernel_impl.h", "paddle/phi/kernels/matmul_kernel.h", "paddle/phi/ops/ya...
[ { "comment": "**🔴 Bug** 反向 kernel 递归调用自身,在非 CUDA 后端(XPU/OneDNN)若 bf16 out_grad 以 fp32 形式传入会触发此分支,而 XPU 上没有 Cast<float->bf16> kernel,导致运行时崩溃。\n\n建议改为提前在前向输出阶段就记录是否用了 out_dtype,或在反向 kernel 顶层通过 `PADDLE_ENFORCE` 限制仅 CUDA 后端进入此分支:\n```cpp\n#if defined(PADDLE_WITH_CUDA) && !defined(PADDLE_WITH_HIP)\n if constexpr ...
diff --git a/test/legacy_test/test_mm_out.py b/test/legacy_test/test_mm_out.py index 3e9f2cceff5e7b..6677f04eb65b4d 100644 --- a/test/legacy_test/test_mm_out.py +++ b/test/legacy_test/test_mm_out.py @@ -174,5 +174,92 @@ def test_2d_1d(self): ) +class TestMmOutDtypeDynamicOnly(unittest.TestCase): + def s...
true
PaddlePaddle/Paddle
79,252
comment_to_fix
[Operator Mechanism] Support mm out_dtype for BF16 CUDA
**🟡 建议** `test_out_dtype_rejects_unsupported_cases` 测试开头没有调用 `self._skip_if_no_bf16_cuda()`。在 CPU-only CI 环境中创建 `paddle.randn([3,4], dtype='bfloat16')` 会抛出异常,测试以 error 而非 skip 结束。建议在方法开头添加 CUDA 检查,或使用 float32 tensor 测试异常路径(不依赖 bf16 设备支持)。
d9242d558766b5d24fa3231a798864c37cdd5cda
11579f81f3f9f8b5483c7e4d7294bc8f4aa39b38
diff --git a/test/legacy_test/test_mm_out.py b/test/legacy_test/test_mm_out.py index 3e9f2cceff5e7b..6677f04eb65b4d 100644 --- a/test/legacy_test/test_mm_out.py +++ b/test/legacy_test/test_mm_out.py @@ -174,5 +174,92 @@ def test_2d_1d(self): ) +class TestMmOutDtypeDynamicOnly(unittest.TestCase): + def s...
[ "test/legacy_test/test_mm_out.py" ]
[ { "comment": "**🟡 建议** `test_out_dtype_rejects_unsupported_cases` 测试开头没有调用 `self._skip_if_no_bf16_cuda()`。在 CPU-only CI 环境中创建 `paddle.randn([3,4], dtype='bfloat16')` 会抛出异常,测试以 error 而非 skip 结束。建议在方法开头添加 CUDA 检查,或使用 float32 tensor 测试异常路径(不依赖 bf16 设备支持)。\n", "path": "test/legacy_test/test_mm_out.py", "hu...
true
PaddlePaddle/Paddle
79,252
comment_to_fix
[Operator Mechanism] Support mm out_dtype for BF16 CUDA
**🟡 建议** `TestMmOutDtype` 类目前仅在 `setUp` 中调用 `paddle.disable_static()`,所有测试只覆盖动态图路径。 由于本 PR 同时修改了 `dygraph_ops.yaml` / `static_ops.yaml`,并在静态图分支切换了 `matmul_v2` → `matmul` op,建议补充静态图 / PIR 模式测试,例如: ```python class TestMmOutDtypeStatic(unittest.TestCase): def test_bf16_to_fp32_static(self): if not paddle.is_...
d9242d558766b5d24fa3231a798864c37cdd5cda
11579f81f3f9f8b5483c7e4d7294bc8f4aa39b38
diff --git a/test/legacy_test/test_mm_out.py b/test/legacy_test/test_mm_out.py index 3e9f2cceff5e7b..6677f04eb65b4d 100644 --- a/test/legacy_test/test_mm_out.py +++ b/test/legacy_test/test_mm_out.py @@ -174,5 +174,92 @@ def test_2d_1d(self): ) +class TestMmOutDtypeDynamicOnly(unittest.TestCase): + def s...
[ "test/legacy_test/test_mm_out.py" ]
[ { "comment": "**🟡 建议** `TestMmOutDtype` 类目前仅在 `setUp` 中调用 `paddle.disable_static()`,所有测试只覆盖动态图路径。\n\n由于本 PR 同时修改了 `dygraph_ops.yaml` / `static_ops.yaml`,并在静态图分支切换了 `matmul_v2` → `matmul` op,建议补充静态图 / PIR 模式测试,例如:\n```python\nclass TestMmOutDtypeStatic(unittest.TestCase):\n def test_bf16_to_fp32_static(self)...
true
PaddlePaddle/Paddle
79,252
comment_to_fix
[Operator Mechanism] Support mm out_dtype for BF16 CUDA
**🟡 建议** `TestMmOutDtype` 所有测试方法只覆盖动态图路径,缺少静态图和 PIR 路径测试。 `mm()` 静态图路径已改为使用 `matmul` op(原为 `matmul_v2`)并新增 `out_dtype` 属性传递。建议至少补充一个静态图测试: ```python def test_bf16_to_fp32_static(self): self._skip_if_no_bf16_cuda() with paddle.static.program_guard( paddle.static.Program(), paddle.static.Program() )...
d9242d558766b5d24fa3231a798864c37cdd5cda
11579f81f3f9f8b5483c7e4d7294bc8f4aa39b38
diff --git a/test/legacy_test/test_mm_out.py b/test/legacy_test/test_mm_out.py index 3e9f2cceff5e7b..6677f04eb65b4d 100644 --- a/test/legacy_test/test_mm_out.py +++ b/test/legacy_test/test_mm_out.py @@ -174,5 +174,92 @@ def test_2d_1d(self): ) +class TestMmOutDtypeDynamicOnly(unittest.TestCase): + def s...
[ "test/legacy_test/test_mm_out.py" ]
[ { "comment": "**🟡 建议** `TestMmOutDtype` 所有测试方法只覆盖动态图路径,缺少静态图和 PIR 路径测试。\n\n`mm()` 静态图路径已改为使用 `matmul` op(原为 `matmul_v2`)并新增 `out_dtype` 属性传递。建议至少补充一个静态图测试:\n```python\ndef test_bf16_to_fp32_static(self):\n self._skip_if_no_bf16_cuda()\n with paddle.static.program_guard(\n paddle.static.Program(), ...
true
PaddlePaddle/Paddle
79,252
comment_to_fix
[Operator Mechanism] Support mm out_dtype for BF16 CUDA
**🔴 Bug** `mm_out_dtype` 没有配置 `backward`,但 Python 入口已把 `paddle.mm(..., out_dtype=paddle.float32)` 直接路由到这个 op。 现有 `matmul` 在同文件上方配置了 `backward : matmul_grad`;eager codegen 也会在 forward YAML 没有 `backward` 时把该 op 当成 forward-only 并跳过 GradNode 生成。因此用户把 BF16 输入设为 `stop_gradient=False` 后,`out_dtype` 分支不会像普通 `paddle.mm` 一样向 `...
d9242d558766b5d24fa3231a798864c37cdd5cda
11579f81f3f9f8b5483c7e4d7294bc8f4aa39b38
diff --git a/paddle/phi/ops/yaml/inconsistent/dygraph_ops.yaml b/paddle/phi/ops/yaml/inconsistent/dygraph_ops.yaml index 6f45a6c46a8d68..67da0dbaae7578 100755 --- a/paddle/phi/ops/yaml/inconsistent/dygraph_ops.yaml +++ b/paddle/phi/ops/yaml/inconsistent/dygraph_ops.yaml @@ -286,6 +286,16 @@ backward : minimum_grad ...
[ "paddle/phi/ops/yaml/inconsistent/dygraph_ops.yaml" ]
[ { "comment": "**🔴 Bug** `mm_out_dtype` 没有配置 `backward`,但 Python 入口已把 `paddle.mm(..., out_dtype=paddle.float32)` 直接路由到这个 op。\n\n现有 `matmul` 在同文件上方配置了 `backward : matmul_grad`;eager codegen 也会在 forward YAML 没有 `backward` 时把该 op 当成 forward-only 并跳过 GradNode 生成。因此用户把 BF16 输入设为 `stop_gradient=False` 后,`out_dtype` 分...
true
PaddlePaddle/Paddle
79,271
issue_to_patch
[Cherry-pick][Precision Depth Alignment] UniformKernel in GPU
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
f3f5f3fd150c07b242d63f37999050f2b0e43d73
19474a269a3362404583e59443fe3fca3819e1f3
diff --git a/paddle/phi/kernels/funcs/distribution_helper.h b/paddle/phi/kernels/funcs/distribution_helper.h index d0c6e21d0148e6..dbf9817f06da06 100644 --- a/paddle/phi/kernels/funcs/distribution_helper.h +++ b/paddle/phi/kernels/funcs/distribution_helper.h @@ -69,22 +69,30 @@ struct exponential_transform { T lambd...
[ "paddle/phi/kernels/funcs/distribution_helper.h", "paddle/phi/kernels/gpu/uniform_kernel.cu", "test/legacy_test/test_sparse_unary_op.py" ]
[]
diff --git a/test/legacy_test/test_sparse_unary_op.py b/test/legacy_test/test_sparse_unary_op.py index 63062a92d87095..a9ae7d1cce4f16 100644 --- a/test/legacy_test/test_sparse_unary_op.py +++ b/test/legacy_test/test_sparse_unary_op.py @@ -62,6 +62,12 @@ def check_result( mask = paddle.randint(0, 2, [8, 16,...
true
PaddlePaddle/Paddle
79,130
issue_to_patch
[Precision Depth Alignment] UniformKernel in GPU
### PR Category Operator Mechanism ### PR Types Improvements ### Description 修复 GPU `UniformKernel` 在 float16/bfloat16 低精度类型下的精度问题,与 PyTorch 对齐。 **问题根因**:旧实现在 float(MT)精度中完成 `val * range + min` 后将结果隐式 cast 到 float16/bfloat16 输出类型。当某个 `val < 1.0` 的 curand 随机数计算结果非常接近 max 时,cast 会因精度截断舍入到 max,违反 `[min, max)` ...
de9bb946fdc161956631e363a83256a804a69256
a303f1da89224ef5e1dcfbe80bd064310cfae482
diff --git a/paddle/phi/kernels/funcs/distribution_helper.h b/paddle/phi/kernels/funcs/distribution_helper.h index 774deb55766887..ace594160235b0 100644 --- a/paddle/phi/kernels/funcs/distribution_helper.h +++ b/paddle/phi/kernels/funcs/distribution_helper.h @@ -69,22 +69,30 @@ struct exponential_transform { T lambd...
[ "paddle/phi/kernels/funcs/distribution_helper.h", "paddle/phi/kernels/gpu/uniform_kernel.cu", "test/legacy_test/test_sparse_unary_op.py" ]
[ { "comment": "**🟡 建议** `seed != 0` 分支未同步精度修复,与 `seed == 0` 分支行为不一致\n\n`seed == 0` 分支已通过 `uniform_real_transform<MT, T>` 修复了 float16/bfloat16 cast 后可能等于 max 的边界问题,但 `seed != 0` 分支仍使用 `UniformGenerator<T>`,其内部以旧方式处理边界,未经过同等保护,导致两条路径的精度行为不一致。\n\n建议修复方式:检查 `UniformGenerator<T>` 的边界处理逻辑,或在 `seed != 0` 分支中同样先在 MT 精度...
diff --git a/test/legacy_test/test_sparse_unary_op.py b/test/legacy_test/test_sparse_unary_op.py index 63062a92d87095..a9ae7d1cce4f16 100644 --- a/test/legacy_test/test_sparse_unary_op.py +++ b/test/legacy_test/test_sparse_unary_op.py @@ -62,6 +62,12 @@ def check_result( mask = paddle.randint(0, 2, [8, 16,...
true
PaddlePaddle/Paddle
79,228
issue_to_patch
[API Compatibility] Align torch.Tensor.transpose_/ reshape_as
### PR Category User Experience ### PR Types New features ### Description torch.Tensor.transpose_: Paddle 原来只支持 x.transpose_(perm=[...]),PyTorch 是 x.transpose_(dim0, dim1)。现在给 transpose_ 加了现有 transpose_decorator(),所以同时支持: - Paddle 原用法:x.transpose_([1, 0, 2])、x.transpose_(perm=[1, 0, 2]) - PyT...
002722386dbe898fb76b3d77f9cd1f20c175180b
a999c720b4df55e13f00122af9554aa2cb48d59f
diff --git a/python/paddle/tensor/__init__.py b/python/paddle/tensor/__init__.py index aa0aa3c0c2d0c..79fc2ca567637 100644 --- a/python/paddle/tensor/__init__.py +++ b/python/paddle/tensor/__init__.py @@ -203,6 +203,7 @@ repeat_interleave, reshape, reshape_, + reshape_as, roll, rot90, r...
[ "python/paddle/tensor/__init__.py", "python/paddle/tensor/linalg.py", "python/paddle/tensor/manipulation.py", "test/legacy_test/test_api_compatibility_part3.py" ]
[ { "comment": "按规范写API,英文文档", "path": "python/paddle/tensor/manipulation.py", "hunk": "@@ -5654,6 +5654,10 @@ def get_attr_shape(list_shape):\n return out\n \n \n+def reshape_as(x: Tensor, other: Tensor, name: str | None = None) -> Tensor:", "resolving_sha": "a999c720b4df55e13f00122af9554aa2c...
diff --git a/test/legacy_test/test_api_compatibility_part3.py b/test/legacy_test/test_api_compatibility_part3.py index 5ef1a7ac724d8..7b79a8098953a 100644 --- a/test/legacy_test/test_api_compatibility_part3.py +++ b/test/legacy_test/test_api_compatibility_part3.py @@ -4883,5 +4883,107 @@ def test_static_Compatibility(s...
true
PaddlePaddle/Paddle
79,215
issue_to_patch
[API Compatibility] select_scatter/sgn/signbit/slice_scatter/take/tensordot/tril_indices/triu_indices/vander/logaddexp/logspace/moveaxis/nan_to_num/nanmean/nansum/masked_fill/addmv/addr/fix/histc/trunc Edit By AI Agent
### PR Category User Experience ### PR Types Improvements ### Description **API Compatibility Edit By AI Agent:** - `torch.select_scatter` - `torch.Tensor.select_scatter` - `torch.sgn` - `torch.Tensor.sgn` - `torch.signbit` - `torch.Tensor.signbit` - `torch.slice_scatter` - `torch.Tensor.slice_scatter` - `torch.take`...
181bff1bf262b7dd2cb2b83502f9102fc550d3c0
1a418cb466d11d9f955268a6137ff9de7d170138
diff --git a/python/paddle/__init__.py b/python/paddle/__init__.py index 387e50b2e85dfc..295cf12e8986de 100644 --- a/python/paddle/__init__.py +++ b/python/paddle/__init__.py @@ -582,6 +582,10 @@ def new_init(self, *args, **kwargs): add_n, addmm, addmm_, + addmv, + addmv_, + addr, + addr_, ...
[ "python/paddle/__init__.py", "python/paddle/base/dygraph/tensor_patch_methods.py", "python/paddle/special.py", "python/paddle/tensor/__init__.py", "python/paddle/tensor/creation.py", "python/paddle/tensor/manipulation.py", "python/paddle/tensor/math.py", "python/paddle/utils/decorator_utils.py", "te...
[ { "comment": "**🟡 建议** `out` 参数未设为 keyword-only\n\n在本 PR 的其他 API(`logaddexp`、`sgn`、`signbit`)中,`out` 参数均正确地放在 `*` 之后作为 keyword-only 参数。但 `tensordot` 的 `out` 是普通位置参数,放在 `name` 之后。这导致用户可以通过位置传参意外传入 `out`,且与 PyTorch 的 `out` 语义(始终为 keyword-only)不一致。\n\n建议修复:将 `out` 移到 `*` 之后,使其成为 keyword-only 参数:\n```python\ndef t...
diff --git a/test/dygraph_to_static/test_tensor_attr_consistency.py b/test/dygraph_to_static/test_tensor_attr_consistency.py index 1d520355d40d8a..57968728c3eecc 100644 --- a/test/dygraph_to_static/test_tensor_attr_consistency.py +++ b/test/dygraph_to_static/test_tensor_attr_consistency.py @@ -30,8 +30,10 @@ '...
true
PaddlePaddle/Paddle
79,278
issue_to_patch
add fleet time
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
641cde71b3dcad673d60d915be85a563c4026a48
00d2d7b78e7f3171f12e8277bed3564c67c5b34c
diff --git a/.github/workflows/H-Coverage.yml b/.github/workflows/H-Coverage.yml index 22ca839444cbc..bf5c34b2393cb 100644 --- a/.github/workflows/H-Coverage.yml +++ b/.github/workflows/H-Coverage.yml @@ -587,7 +587,7 @@ jobs: ' - name: Single card test - timeout-minutes: 50 + timeout-...
[ ".github/workflows/H-Coverage.yml" ]
[]
true
PaddlePaddle/Paddle
79,268
issue_to_patch
[API Compatibility] Add alias `paddle.utils.data.DistributedSampler` for `paddle.io.DistributedBatchSampler`
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category User Experience ### PR Types Improvements ### Description <!-- Describe what you’ve done --> - Add API alias and arg...
c3a820dbcb6b100fcd1cde032753521ebbf88831
6bcb52be4603674088a39231b1f67d97d1022c1e
diff --git a/python/paddle/io/dataloader/batch_sampler.py b/python/paddle/io/dataloader/batch_sampler.py index 0b3ab75d06e24..571ce330c8f8b 100644 --- a/python/paddle/io/dataloader/batch_sampler.py +++ b/python/paddle/io/dataloader/batch_sampler.py @@ -233,6 +233,9 @@ class DistributedBatchSampler(BatchSampler): ...
[ "python/paddle/io/dataloader/batch_sampler.py", "python/paddle/utils/data/__init__.py", "python/paddle/utils/data/distributed.py", "test/legacy_test/test_api_compatibility_part1.py", "test/legacy_test/test_batch_sampler.py" ]
[ { "comment": "看看seed是不是用在这里\n\nhttps://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/io/dataloader/batch_sampler.py#L339\n\n然后原来的DistributedBatchSampler可以把新增参数放到末尾,避免后向不兼容", "path": "python/paddle/utils/data/distributed.py", "hunk": "@@ -0,0 +1,41 @@\n+# Copyright (c) 2026 PaddlePaddle Autho...
diff --git a/test/legacy_test/test_api_compatibility_part1.py b/test/legacy_test/test_api_compatibility_part1.py index 05b5df17d4324..25f31d9115c49 100644 --- a/test/legacy_test/test_api_compatibility_part1.py +++ b/test/legacy_test/test_api_compatibility_part1.py @@ -2396,5 +2396,60 @@ def test_Compatibility(self): ...
true
PaddlePaddle/Paddle
79,164
issue_to_patch
[API compatibility] Align Module state_dict_post_hook
### PR Category User Experience ### PR Types New features, BC Breaking ### Description state_dict_post_hook同时支持1个参数与4个参数的重载 ### 是否引起精度变化 否
44b28a74657074dc7b37e1cf3f9c5335dcb27a1c
2fbd87bbc58f014a8ac881a0e62cc6f9a61bbe69
diff --git a/python/paddle/nn/layer/layers.py b/python/paddle/nn/layer/layers.py index 2b274ddb3d92b5..f9b8c2bfbcb3d3 100644 --- a/python/paddle/nn/layer/layers.py +++ b/python/paddle/nn/layer/layers.py @@ -2755,8 +2755,17 @@ def _state_dict_impl( ) if use_hook: + local_metada...
[ "python/paddle/nn/layer/layers.py", "test/legacy_test/test_base_layer.py" ]
[ { "comment": "**🔴 Bug** 字符串拼接缺少空格,错误信息拼接后存在粘连\n\n三段字符串相邻拼接时均缺少空格分隔符:\n- `\"are not\" + \"expected\"` → 输出 `\"are notexpected\"`\n- `\"modified,\" + \"it\"` → 输出 `\"modified,it should\"`\n\n建议修复:\n```python\nraise AssertionError(\n \"Hooks registered with ``register_load_state_dict_post_hook`` are not \"\n ...
diff --git a/test/legacy_test/test_base_layer.py b/test/legacy_test/test_base_layer.py index 09dbf17c8e4d4c..099578e310e187 100644 --- a/test/legacy_test/test_base_layer.py +++ b/test/legacy_test/test_base_layer.py @@ -347,6 +347,88 @@ def state_dict_post_hook(destination): hook_remove_helper._hook_id,...
true
PaddlePaddle/Paddle
79,197
issue_to_patch
[API Compatibility] Support param `optimizer` for `lr_scheduler`
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category User Experience ### PR Types Improvements ### Description <!-- Describe what you’ve done --> - Add alias `optimizer`...
44b28a74657074dc7b37e1cf3f9c5335dcb27a1c
0fe31e929c0f371de856052c79fb65dc0579876c
diff --git a/python/paddle/optimizer/lr.py b/python/paddle/optimizer/lr.py index 385bf9e4dd6a4..09f161a2169b5 100644 --- a/python/paddle/optimizer/lr.py +++ b/python/paddle/optimizer/lr.py @@ -20,7 +20,7 @@ import numpy import numpy.typing as npt -from typing_extensions import NotRequired +from typing_extensions im...
[ "python/paddle/optimizer/lr.py", "python/paddle/utils/decorator_utils.py", "test/legacy_test/test_lr_scheduler.py" ]
[ { "comment": "![P2](https://img.shields.io/badge/P2-medium-yellow) **优先级:P2**\n\n这里直接调用 `optimizer.set_lr_scheduler(self)`,但该 API 被 `@framework.dygraph_only` 限制;因此在 static/PIR 模式下,新引入的 `optimizer` 参数会在构造 scheduler 时抛 `AssertionError`。这些 lr scheduler 现有文档和测试都覆盖 static 图用法,PR 也没有声明 `optimizer` 只支持动态图,会形成不一致的兼容行为。...
diff --git a/test/legacy_test/test_lr_scheduler.py b/test/legacy_test/test_lr_scheduler.py index 9b1e48e97e8e3..2721b25a63f66 100644 --- a/test/legacy_test/test_lr_scheduler.py +++ b/test/legacy_test/test_lr_scheduler.py @@ -1332,6 +1332,138 @@ def test_pir_linear_warmup_lr(self): scheduler.step() ...
true
PaddlePaddle/Paddle
79,210
issue_to_patch
[Security] Harden CIFAR and Flowers dataset loading
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category User Experience ### PR Types Security ### Description 本 PR 对 CIFAR 和 Flowers 数据集加载流程进行安全加固,降低非官方或被篡改数据文件带来的反序列化和解压风...
82c1f9003cab94bbbbe35379699b053cd8811279
1a9ae4c8ae2f52d34326aa71603aad7597fbc178
diff --git a/python/paddle/dataset/cifar.py b/python/paddle/dataset/cifar.py index f04acdfcc4b2b..bf7b12f94033e 100644 --- a/python/paddle/dataset/cifar.py +++ b/python/paddle/dataset/cifar.py @@ -27,6 +27,7 @@ """ +import os import pickle import tarfile @@ -44,7 +45,7 @@ CIFAR100_MD5 = 'eb9058c3a382ffc7106e4...
[ "python/paddle/dataset/cifar.py", "python/paddle/utils/download.py", "python/paddle/vision/datasets/cifar.py", "python/paddle/vision/datasets/flowers.py", "test/legacy_test/test_dataset_security.py" ]
[ { "comment": "**🟡 建议** 此处新建了一个 `_safe_extract_tar` 实现,但 `python/paddle/utils/download.py` 中已有功能相近的 `_safe_extract_tar`(line 311),同样进行路径穿越检查和特殊文件过滤。两套实现行为略有不同(本处 hard-fail,`download.py` 版本 skip+warn),长期维护存在分歧修复风险。\n\n建议修复方式:\n考虑复用 `paddle.utils.download._safe_extract_tar`,或将其提取为公共工具函数并通过参数(如 `on_unsafe='raise'|...
diff --git a/test/legacy_test/test_dataset_security.py b/test/legacy_test/test_dataset_security.py new file mode 100644 index 0000000000000..0b566a6308197 --- /dev/null +++ b/test/legacy_test/test_dataset_security.py @@ -0,0 +1,276 @@ +# Copyright (c) 2026 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under...
true
PaddlePaddle/Paddle
79,210
comment_to_fix
[Security] Harden CIFAR and Flowers dataset loading
**🟡 建议** 此处新建了一个 `_safe_extract_tar` 实现,但 `python/paddle/utils/download.py` 中已有功能相近的 `_safe_extract_tar`(line 311),同样进行路径穿越检查和特殊文件过滤。两套实现行为略有不同(本处 hard-fail,`download.py` 版本 skip+warn),长期维护存在分歧修复风险。 建议修复方式: 考虑复用 `paddle.utils.download._safe_extract_tar`,或将其提取为公共工具函数并通过参数(如 `on_unsafe='raise'|'skip'`)控制遇到不安全成员时的行为,避免两...
82c1f9003cab94bbbbe35379699b053cd8811279
1a9ae4c8ae2f52d34326aa71603aad7597fbc178
diff --git a/python/paddle/vision/datasets/flowers.py b/python/paddle/vision/datasets/flowers.py index 792f399087b5b..012a500749bf8 100644 --- a/python/paddle/vision/datasets/flowers.py +++ b/python/paddle/vision/datasets/flowers.py @@ -35,6 +35,7 @@ from paddle.dataset.common import _check_exists_and_download from p...
[ "python/paddle/vision/datasets/flowers.py" ]
[ { "comment": "**🟡 建议** 此处新建了一个 `_safe_extract_tar` 实现,但 `python/paddle/utils/download.py` 中已有功能相近的 `_safe_extract_tar`(line 311),同样进行路径穿越检查和特殊文件过滤。两套实现行为略有不同(本处 hard-fail,`download.py` 版本 skip+warn),长期维护存在分歧修复风险。\n\n建议修复方式:\n考虑复用 `paddle.utils.download._safe_extract_tar`,或将其提取为公共工具函数并通过参数(如 `on_unsafe='raise'|...
true
PaddlePaddle/Paddle
79,210
comment_to_fix
[Security] Harden CIFAR and Flowers dataset loading
**🟡 建议** `test_reject_invalid_on_unsafe` 在同一 `with` 块内以写入模式(`'w:gz'`)开启 `data_tar` 并传给 `_safe_extract_tar`。 测试目前能通过,因为 `on_unsafe='bad'` 的参数校验在访问 `tar.getmembers()` 之前就抛出 ValueError,但写入模式的 tarfile 对象被用于解压函数,代码语义混乱,未来可能因 tarfile 或测试框架行为变化而产生误报。 建议将 tar 文件的创建与传参分开: ```python def test_reject_invalid_on_unsafe(self): ...
82c1f9003cab94bbbbe35379699b053cd8811279
1a9ae4c8ae2f52d34326aa71603aad7597fbc178
diff --git a/test/legacy_test/test_dataset_security.py b/test/legacy_test/test_dataset_security.py new file mode 100644 index 0000000000000..0b566a6308197 --- /dev/null +++ b/test/legacy_test/test_dataset_security.py @@ -0,0 +1,276 @@ +# Copyright (c) 2026 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under...
[ "test/legacy_test/test_dataset_security.py" ]
[ { "comment": "**🟡 建议** `test_reject_invalid_on_unsafe` 在同一 `with` 块内以写入模式(`'w:gz'`)开启 `data_tar` 并传给 `_safe_extract_tar`。\n\n测试目前能通过,因为 `on_unsafe='bad'` 的参数校验在访问 `tar.getmembers()` 之前就抛出 ValueError,但写入模式的 tarfile 对象被用于解压函数,代码语义混乱,未来可能因 tarfile 或测试框架行为变化而产生误报。\n\n建议将 tar 文件的创建与传参分开:\n```python\ndef test_reject...
true
PaddlePaddle/Paddle
79,210
comment_to_fix
[Security] Harden CIFAR and Flowers dataset loading
**❓ 疑问** `md5file(filename)` 在每次调用 `reader()` 时都会全量读取整个 CIFAR archive(CIFAR-10 约 170 MB),以计算 MD5。 对于 `cycle=True` 场景(`reader()` 只调用一次),开销仅在首次迭代时产生;但若用户在多个 epoch 中反复调用 `reader()`,每个 epoch 均会触发一次全量 I/O 校验。 PR 描述说明此设计是为了「避免缓存文件在下载校验后被替换」(TOCTOU 防护),若确认此为预期行为,建议在代码注释中显式说明,以免后续维护者以为这是性能 bug 而移除。
82c1f9003cab94bbbbe35379699b053cd8811279
1a9ae4c8ae2f52d34326aa71603aad7597fbc178
diff --git a/python/paddle/dataset/cifar.py b/python/paddle/dataset/cifar.py index f04acdfcc4b2b..bf7b12f94033e 100644 --- a/python/paddle/dataset/cifar.py +++ b/python/paddle/dataset/cifar.py @@ -27,6 +27,7 @@ """ +import os import pickle import tarfile @@ -44,7 +45,7 @@ CIFAR100_MD5 = 'eb9058c3a382ffc7106e4...
[ "python/paddle/dataset/cifar.py" ]
[ { "comment": "**❓ 疑问** `md5file(filename)` 在每次调用 `reader()` 时都会全量读取整个 CIFAR archive(CIFAR-10 约 170 MB),以计算 MD5。\n\n对于 `cycle=True` 场景(`reader()` 只调用一次),开销仅在首次迭代时产生;但若用户在多个 epoch 中反复调用 `reader()`,每个 epoch 均会触发一次全量 I/O 校验。\n\nPR 描述说明此设计是为了「避免缓存文件在下载校验后被替换」(TOCTOU 防护),若确认此为预期行为,建议在代码注释中显式说明,以免后续维护者以为这是性能 bug 而移除。\...
true
PaddlePaddle/Paddle
79,210
comment_to_fix
[Security] Harden CIFAR and Flowers dataset loading
**🟡 建议** 三处错误消息以 `Skipping` 开头,但在 `on_unsafe='raise'` 模式下作为 `ValueError` 抛出时语义不准确。 用户遇到 symlink 时会收到:`ValueError: Skipping symbolic link in tar for security: jpg/link.jpg`。"Skipping" 暗示成员被跳过继续执行,而实际上已抛出异常停止。hardlink 和 special file 同理。 建议区分两种场景的消息: ```python if on_unsafe == 'raise': raise ValueError( f"Un...
82c1f9003cab94bbbbe35379699b053cd8811279
1a9ae4c8ae2f52d34326aa71603aad7597fbc178
diff --git a/python/paddle/utils/download.py b/python/paddle/utils/download.py index 4ba4a3938fbad..26261056fcf1c 100644 --- a/python/paddle/utils/download.py +++ b/python/paddle/utils/download.py @@ -308,15 +308,20 @@ def _uncompress_file_zip(filepath): return uncompressed_path -def _safe_extract_tar(tar,...
[ "python/paddle/utils/download.py" ]
[ { "comment": "**🟡 建议** 三处错误消息以 `Skipping` 开头,但在 `on_unsafe='raise'` 模式下作为 `ValueError` 抛出时语义不准确。\n\n用户遇到 symlink 时会收到:`ValueError: Skipping symbolic link in tar for security: jpg/link.jpg`。\"Skipping\" 暗示成员被跳过继续执行,而实际上已抛出异常停止。hardlink 和 special file 同理。\n\n建议区分两种场景的消息:\n```python\nif on_unsafe == 'raise':\n ...
true
PaddlePaddle/Paddle
79,210
comment_to_fix
[Security] Harden CIFAR and Flowers dataset loading
❓ **疑问(F3 仍存在)** `md5file(filename)` 在每次调用 `reader()` 时对整个 CIFAR archive(约 170 MB)全量计算 MD5。 对于多 epoch 训练,每轮重新调用 `reader()` 会额外读取 170 MB 文件。可考虑两种优化: 1. 用闭包标志位在首次调用时校验,后续 epoch 跳过; 2. 以文件 mtime + size 做快速预检,仅 mtime 变化时才做全量 MD5。
82c1f9003cab94bbbbe35379699b053cd8811279
1a9ae4c8ae2f52d34326aa71603aad7597fbc178
diff --git a/python/paddle/dataset/cifar.py b/python/paddle/dataset/cifar.py index f04acdfcc4b2b..bf7b12f94033e 100644 --- a/python/paddle/dataset/cifar.py +++ b/python/paddle/dataset/cifar.py @@ -27,6 +27,7 @@ """ +import os import pickle import tarfile @@ -44,7 +45,7 @@ CIFAR100_MD5 = 'eb9058c3a382ffc7106e4...
[ "python/paddle/dataset/cifar.py" ]
[ { "comment": "❓ **疑问(F3 仍存在)** `md5file(filename)` 在每次调用 `reader()` 时对整个 CIFAR archive(约 170 MB)全量计算 MD5。\n\n对于多 epoch 训练,每轮重新调用 `reader()` 会额外读取 170 MB 文件。可考虑两种优化:\n1. 用闭包标志位在首次调用时校验,后续 epoch 跳过;\n2. 以文件 mtime + size 做快速预检,仅 mtime 变化时才做全量 MD5。\n", "path": "python/paddle/dataset/cifar.py", "hunk": "@@ -...
true
PaddlePaddle/Paddle
79,210
comment_to_fix
[Security] Harden CIFAR and Flowers dataset loading
**🟡 建议** `md5file()` 在每次实例化(`data_file` 非 None 路径)时全量扫描 ~170MB 归档,缺少类似 `reader_creator` 中基于 `(mtime_ns, size)` 的缓存机制。 当用户每个 epoch 重建 `Cifar10(data_file=my_file)` 实例,或在超参数搜索中多次实例化时,每次都会触发一次完整的 MD5 计算,导致额外 ~0.5–1s 延迟。 建议在模块级添加一个简单的 mtime+size 缓存: ```python _cifar_md5_cache: dict[str, tuple[tuple, str]] = {} # path ->...
82c1f9003cab94bbbbe35379699b053cd8811279
1a9ae4c8ae2f52d34326aa71603aad7597fbc178
diff --git a/python/paddle/vision/datasets/cifar.py b/python/paddle/vision/datasets/cifar.py index 9020da84cb147..700efdfd3f685 100644 --- a/python/paddle/vision/datasets/cifar.py +++ b/python/paddle/vision/datasets/cifar.py @@ -13,8 +13,10 @@ # limitations under the License. from __future__ import annotations +imp...
[ "python/paddle/vision/datasets/cifar.py" ]
[ { "comment": "**🟡 建议** `md5file()` 在每次实例化(`data_file` 非 None 路径)时全量扫描 ~170MB 归档,缺少类似 `reader_creator` 中基于 `(mtime_ns, size)` 的缓存机制。\n\n当用户每个 epoch 重建 `Cifar10(data_file=my_file)` 实例,或在超参数搜索中多次实例化时,每次都会触发一次完整的 MD5 计算,导致额外 ~0.5–1s 延迟。\n\n建议在模块级添加一个简单的 mtime+size 缓存:\n```python\n_cifar_md5_cache: dict[str, tuple[...
true
PaddlePaddle/Paddle
79,210
comment_to_fix
[Security] Harden CIFAR and Flowers dataset loading
**🟡 建议** 测试文件中出现 `if __name__ == '__main__'` 按 Paddle CI checklist §C,`if __name__ == '__main__'` 出现在 `test/**` 下属于环境依赖信号,Paddle CI 通常以 `pytest` 模块方式运行测试,而非直接执行脚本,该块不会被 CI 触达。 建议删除这两行,统一由 CI 框架发现和运行测试用例。
82c1f9003cab94bbbbe35379699b053cd8811279
1a9ae4c8ae2f52d34326aa71603aad7597fbc178
diff --git a/test/legacy_test/test_dataset_security.py b/test/legacy_test/test_dataset_security.py new file mode 100644 index 0000000000000..0b566a6308197 --- /dev/null +++ b/test/legacy_test/test_dataset_security.py @@ -0,0 +1,276 @@ +# Copyright (c) 2026 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under...
[ "test/legacy_test/test_dataset_security.py" ]
[ { "comment": "**🟡 建议** 测试文件中出现 `if __name__ == '__main__'`\n\n按 Paddle CI checklist §C,`if __name__ == '__main__'` 出现在 `test/**` 下属于环境依赖信号,Paddle CI 通常以 `pytest` 模块方式运行测试,而非直接执行脚本,该块不会被 CI 触达。\n\n建议删除这两行,统一由 CI 框架发现和运行测试用例。\n", "path": "test/legacy_test/test_dataset_security.py", "hunk": "@@ -0,0 +1,26...
true
PaddlePaddle/Paddle
79,210
comment_to_fix
[Security] Harden CIFAR and Flowers dataset loading
**❓ 疑问** `Cifar100` 是否也继承或覆盖了此处的 `__init__` 安全校验逻辑? PR 描述称 `Cifar10/Cifar100` 均已加固,但当前 diff 只可见一处 `__init__` 修改(hunk `@@ -154,6 +172,12 @@`)。如果 `Cifar100` 有自己的 `__init__` 且没有类似的 `_check_local_cifar_md5` 调用,则 `Cifar100(data_file=...)` 仍缺少 MD5 校验。请确认 `Cifar100` 是否共用此 `__init__` 或有独立的安全修改。
82c1f9003cab94bbbbe35379699b053cd8811279
1a9ae4c8ae2f52d34326aa71603aad7597fbc178
diff --git a/python/paddle/vision/datasets/cifar.py b/python/paddle/vision/datasets/cifar.py index 9020da84cb147..700efdfd3f685 100644 --- a/python/paddle/vision/datasets/cifar.py +++ b/python/paddle/vision/datasets/cifar.py @@ -13,8 +13,10 @@ # limitations under the License. from __future__ import annotations +imp...
[ "python/paddle/vision/datasets/cifar.py" ]
[ { "comment": "**❓ 疑问** `Cifar100` 是否也继承或覆盖了此处的 `__init__` 安全校验逻辑?\n\nPR 描述称 `Cifar10/Cifar100` 均已加固,但当前 diff 只可见一处 `__init__` 修改(hunk `@@ -154,6 +172,12 @@`)。如果 `Cifar100` 有自己的 `__init__` 且没有类似的 `_check_local_cifar_md5` 调用,则 `Cifar100(data_file=...)` 仍缺少 MD5 校验。请确认 `Cifar100` 是否共用此 `__init__` 或有独立的安全修改。\n", ...
true
PaddlePaddle/Paddle
79,210
comment_to_fix
[Security] Harden CIFAR and Flowers dataset loading
**🟡 建议** 缓存测试(`_count_local_cifar_md5_calls`)仅覆盖 `Cifar10`,如果 `Cifar100` 也有独立的 MD5 校验路径,建议同样补充缓存命中和缓存刷新测试,确保安全加固行为的完整性。
82c1f9003cab94bbbbe35379699b053cd8811279
1a9ae4c8ae2f52d34326aa71603aad7597fbc178
diff --git a/test/legacy_test/test_dataset_security.py b/test/legacy_test/test_dataset_security.py new file mode 100644 index 0000000000000..0b566a6308197 --- /dev/null +++ b/test/legacy_test/test_dataset_security.py @@ -0,0 +1,276 @@ +# Copyright (c) 2026 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under...
[ "test/legacy_test/test_dataset_security.py" ]
[ { "comment": "**🟡 建议** 缓存测试(`_count_local_cifar_md5_calls`)仅覆盖 `Cifar10`,如果 `Cifar100` 也有独立的 MD5 校验路径,建议同样补充缓存命中和缓存刷新测试,确保安全加固行为的完整性。\n", "path": "test/legacy_test/test_dataset_security.py", "hunk": "@@ -0,0 +1,256 @@\n+# Copyright (c) 2026 PaddlePaddle Authors. All Rights Reserved.\n+#\n+# Licensed un...
true
PaddlePaddle/Paddle
79,124
issue_to_patch
[API compatibility] Align torch.distributions.multivariate_normal.MultivariateNormal、torch.distributions.distribution.Distribution、torch.distributions.distribution.Distribution.icdf / entropy、torch.distributions.normal.Normal
### PR Category User Experience ### PR Types New features ### Description - 支持 PyTorch 构造参数 `validate_args`,补充 `arg_constraints`、`support`、`mode`、`expand`,并对齐 `covariance_matrix`、 `precision_matrix`、`scale_tril` 三种参数入口及 lazy property 行为。 - 同时补充了分布参数校验能力:`loc` 必须是一维及以上,协方差矩阵和精度矩阵必须正定,`scale_tril` 必须是下三角...
44b28a74657074dc7b37e1cf3f9c5335dcb27a1c
f514240249fbd852d84eb534f059479a1dc15c6b
diff --git a/python/paddle/__init__.py b/python/paddle/__init__.py index 387e50b2e85df..6f9f49449179a 100644 --- a/python/paddle/__init__.py +++ b/python/paddle/__init__.py @@ -19,6 +19,7 @@ # implemented as independent modules with no runtime dependency on PyTorch. import math +import sys as _sys import typing ...
[ "python/paddle/__init__.py", "python/paddle/distribution/constraint.py", "python/paddle/distribution/distribution.py", "python/paddle/distribution/multivariate_normal.py", "python/paddle/distribution/normal.py", "python/paddle/optim/__init__.py", "python/paddle/optim/adadelta.py", "python/paddle/optim...
[ { "comment": "**🔴 兼容性** `paddle.optim` 子模块物理文件已全部删除,仅注册顶层 `sys.modules['paddle.optim']` 别名不足以支持子模块导入。\n\n**影响**:用户代码 `from paddle.optim.adam import Adam`、`import paddle.optim.adadelta` 等将在运行时抛出 `ModuleNotFoundError`,因为 `paddle/optim/adam.py` 等物理文件已被删除,而 `sys.modules` 没有为 `paddle.optim.adam`、`paddle.optim.adade...
diff --git a/test/distribution/test_distribution_multivariate_normal.py b/test/distribution/test_distribution_multivariate_normal.py index fd54db855f7e8..f9c55f09393ac 100644 --- a/test/distribution/test_distribution_multivariate_normal.py +++ b/test/distribution/test_distribution_multivariate_normal.py @@ -24,6 +24,7 ...
true
PaddlePaddle/Paddle
79,257
issue_to_patch
[cherry-pick] Optimize the compilation of sleef (#79242)
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
47eac8a2fa862a738353430f74c248935f7c913f
fd3803fb418efecfac55409580c745ace883d975
diff --git a/.gitmodules b/.gitmodules index 9cc275e82c7c1..8acd3a38a7a0d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -125,3 +125,4 @@ [submodule "third_party/sleef"] path = third_party/sleef url = https://github.com/shibatch/sleef.git + ignore = dirty diff --git a/cmake/external/sleef.cmake b/cmake/external/sle...
[ ".gitmodules", "cmake/external/sleef.cmake", "cmake/sleef.cmake" ]
[]
true
PaddlePaddle/Paddle
79,249
issue_to_patch
[Revert] Revert PR #79240 and #79170
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
44b28a74657074dc7b37e1cf3f9c5335dcb27a1c
a145a2998f93ba983a347e399f8410d27ce3b339
diff --git a/cmake/third_party.cmake b/cmake/third_party.cmake index 1bad4938a95e2..290d1fd198e3a 100755 --- a/cmake/third_party.cmake +++ b/cmake/third_party.cmake @@ -575,9 +575,29 @@ if(WITH_CUSPARSELT) list(APPEND third_party_deps extern_cusparselt) endif() -set(FLASHATTN_ENABLED OFF) +string(FIND "${CUDA_ARC...
[ "cmake/third_party.cmake", "paddle/fluid/CMakeLists.txt", "paddle/fluid/distributed/collective/CMakeLists.txt", "paddle/fluid/pybind/CMakeLists.txt" ]
[ { "comment": "这块是不是可以清理掉了?", "path": "python/paddle/distributed/fleet/meta_parallel/dualpipev.py", "hunk": "@@ -30,6 +30,56 @@\n except ImportError:\n deep_ep = None", "resolving_sha": "a145a2998f93ba983a347e399f8410d27ce3b339", "resolving_diff": "" }, { "comment": "**🟡 建议** `get_ev...
true
PaddlePaddle/Paddle
79,039
issue_to_patch
[API compatibility] Align torch.nn.Module
### PR Category User Experience ### PR Types New features, BC Breaking ### Description 对齐 `torch.nn.Module` 的以下 API 语义: - 补齐 `get_extra_state/set_extra_state` 与 `state_dict/load_state_dict` 联动,支持 `_extra_state` 保存、加载、`strict` 错误处理、`metadata`、`load hooks` 顺序、`dict-like` 校验和 `assign` 基本语义。 - 对齐 `state/load h...
44b28a74657074dc7b37e1cf3f9c5335dcb27a1c
824ba22084ecb5a15d51e0fb5e98d6cef1ff62b8
diff --git a/paddle/fluid/pybind/eager_method.cc b/paddle/fluid/pybind/eager_method.cc index 0564e61297e43..adeab579a40f8 100644 --- a/paddle/fluid/pybind/eager_method.cc +++ b/paddle/fluid/pybind/eager_method.cc @@ -1453,7 +1453,7 @@ static PyObject* tensor_method_detach(TensorObject* self, auto v = reinterpret_c...
[ "paddle/fluid/pybind/eager_method.cc", "paddle/phi/api/include/compat/ATen/ops/detach.h", "python/paddle/amp/auto_cast.py", "python/paddle/nn/layer/layers.py", "test/legacy_test/test_base_layer.py", "test/legacy_test/test_base_module.py", "test/legacy_test/test_detach.py", "test/legacy_test/test_imper...
[ { "comment": "这两个self._state_dict_hooks、self._state_dict_post_hooks\n\n是否只需要一个字典,本质是同一个东西吧。如果只是别名吗,那只用保留一个字典", "path": "python/paddle/nn/layer/layers.py", "hunk": "@@ -2645,9 +2664,14 @@ def register_state_dict_hook(\n return hook_remove_helper\n \n def register_state_dict_post_hook(\n- ...
diff --git a/test/legacy_test/test_base_layer.py b/test/legacy_test/test_base_layer.py index 09dbf17c8e4d4..f12e00da38ed6 100644 --- a/test/legacy_test/test_base_layer.py +++ b/test/legacy_test/test_base_layer.py @@ -467,6 +467,192 @@ def load_state_dict_post_hook(layer, incompatible_keys): {"weigh...
true
PaddlePaddle/Paddle
79,219
issue_to_patch
Fix VMM allocator hot paths and IPC slices
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
28e83f2ade8f4f850fe6dbc599d8ffbb6b4d1fbc
fc5b0a279004160a05e894129d73c0c9d1a25573
diff --git a/paddle/fluid/pybind/tensor.cc b/paddle/fluid/pybind/tensor.cc index cd795997f5243..bb6610d58f0de 100644 --- a/paddle/fluid/pybind/tensor.cc +++ b/paddle/fluid/pybind/tensor.cc @@ -200,7 +200,11 @@ namespace { void ShareTensorViaVmm(const DenseTensor &self, py::tuple *out) { auto *holder = dynami...
[ "paddle/fluid/pybind/tensor.cc", "paddle/phi/core/memory/allocation/allocator.h", "paddle/phi/core/memory/allocation/virtual_memory_auto_growth_best_fit_allocator.cc", "paddle/phi/core/memory/allocation/virtual_memory_auto_growth_best_fit_allocator.h", "paddle/phi/core/memory/allocation/vmm_ipc_allocation.h...
[]
diff --git a/test/cpp/fluid/memory/vmm_auto_growth_best_fit_allocator_test.cu b/test/cpp/fluid/memory/vmm_auto_growth_best_fit_allocator_test.cu index 70dfa14b5eb63..164cf745ec7aa 100644 --- a/test/cpp/fluid/memory/vmm_auto_growth_best_fit_allocator_test.cu +++ b/test/cpp/fluid/memory/vmm_auto_growth_best_fit_allocator...
true
PaddlePaddle/Paddle
79,261
issue_to_patch
Fix VMM allocator hot paths and IPC slices
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
47eac8a2fa862a738353430f74c248935f7c913f
0301193ffde88422226789f02b39e73f73669a88
diff --git a/paddle/fluid/pybind/tensor.cc b/paddle/fluid/pybind/tensor.cc index 12ab9d1b58c044..de795e2b4b277b 100644 --- a/paddle/fluid/pybind/tensor.cc +++ b/paddle/fluid/pybind/tensor.cc @@ -200,7 +200,11 @@ namespace { void ShareTensorViaVmm(const DenseTensor &self, py::tuple *out) { auto *holder = dyna...
[ "paddle/fluid/pybind/tensor.cc", "paddle/phi/core/memory/allocation/allocator.h", "paddle/phi/core/memory/allocation/virtual_memory_auto_growth_best_fit_allocator.cc", "paddle/phi/core/memory/allocation/virtual_memory_auto_growth_best_fit_allocator.h", "paddle/phi/core/memory/allocation/vmm_ipc_allocation.h...
[]
diff --git a/test/cpp/fluid/memory/vmm_auto_growth_best_fit_allocator_test.cu b/test/cpp/fluid/memory/vmm_auto_growth_best_fit_allocator_test.cu index 70dfa14b5eb637..164cf745ec7aa7 100644 --- a/test/cpp/fluid/memory/vmm_auto_growth_best_fit_allocator_test.cu +++ b/test/cpp/fluid/memory/vmm_auto_growth_best_fit_allocat...
true
PaddlePaddle/Paddle
79,242
issue_to_patch
Optimize the compilation of sleef
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
82c1f9003cab94bbbbe35379699b053cd8811279
b5e4a52a1bdc40122e82796cdbec367f54d47f7b
diff --git a/.gitmodules b/.gitmodules index 6cf4b6b5c06426..8e090e15727b02 100644 --- a/.gitmodules +++ b/.gitmodules @@ -125,3 +125,4 @@ [submodule "third_party/sleef"] path = third_party/sleef url = https://github.com/shibatch/sleef.git + ignore = dirty diff --git a/cmake/external/sleef.cmake b/cmake/external/s...
[ ".gitmodules", "cmake/external/sleef.cmake", "cmake/sleef.cmake" ]
[ { "comment": "**🟡 建议** 版本注释未同步更新\n\n当前注释仍写 `# Sleef version: 3.6.1`,但原来是通过 `set(SLEEF_TAG \"3.6.1\")` 明确锁定版本,现已改为跟随 submodule commit `6ee14bcae5fe92c2ff8b000d5a01102dab08d774`,两者对应关系不清晰。\n\n建议将注释更新为:\n```cmake\n# Sleef submodule: third_party/sleef @ 6ee14bc\n```\n或在 Description 中说明新 commit 对应的版本/标签。\n", "p...
true
PaddlePaddle/Paddle
79,241
issue_to_patch
[cherry-pick] fix repeat_interleave and normalize and swiglu_grad
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
e23968c8d7ceaeb1882328ae023ba045263d205f
3ee24ad0fb409af7bdc4a76ad734948826297b52
diff --git a/paddle/phi/kernels/cpu/p_norm_grad_kernel.cc b/paddle/phi/kernels/cpu/p_norm_grad_kernel.cc index 03347aad33beae..d8a93cc31d2ad5 100644 --- a/paddle/phi/kernels/cpu/p_norm_grad_kernel.cc +++ b/paddle/phi/kernels/cpu/p_norm_grad_kernel.cc @@ -55,6 +55,9 @@ void PNormGradKernel(const Context& dev_ctx, aut...
[ "paddle/phi/kernels/cpu/p_norm_grad_kernel.cc", "paddle/phi/kernels/funcs/repeat_tensor2index_tensor.cc", "paddle/phi/kernels/funcs/repeat_tensor2index_tensor.cu", "paddle/phi/kernels/gpu/p_norm_grad_kernel.cu", "paddle/phi/kernels/swiglu_grad_kernel.h", "test/legacy_test/test_norm_all.py", "test/legacy...
[]
diff --git a/test/legacy_test/test_norm_all.py b/test/legacy_test/test_norm_all.py index 9ece64f2f4487c..7f118a963aab89 100644 --- a/test/legacy_test/test_norm_all.py +++ b/test/legacy_test/test_norm_all.py @@ -1806,6 +1806,38 @@ def test_dygraph(self): ) +class API_PnormGradTest_ZeroSize(unittest.Test...
true
PaddlePaddle/Paddle
79,253
issue_to_patch
[CI] Fix docker image build failure handling
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
d9242d558766b5d24fa3231a798864c37cdd5cda
b40db187a8187cb20b909bd9b86f21263ae5a130
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 37a2ca40079b1..f967e3cf938a6 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -120,14 +120,15 @@ jobs: echo "${name}_image=${docker_image}" >> $GITHUB_OUTPUT set +e docker...
[ ".github/workflows/docker.yml" ]
[ { "comment": "You can simplify this logic and avoid toggling `set +e` / capturing `$?` by relying on Bash's `set -e` exception for `if` conditionals: `if docker pull ...; then` will not abort the script on pull failure, but `docker build` / `docker push` will still fail-fast. This also avoids potential quoting/...
true
PaddlePaddle/Paddle
79,250
issue_to_patch
[API Compatibility] Add cuda_stream to Paddle stream wrapper
### PR Category User Experience ### PR Types Improvements ### Description 参考 https://github.com/NVIDIA/cudnn-frontend/compare/develop...PFCCLab:cudnn-frontend:paddle 中 Paddle 适配对当前 CUDA stream 的处理:外部库原本使用 PyTorch 形态的 `torch.cuda.current_stream().cuda_stream` 获取 `cudaStream_t`,Paddle 适配需要改成 `stream_base.raw_str...
d9242d558766b5d24fa3231a798864c37cdd5cda
775654c85ba3c4c82b477745c26e46d282896b87
diff --git a/python/paddle/device/__init__.py b/python/paddle/device/__init__.py index 9fc1bcb5cb747..4347c99078ef6 100644 --- a/python/paddle/device/__init__.py +++ b/python/paddle/device/__init__.py @@ -1497,6 +1497,13 @@ def _as_parameter_(self): else: return ctypes.c_void_p(self.stream_base.ra...
[ "python/paddle/device/__init__.py", "test/legacy_test/test_cuda_stream_event.py" ]
[ { "comment": "这行是不是没测?覆盖率过不了吧?", "path": "python/paddle/device/__init__.py", "hunk": "@@ -1497,6 +1497,12 @@ def _as_parameter_(self):\n else:\n return ctypes.c_void_p(self.stream_base.raw_stream)\n \n+ @property\n+ def cuda_stream(self) -> int:\n+ if isinstance(self.str...
diff --git a/test/legacy_test/test_cuda_stream_event.py b/test/legacy_test/test_cuda_stream_event.py index d57965cf5ab85..21a375bba3217 100644 --- a/test/legacy_test/test_cuda_stream_event.py +++ b/test/legacy_test/test_cuda_stream_event.py @@ -193,6 +193,17 @@ def test_cuda_stream(self): self.assertTrue(t...
true
PaddlePaddle/Paddle
79,251
issue_to_patch
[API Compatibility] Add torch-compatible NVTX range context manager
### PR Category User Experience ### PR Types Improvements ### Description This PR adds a torch-compatible NVTX range context manager to Paddle's existing NVTX namespace: - `paddle.cuda.nvtx.range(msg, *args, **kwargs)` - `paddle.device.nvtx.range(msg, *args, **kwargs)` The wrapper follows `torch.cuda.nvtx.range` be...
d9242d558766b5d24fa3231a798864c37cdd5cda
bedbde59a5daedb2e00463161c8fc9e44db9bb5b
diff --git a/python/paddle/cuda/__init__.py b/python/paddle/cuda/__init__.py index a5599bbf517c9b..065b116c571869 100644 --- a/python/paddle/cuda/__init__.py +++ b/python/paddle/cuda/__init__.py @@ -16,7 +16,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Union +from contextlib import co...
[ "python/paddle/cuda/__init__.py", "python/paddle/device/__init__.py", "test/legacy_test/test_cuda_unittest.py" ]
[ { "comment": "```suggestion\n def range(msg: str, *args: Any, **kwargs: Any) -> generator 的返回值咋标来着太久了我忘了,你自己查去:\n```", "path": "python/paddle/device/__init__.py", "hunk": "@@ -2012,6 +2013,23 @@ class amp:\n class nvtx:\n \"\"\"Namespace for NVTX marker operations.\"\"\"\n \n+ @staticmethod\n+...
diff --git a/test/legacy_test/test_cuda_unittest.py b/test/legacy_test/test_cuda_unittest.py index 6e2bdf44d4f803..1f3d11cf7ce12d 100644 --- a/test/legacy_test/test_cuda_unittest.py +++ b/test/legacy_test/test_cuda_unittest.py @@ -17,6 +17,7 @@ import types import unittest import warnings +from unittest import mock ...
true
PaddlePaddle/Paddle
79,247
issue_to_patch
【Hackathon 10th Spring No.51】Deprecated Python 3.9 - part 6
<!-- TemplateReference: https://github.com/PaddlePaddle/Paddle/wiki/PULL-REQUEST-TEMPLATE--REFERENCE --> <!-- Demo: https://github.com/PaddlePaddle/Paddle/pull/24810 --> ### PR Category <!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | D...
7ef7b9c04aa379adf21738e3f9a76af66dd2c409
ff62e665e78f1e7a8ef3337360711073d671e457
diff --git a/.github/workflows/H-Coverage.yml b/.github/workflows/H-Coverage.yml index 766fd8092fb9fa..22ca839444cbc6 100644 --- a/.github/workflows/H-Coverage.yml +++ b/.github/workflows/H-Coverage.yml @@ -209,11 +209,12 @@ jobs: docker exec -t ${{ env.container_name }} /bin/bash -c ' source ~/.b...
[ ".github/workflows/H-Coverage.yml", ".github/workflows/Night_ALL_Coverage.yml", "CMakeLists.txt", "ci/inference_build.sh", "ci/run_mac_test.sh", "ci/run_setup.sh", "ci/utils.sh", "cmake/python_module.cmake", "paddle/common/flags.cc", "paddle/scripts/conda_build.py", "paddle/scripts/paddle_build....
[ { "comment": "The RuntimeError message concatenates two f-strings without a separating space, which will produce `now,you are using...` in the final message. Add a trailing space after the comma (or merge into one string) to keep the message readable.", "path": "setup.py", "hunk": "@@ -43,9 +43,9 @@\n v...
diff --git a/ci/run_mac_test.sh b/ci/run_mac_test.sh index 3eb384bd1b1abc..bfcee12eac4188 100644 --- a/ci/run_mac_test.sh +++ b/ci/run_mac_test.sh @@ -27,11 +27,7 @@ function run_mac_test() { ======================================== EOF - if [ "$1" == "cp38-cp38" ]; then - pip3.8 uninstall -y ...
true
PaddlePaddle/Paddle
79,240
issue_to_patch
[Build] Keep NVSHMEM available for FlashMask
### PR Category Environment Adaptation ### PR Types Bug fixes ### Description 修复 #79170 合入后 H-Coverage / FlashMask V3 仍需要 NVSHMEM 的场景。 #79170 已经在 DeepEP 相关 CMake 入口禁用了 GPU DeepEP;但它额外在 `cmake/third_party.cmake` 中对所有非 XPU 构建强制 `WITH_NVSHMEM=OFF`。这会覆盖 H-Coverage 显式传入的 `-DWITH_NVSHMEM=ON`,导致 `extern_nvshmem` 不再进入 thir...
d9242d558766b5d24fa3231a798864c37cdd5cda
6d8c56681e0e2d6dcfe12782b562cebfe65d28e8
diff --git a/cmake/third_party.cmake b/cmake/third_party.cmake index d9776f1cc54ad..1bad4938a95e2 100755 --- a/cmake/third_party.cmake +++ b/cmake/third_party.cmake @@ -575,33 +575,9 @@ if(WITH_CUSPARSELT) list(APPEND third_party_deps extern_cusparselt) endif() -string(FIND "${CUDA_ARCH_BIN}" "90" ARCH_BIN_CONTAI...
[ "cmake/third_party.cmake" ]
[ { "comment": "是否可以,在 XPU OR FA 的场景下开启,感觉不用 FA 的场景也不用 nvshmem", "path": "cmake/third_party.cmake", "hunk": "@@ -581,10 +581,6 @@ if(NOT WITH_GPU\n OR (ARCH_BIN_CONTAINS_90 EQUAL -1))\n set(WITH_NVSHMEM OFF)\n endif()\n-# DeepEP GPU retired, force disable NVSHMEM for non-XPU builds\n-if(NOT WITH_XPU)...
true
PaddlePaddle/Paddle
79,240
comment_to_fix
[Build] Keep NVSHMEM available for FlashMask
NVSHMEM gate is checking `CUDA_ARCH_BIN` via `string(FIND ...)`, but `CUDA_ARCH_BIN` is only defined when `CUDA_ARCH_NAME=Manual` (see `cmake/cuda.cmake` where it is `unset(CUDA_ARCH_BIN CACHE)` for all other modes). In common configurations like `CUDA_ARCH_NAME=Hopper/Blackwell/Auto`, this makes `ARCH_BIN_CONTAINS_90`...
d9242d558766b5d24fa3231a798864c37cdd5cda
6d8c56681e0e2d6dcfe12782b562cebfe65d28e8
diff --git a/cmake/third_party.cmake b/cmake/third_party.cmake index d9776f1cc54ad..1bad4938a95e2 100755 --- a/cmake/third_party.cmake +++ b/cmake/third_party.cmake @@ -575,33 +575,9 @@ if(WITH_CUSPARSELT) list(APPEND third_party_deps extern_cusparselt) endif() -string(FIND "${CUDA_ARCH_BIN}" "90" ARCH_BIN_CONTAI...
[ "cmake/third_party.cmake" ]
[ { "comment": "NVSHMEM gate is checking `CUDA_ARCH_BIN` via `string(FIND ...)`, but `CUDA_ARCH_BIN` is only defined when `CUDA_ARCH_NAME=Manual` (see `cmake/cuda.cmake` where it is `unset(CUDA_ARCH_BIN CACHE)` for all other modes). In common configurations like `CUDA_ARCH_NAME=Hopper/Blackwell/Auto`, this makes ...
true
PaddlePaddle/PaddleOCR
18,158
issue_to_patch
[cherry-pick] add PP-OCRv6 model download links (HuggingFace & ModelScope) to all README
57d1cb6ab797f8676da7ab82070ef873a60b07dc
e50e1137e1b6a39c4bec6bea17f2fd87ea84e99b
diff --git a/README.md b/README.md index 668ab730355..6458242fc13 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ English | [简体中文](./readme/README_cn.md) | [繁體中文](./readme/README - **Specialized scenarios**: Major improvements in digital displays, dot-matrix characters, tire prints, and industrial text re...
[ "README.md", "readme/README_ar.md", "readme/README_cn.md", "readme/README_es.md", "readme/README_fr.md", "readme/README_ja.md", "readme/README_ko.md", "readme/README_ru.md", "readme/README_tcn.md" ]
[]
true
PaddlePaddle/PaddleOCR
18,156
issue_to_patch
add PP-OCRv6 model download links (HuggingFace & ModelScope) to README
f0bef31f676ad73b950469ebfcef1904cf07eefb
40d9e917edfd72b92d66d2dbf278bfd87399aca0
diff --git a/README.md b/README.md index 668ab730355..6458242fc13 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ English | [简体中文](./readme/README_cn.md) | [繁體中文](./readme/README - **Specialized scenarios**: Major improvements in digital displays, dot-matrix characters, tire prints, and industrial text re...
[ "README.md", "readme/README_ar.md", "readme/README_cn.md", "readme/README_es.md", "readme/README_fr.md", "readme/README_ja.md", "readme/README_ko.md", "readme/README_ru.md", "readme/README_tcn.md" ]
[]
true
PaddlePaddle/PaddleOCR
18,153
issue_to_patch
fix inference_engine doc
83c5b7ba2f62bcc308bb9108bef7baf952b8b7a5
e93158c647aa06db30f0ff29287f9c322aea6226
diff --git a/docs/version3.x/inference_deployment/local_inference/inference_engine.en.md b/docs/version3.x/inference_deployment/local_inference/inference_engine.en.md index cfd0821b5b8..2a04434bf59 100644 --- a/docs/version3.x/inference_deployment/local_inference/inference_engine.en.md +++ b/docs/version3.x/inference_d...
[ "docs/version3.x/inference_deployment/local_inference/inference_engine.en.md", "docs/version3.x/inference_deployment/local_inference/inference_engine.md" ]
[]
true
PaddlePaddle/PaddleOCR
18,150
issue_to_patch
【cherry-pick】fix v6 docs
0bc13de323482dba0bd610f54693963dc8a0167d
03973038f889c842f267bfb767bedd0a4354bc9d
diff --git a/docs/version3.x/module_usage/text_detection.en.md b/docs/version3.x/module_usage/text_detection.en.md index 0e9f0359573..3cd8ac91269 100644 --- a/docs/version3.x/module_usage/text_detection.en.md +++ b/docs/version3.x/module_usage/text_detection.en.md @@ -25,7 +25,7 @@ The text detection module is a critic...
[ "docs/version3.x/module_usage/text_detection.en.md", "docs/version3.x/module_usage/text_detection.md", "docs/version3.x/module_usage/text_recognition.en.md", "docs/version3.x/module_usage/text_recognition.md", "docs/version3.x/pipeline_usage/OCR.en.md", "docs/version3.x/pipeline_usage/OCR.md" ]
[]
true
PaddlePaddle/PaddleOCR
18,149
issue_to_patch
【docs】fix v6 docs
0345142187dd23375f3c9ceaf74b27c51250be4e
92d3e4cf516b11a1e37e7fd1dca1ae133a6d4bd0
diff --git a/docs/version3.x/module_usage/text_detection.en.md b/docs/version3.x/module_usage/text_detection.en.md index 0e9f0359573..3cd8ac91269 100644 --- a/docs/version3.x/module_usage/text_detection.en.md +++ b/docs/version3.x/module_usage/text_detection.en.md @@ -25,7 +25,7 @@ The text detection module is a critic...
[ "docs/version3.x/module_usage/text_detection.en.md", "docs/version3.x/module_usage/text_detection.md", "docs/version3.x/module_usage/text_recognition.en.md", "docs/version3.x/module_usage/text_recognition.md", "docs/version3.x/pipeline_usage/OCR.en.md", "docs/version3.x/pipeline_usage/OCR.md" ]
[]
true
PaddlePaddle/PaddleOCR
18,143
issue_to_patch
【cp】fix readme
b03f46425e8ff4442b268ce449e3eef758146cd4
62044c0c63ad5ec12bc0831bdea7acffa6f3f031
diff --git a/README.md b/README.md index 3c976b2ba8f..668ab730355 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,6 @@ English | [简体中文](./readme/README_cn.md) | [繁體中文](./readme/README - **Specialized scenarios**: Major improvements in digital displays, dot-matrix characters, tire prints, and industrial text re...
[ "README.md", "mkdocs.yml", "readme/README_ar.md", "readme/README_cn.md", "readme/README_es.md", "readme/README_fr.md", "readme/README_ja.md", "readme/README_ko.md", "readme/README_ru.md", "readme/README_tcn.md" ]
[]
true
PaddlePaddle/PaddleOCR
18,142
issue_to_patch
fix readme
7265049b05adf69b7982b5e7c894ee088335cbc5
5adc73e690ef181d7668a78b421440f238d6edbe
diff --git a/README.md b/README.md index 3c976b2ba8f..668ab730355 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,6 @@ English | [简体中文](./readme/README_cn.md) | [繁體中文](./readme/README - **Specialized scenarios**: Major improvements in digital displays, dot-matrix characters, tire prints, and industrial text re...
[ "README.md", "readme/README_ar.md", "readme/README_cn.md", "readme/README_es.md", "readme/README_fr.md", "readme/README_ja.md", "readme/README_ko.md", "readme/README_ru.md", "readme/README_tcn.md" ]
[]
true
PaddlePaddle/PaddleOCR
18,140
issue_to_patch
update new mkdocs
b03f46425e8ff4442b268ce449e3eef758146cd4
823e1e2cf9f1d870d1f5cac2774389bc8c1f471a
diff --git a/mkdocs.yml b/mkdocs.yml index 6e98aa6db30..f9a6072031f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -104,8 +104,6 @@ plugins: PP-OCRv6: PP-OCRv6 使用教程: Usage Tutorial PP-OCRv6简介: PP-OCRv6 Introduction - PP-OCRv5简介: PP-OCRv5 Introduction - PP-OCRv5多...
[ "mkdocs.yml" ]
[]
true
PaddlePaddle/PaddleOCR
18,104
issue_to_patch
[Feat] Support PP-OCRv6
b53e29e858f47140bcfb8dc9d14846efa4edad22
0b7d2b2ac41f18dd989a2778a4732f830b1a2ef8
diff --git a/README.md b/README.md index aeb7f7e9a34..3c976b2ba8f 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,9 @@ English | [简体中文](./readme/README_cn.md) | [繁體中文](./readme/README ### 🔍 Universal Text Recognition (Scene OCR) > *The global gold standard for high-speed, multilingual text spotting.* -* **100+...
[ "README.md", "api_sdk/README.md", "api_sdk/README_cn.md", "api_sdk/go/README.md", "api_sdk/go/README_cn.md", "api_sdk/go/client_platform_test.go", "api_sdk/go/client_test.go", "api_sdk/go/doc.go", "api_sdk/go/models.go", "api_sdk/go/ocr.go", "api_sdk/go/operation.go", "api_sdk/go/results.go", ...
[]
diff --git a/api_sdk/go/client_platform_test.go b/api_sdk/go/client_platform_test.go deleted file mode 100644 index f959cdb5a06..00000000000 --- a/api_sdk/go/client_platform_test.go +++ /dev/null @@ -1,85 +0,0 @@ -package paddleocr - -import ( - "context" - "encoding/json" - "net/http" - "net/http/httptest" - "testing"...
true
PaddlePaddle/PaddleOCR
18,129
issue_to_patch
Fix PaddleOCR-VL HPS pipeline not using the vLLM server
The PaddleOCR-VL-1.6 HPS SDK ships a pipeline_config.yaml with `genai_config.backend: native`, which makes the pipeline run the VLM inside the Triton container instead of calling the dedicated vLLM server deployed by compose.yaml. The vLLM server stays completely idle while inference runs unbatched in the pipeline cont...
71c7fefbf5e8478bc7f14b2d9b095bb80580178b
e6e9c61332c5e86e185aeaf8df2fbffc8a0231d8
diff --git a/deploy/paddleocr_vl_docker/hps/prepare.sh b/deploy/paddleocr_vl_docker/hps/prepare.sh index 6cb724dd318..929e5c86b93 100755 --- a/deploy/paddleocr_vl_docker/hps/prepare.sh +++ b/deploy/paddleocr_vl_docker/hps/prepare.sh @@ -53,6 +53,14 @@ sed -i.bak \ "${PIPELINE_CONFIG}" rm -f "${PIPELINE_CONFIG}.ba...
[ "deploy/paddleocr_vl_docker/hps/prepare.sh" ]
[ { "comment": "```suggestion\n```", "path": "deploy/paddleocr_vl_docker/hps/prepare.sh", "hunk": "@@ -53,6 +53,19 @@ sed -i.bak \\\n \"${PIPELINE_CONFIG}\"\n rm -f \"${PIPELINE_CONFIG}.bak\"\n \n+# Some SDKs (e.g. PaddleOCR-VL-1.6) ship a pipeline config with\n+# `backend: native`, which makes the pi...
true
PaddlePaddle/PaddleOCR
18,129
comment_to_fix
Fix PaddleOCR-VL HPS pipeline not using the vLLM server
```suggestion ```
71c7fefbf5e8478bc7f14b2d9b095bb80580178b
e6e9c61332c5e86e185aeaf8df2fbffc8a0231d8
diff --git a/deploy/paddleocr_vl_docker/hps/prepare.sh b/deploy/paddleocr_vl_docker/hps/prepare.sh index 6cb724dd318..929e5c86b93 100755 --- a/deploy/paddleocr_vl_docker/hps/prepare.sh +++ b/deploy/paddleocr_vl_docker/hps/prepare.sh @@ -53,6 +53,14 @@ sed -i.bak \ "${PIPELINE_CONFIG}" rm -f "${PIPELINE_CONFIG}.ba...
[ "deploy/paddleocr_vl_docker/hps/prepare.sh" ]
[ { "comment": "```suggestion\n```", "path": "deploy/paddleocr_vl_docker/hps/prepare.sh", "hunk": "@@ -53,6 +53,19 @@ sed -i.bak \\\n \"${PIPELINE_CONFIG}\"\n rm -f \"${PIPELINE_CONFIG}.bak\"\n \n+# Some SDKs (e.g. PaddleOCR-VL-1.6) ship a pipeline config with\n+# `backend: native`, which makes the pi...
true
PaddlePaddle/PaddleOCR
18,130
issue_to_patch
refactor(langchain-paddleocr): migrate from HTTP API to PaddleOCR SDK
## Summary Migrate `langchain-paddleocr` from direct synchronous HTTP API calls to the official PaddleOCR SDK (`PaddleOCRClient`), aligning with the async Job API architecture in PaddleOCR 3.6.0+. ## Changes - **`pyproject.toml`**: Upgrade to `paddleocr>=3.6.0`, remove `paddlex[serving]`, `requests`, `numpy`, `proto...
71c7fefbf5e8478bc7f14b2d9b095bb80580178b
edd7f353bb50e897152efa33df0b3eebdca4579f
diff --git a/langchain-paddleocr/langchain_paddleocr/document_loaders/paddleocr_vl.py b/langchain-paddleocr/langchain_paddleocr/document_loaders/paddleocr_vl.py index cff731d3775..9e2fb2f377a 100644 --- a/langchain-paddleocr/langchain_paddleocr/document_loaders/paddleocr_vl.py +++ b/langchain-paddleocr/langchain_paddle...
[ "langchain-paddleocr/langchain_paddleocr/document_loaders/paddleocr_vl.py", "langchain-paddleocr/pyproject.toml", "langchain-paddleocr/tests/integration_tests/document_loaders/test_paddleocr_vl_loader.py", "langchain-paddleocr/tests/unit_tests/document_loaders/test_paddleocr_vl_loader.py" ]
[]
diff --git a/langchain-paddleocr/tests/integration_tests/document_loaders/test_paddleocr_vl_loader.py b/langchain-paddleocr/tests/integration_tests/document_loaders/test_paddleocr_vl_loader.py index c511fba5c80..0a7b14c3a94 100644 --- a/langchain-paddleocr/tests/integration_tests/document_loaders/test_paddleocr_vl_load...
true
PaddlePaddle/PaddleOCR
17,933
issue_to_patch
[Feat] Add PP-OCRv6 iOS Demo
77ddbafccdee5020368c16c6960e6ff51e40b971
5834b8e7cd627f006307fb8d48ddcd5c84f3e3f0
diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 00000000000..fe260a2c98f --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,194 @@ +# PaddleOCR Release SOP + +[中文](./RELEASING_cn.md) + +## Scope + +This document describes the standard release process for PaddleOCR. + +## Release Types + +The current proces...
[ "RELEASING.md", "RELEASING_cn.md", "deploy/ios_demo/.gitignore", "deploy/ios_demo/NOTICE", "deploy/ios_demo/PaddleOCRDemo.xcodeproj/project.pbxproj", "deploy/ios_demo/PaddleOCRDemo.xcodeproj/xcshareddata/xcschemes/PaddleOCRDemo.xcscheme", "deploy/ios_demo/PaddleOCRDemo.xcworkspace/contents.xcworkspaceda...
[]
diff --git a/deploy/ios_demo/scripts/extract_xctest_metrics.py b/deploy/ios_demo/scripts/extract_xctest_metrics.py new file mode 100755 index 00000000000..24b9e375513 --- /dev/null +++ b/deploy/ios_demo/scripts/extract_xctest_metrics.py @@ -0,0 +1,129 @@ +#!/usr/bin/env python3 +# Copyright (c) 2026 PaddlePaddle Author...
true
PaddlePaddle/PaddleOCR
18,133
issue_to_patch
add onnxruntime installation desc
71c7fefbf5e8478bc7f14b2d9b095bb80580178b
062b5f9b208d471bf5e9850c461b01fa5e9f2442
diff --git a/docs/version3.x/inference_deployment/local_inference/inference_engine.en.md b/docs/version3.x/inference_deployment/local_inference/inference_engine.en.md index 45c741a1a4d..cfd0821b5b8 100644 --- a/docs/version3.x/inference_deployment/local_inference/inference_engine.en.md +++ b/docs/version3.x/inference_d...
[ "docs/version3.x/inference_deployment/local_inference/inference_engine.en.md", "docs/version3.x/inference_deployment/local_inference/inference_engine.md" ]
[]
true
PaddlePaddle/PaddleOCR
18,124
issue_to_patch
add speed data
6d2e6fb9c7df029f9f5d626952f179d4c9e49344
e02cc271977066ac7974fd2f6ae8e567b9559204
diff --git a/docs/version3.x/inference_deployment/local_inference/inference_engine.en.md b/docs/version3.x/inference_deployment/local_inference/inference_engine.en.md index 9501d5ed48b..45c741a1a4d 100644 --- a/docs/version3.x/inference_deployment/local_inference/inference_engine.en.md +++ b/docs/version3.x/inference_d...
[ "docs/version3.x/inference_deployment/local_inference/inference_engine.en.md", "docs/version3.x/inference_deployment/local_inference/inference_engine.md", "docs/version3.x/module_usage/chart_parsing.en.md", "docs/version3.x/module_usage/chart_parsing.md", "docs/version3.x/module_usage/doc_img_orientation_cl...
[ { "comment": "ONNXRuntime 官方名字两个单词是分开写的:ONNX Runtime\n\nhttps://onnxruntime.ai/docs/", "path": "docs/version3.x/module_usage/chart_parsing.en.md", "hunk": "@@ -52,6 +52,14 @@ paddleocr chart_parsing -i \"{'image': 'https://paddle-model-ecology.bj.bcebos.co\n --engine transformers\n ```\n \n+If you c...
true
PaddlePaddle/PaddleOCR
18,121
issue_to_patch
[Feat] Add PP-OCRv6 Android Demo
1e5aa0ad31bc8a82cd8e1daef7adc24e577d2534
35b1339167286d0a5e4872e620daf06b115c3ec9
diff --git a/deploy/ppocr-android/.gitignore b/deploy/ppocr-android/.gitignore new file mode 100644 index 00000000000..62d8c741289 --- /dev/null +++ b/deploy/ppocr-android/.gitignore @@ -0,0 +1,93 @@ +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Built applicat...
[ "deploy/ppocr-android/.gitignore", "deploy/ppocr-android/README.md", "deploy/ppocr-android/README_en.md", "deploy/ppocr-android/app/build.gradle.kts", "deploy/ppocr-android/app/src/main/AndroidManifest.xml", "deploy/ppocr-android/app/src/main/java/com/paddle/ocr/demo/MainActivity.kt", "deploy/ppocr-andr...
[]
true