Skip to content

[Execute Infrastructure] Align ATen compat checks with PyTorch 2.13.0#79457

Open
youge325 wants to merge 1 commit into
PaddlePaddle:developfrom
youge325:update/aten-compat-pytorch-2.13
Open

[Execute Infrastructure] Align ATen compat checks with PyTorch 2.13.0#79457
youge325 wants to merge 1 commit into
PaddlePaddle:developfrom
youge325:update/aten-compat-pytorch-2.13

Conversation

@youge325

Copy link
Copy Markdown
Contributor

PR Category

Execute Infrastructure

PR Types

BC Breaking

Description

将 ATen C++ compat 静态签名基线从 PyTorch 2.12.1 升级到 2.13.0。

  • Static-Check 使用 torch==2.13.0 CPU wheel,并同步更新本地安装提示。
  • 删除 PyTorch 2.13.0 已不再公开的 TensorBase::has_namesTensor::renameATen/ops/rename.h
  • 删除仅验证上述旧接口的 Paddle compat 测试及 CMake 注册。
  • Python checker 单测 37 项通过,使用 libtorch 2.13.0 对现有 compat headers 执行 --all 扫描通过。

该变更会移除不再属于 PyTorch 2.13.0 public C++ API 的 compat 接口,因此标记为 BC Breaking。

是否引起精度变化

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Paddle’s ATen C++ compat static signature-check baseline from PyTorch 2.12.1 to 2.13.0, removing compat stubs/tests for APIs that are no longer part of PyTorch 2.13.0’s public C++ surface (notably TensorBase::has_names and Tensor::rename).

Changes:

  • Bump the static-check/install hint Torch version from 2.12.1 to 2.13.0 in both CI and the Python checker.
  • Remove compat header stub ATen/ops/rename.h and the Tensor::rename/TensorBase::has_names compat declarations.
  • Remove the dedicated C++ compat unit test and CMake registration that only exercised the removed APIs.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tools/check_aten_ops_signature.py Updates Torch install hint used by the signature checker to PyTorch 2.13.0.
ci/static_check.sh Updates CI static-check to install torch==2.13.0 for signature scanning.
paddle/phi/api/include/compat/ATen/core/TensorBase.h Removes TensorBase::has_names compat API.
paddle/phi/api/include/compat/ATen/core/TensorBody.h Removes Tensor::rename compat API declaration.
paddle/phi/api/include/compat/ATen/Functions.h Drops include of the removed ATen/ops/rename.h.
paddle/phi/api/include/compat/ATen/ops/rename.h Deletes the compat stub header for Tensor::rename.
test/cpp/compat/ATen_basic_test.cc Removes unit coverage that referenced has_names().
test/cpp/compat/CMakeLists.txt Removes the ATen_rename_test target registration.
test/cpp/compat/ATen_rename_test.cc Deletes the compat unit tests for Tensor::rename.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ci/static_check.sh
Comment on lines 205 to +206
pip install --target "${aten_ops_signature_torch_target}" \
torch==2.12.1 --index-url https://download.pytorch.org/whl/cpu 1>nul
torch==2.13.0 --index-url https://download.pytorch.org/whl/cpu 1>nul

@risemeup1111 risemeup1111 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

已完成首轮评审。整体变更集中在将 ATen compat 静态签名基线对齐到 PyTorch 2.13.0,并移除不再公开的 rename / has_names 兼容接口;未发现需要阻塞合入的正确性问题。

有一处低优先级脚本清理建议已放在行级评论里,作者回复或顺手修正后即可。

Powered by Nyanpasu with gpt-5.5 xhigh, please check the suggestions carefully.

Comment thread ci/static_check.sh
aten_ops_signature_torch_target=$(mktemp -d)
pip install --target "${aten_ops_signature_torch_target}" \
torch==2.12.1 --index-url https://download.pytorch.org/whl/cpu 1>nul
torch==2.13.0 --index-url https://download.pytorch.org/whl/cpu 1>nul

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P3 优先级:P3

1>nul 在 Linux bash 下会把 stdout 重定向到当前目录的字面文件 nul,不会丢弃输出;这条 static check 路径触发后可能在 workspace 留下多余文件,并且和脚本里其他 /dev/null 用法不一致。请改成 /dev/null

处理要求:请针对该评论进行回复(同意并已修改请回复 Done,不同意请说明理由)。

Suggested change
torch==2.13.0 --index-url https://download.pytorch.org/whl/cpu 1>nul
torch==2.13.0 --index-url https://download.pytorch.org/whl/cpu 1>/dev/null

@PaddlePaddle-bot PaddlePaddle-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 Paddle-CI-Agent | pr_review | 2026-07-10 21:57:20

📋 Review 摘要

PR 概述:将 ATen C++ compat 静态签名基线从 PyTorch 2.12.1 升级到 2.13.0,并移除 2.13.0 不再公开的 rename/has_names 兼容接口。
变更范围ci/static_check.shtools/check_aten_ops_signature.pypaddle/phi/api/include/compat/ATen/test/cpp/compat/
影响面 Tag[Execute Infrastructure]

问题

未发现阻塞性问题。PR 规范问题在下面章节报,不在这里重复。

📝 PR 规范检查

符合规范。标题使用 [Execute Infrastructure],PR 描述包含 PR CategoryPR TypesDescription是否引起精度变化 四个必填 section,精度变化填写为

总体评价

本轮按风险优先审查了 ATen compat 静态检查基线、删除的 compat public API 及对应测试注册。rename / has_names 的残留引用已清除,签名检查脚本和本地安装提示同步到了同一 torch 版本,未发现需要阻塞合入的问题。

@PaddlePaddle-bot

PaddlePaddle-bot commented Jul 10, 2026

Copy link
Copy Markdown

🤖 Paddle-CI-Agent | ci_status_monitor | 2026-07-14 02:01:45 UTC+08:00

CI报告基于以下代码生成(30分钟更新一次):
PR commit: 07d2f31 | Merge base: d53ee6a (branch: develop)


1 Required任务 : 39/48 通过

总执行(rerun次数) 总任务 ✅ 通过 ❌ 失败 ⏳ 运行中 ⏸️ 等待中 跳过
80(0) 80 70 8 0 0 2
任务 错误类型 置信度 日志
DeepMD-Kit-Test / DeepMD-Kit Integration Test 环境问题 Job
Static-Check / Test PR问题 Job
Coverage build 环境问题 Job
Fleet Unit test (multi-card) 环境问题 Job
Fleet Unit test (single card) 环境问题 Job
Check approval 需要 Approval Job
CE-Framework / Infer 环境问题 Job
Mac-CPU / Build and test 未知 Job

2 失败详情

🔴 DeepMD-Kit-Test / DeepMD-Kit Integration Test — 环境问题(置信度: 高)

失败用例: 不适用(安装 PaddlePaddle 阶段失败)

用例 错误摘要
Install PaddlePaddle PR wheel 下载时网络不可达

关键日志:

WARNING: Retrying ... Failed to establish a new connection: [Errno 101] Network is unreachable
ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='paddle-github-action.bj.bcebos.com', port=443): Max retries exceeded
  • 根因摘要: PR wheel 下载网络不可达
    DeepMD-Kit 集成测试在安装 PaddlePaddle 阶段失败,目标 wheel 来自 paddle-github-action.bj.bcebos.com/PR/build/79457/.../paddlepaddle_gpu-0.0.0...whl。日志显示多次重试后仍然 Network is unreachable,未进入 deepmd-kit clone、依赖安装或 pytest 阶段。

修复建议:

  1. 环境问题,请 rerun。

关联变更: 未发现与 PR 代码变更直接相关。

🔴 Static-Check / Test — PR问题(置信度: 高)

失败用例: 不适用(Static check 阶段失败)

用例 错误摘要
ci/static_check.sh 无法安装 torch==2.13.0,导致 ATen signature check 找不到 libtorch headers

关键日志:

ERROR: Could not find a version that satisfies the requirement torch==2.13.0 (from versions: none)
ERROR: No matching distribution found for torch==2.13.0
ATen ops signature check error: Cannot find libtorch headers.
  • 根因摘要: torch 2.13.0 安装目标不可用
    PR 将 ci/static_check.sh 中 ATen signature check 的安装目标从 torch==2.12.1 改为 torch==2.13.0,同时更新了 tools/check_aten_ops_signature.py 的提示。当前 CI 使用的 PyTorch CPU wheel index 没有提供该版本,pip 安装失败后 checker 无法找到 libtorch headers,因此 static-check 直接失败。

修复建议:

  1. 将 ATen compat 检查目标改为当前 PyTorch CPU wheel index 实际可安装的版本,或先提供/确认 torch==2.13.0 wheel 后再更新 ci/static_check.shtools/check_aten_ops_signature.py

关联变更: ci/static_check.shtools/check_aten_ops_signature.py

🔴 Coverage build — 环境问题(置信度: 高)

失败用例: 不适用(Coverage build 阶段失败)

用例 错误摘要
test/cpp/jittest/cpp/new_executor 下载 lm_main_program 连续超时后构建失败

关键日志:

--2026-07-10 14:51:38--  (try:20)  https://paddle-ci.gz.bcebos.com/new_exec/lm_main_program
Connecting to paddle-ci.gz.bcebos.com|14.215.183.199|:443... failed: Connection timed out.
Giving up.
gmake[2]: *** [test/cpp/jit/CMakeFiles/jit_download_program.dir/build.make:70: test/cpp/jit/CMakeFiles/jit_download_program] Error 4
  • 根因摘要: 外部测试资源下载超时
    Coverage build 在构建 jit_download_program / download_program 时需要下载 paddle-ci.gz.bcebos.com/new_exec/lm_main_program。日志显示连接连续超时直到第 20 次重试后 Giving up,构建因此退出;未发现 C++ 编译错误或与本 PR ATen 变更相关的报错。

修复建议:

  1. 环境问题,请 rerun。

关联变更: 未发现与 PR 代码变更直接相关。

🔴 Fleet Unit test (multi-card) — 环境问题(置信度: 高)

失败用例: 不适用(容器启动阶段失败)

用例 错误摘要
Check docker image and run container GPU 容器 runtime 初始化超时

关键日志:

docker: Error response from daemon: failed to create task for container
OCI runtime create failed: runc create failed: unable to start container process
nvidia-container-cli: initialization error: driver rpc error: timed out: unknown.
  • 根因摘要: GPU 容器 runtime 超时
    Fleet multi-card job 在容器启动阶段失败,尚未进入 PaddleFleet 安装、wheel 安装或 multi-card test。错误来自 nvidia-container-cli 初始化 GPU runtime 时 driver rpc 超时,属于 runner/GPU 容器环境异常。

修复建议:

  1. 环境问题,请 rerun。

关联变更: 未发现与 PR 代码变更直接相关。

🔴 Fleet Unit test (single card) — 环境问题(置信度: 高)

失败用例: 不适用(容器启动阶段失败)

用例 错误摘要
Check docker image and run container GPU 容器 runtime 初始化超时,单卡测试未开始

关键日志:

docker: Error response from daemon: failed to create task for container
OCI runtime create failed: runc create failed: unable to start container process
nvidia-container-cli: initialization error: driver rpc error: timed out: unknown.
##[error]Process completed with exit code 125.
  • 根因摘要: GPU 容器 runtime 初始化超时
    该 job 在 Check docker image and run container 阶段失败,Install PaddleFleet、下载 Paddle wheel 和 Single card test 均被跳过。错误发生在容器 runtime 初始化阶段,来自 nvidia-container-cli 的 driver rpc timeout,与本 PR 的 ATen compat/static-check 代码变更无直接关系。

修复建议:

  1. 环境问题,请 rerun。

关联变更: 未发现与 PR 代码变更直接相关。

🔴 Check approval — 需要 Approval(置信度: 高)
  • 根因摘要: 该 Job 需要人工 Approval,完成审批后 CI 才会继续执行。

修复建议:

  1. 请通过人工审批。
🔴 CE-Framework / Infer — 环境问题(置信度: 中)

失败用例: 不适用(PaddleTest 下载/解压阶段失败)

用例 错误摘要
Download Paddle and PaddleTest PaddleTest.tar.gz 解压命令返回 exit code 2

关键日志:

Downloading PaddleTest.tar.gz
Extracting PaddleTest.tar.gz
##[error]Process completed with exit code 2.
  • 根因摘要: PaddleTest 测试包解压失败
    CE-Framework / Infer 在下载并解压外部 PaddleTest.tar.gz 阶段失败,wget 后执行 tar -zvxf PaddleTest.tar.gz 立即以 2 退出。tar 的 stderr 被 CI 脚本重定向,无法进一步确认是下载包损坏、文件不完整还是外部存储瞬时异常;该阶段发生在安装 Paddle 和 Infer 检查之前,且 PR 仅修改 ATen compat/static-check 文件,未触及该流程。

修复建议:

  1. 环境问题,请 rerun;若复现,建议在 CI 脚本临时保留 tar stderr 或校验 PaddleTest.tar.gz 完整性。

关联变更: 未发现与 PR 代码变更直接相关。

🔴 Mac-CPU / Build and test — 未知(置信度: 低)

失败用例: 未能提取

用例 错误摘要
Test with mac python3.10 深度日志返回“日志获取失败,无法提取错误信息”

关键日志:

failed_steps: Test with mac python3.10
error_snippet: (日志获取失败,无法提取错误信息)
  • 根因摘要: Mac 测试日志不可用
    该 job 的深度日志只返回失败 step,没有 log_file_pathunittest_details 或可用 traceback。按日志读取约束,未对 ci_logs 目录做大范围搜索,因此无法判断是否与 PR 变更相关。

修复建议:

  1. 置信度低,先补充可用日志或 rerun;当前不给具体代码修改建议。

关联变更: 未分析。

@paddle-bot paddle-bot Bot added the contributor External developers label Jul 10, 2026
@paddle-bot

paddle-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants