Skip to content

[das] ci: retest HCU memory allocation failures - #18

Merged
Xyzhao1999 merged 3 commits into
HYGON-AI:r2.13-dasfrom
Silence0218:perf/hcu-ci-parallel-tests
Oct 19, 2026
Merged

Xyzhao1999 merged 3 commits into
HYGON-AI:r2.13-dasfrom
Silence0218:perf/hcu-ci-parallel-tests

Conversation

@Silence0218

@Silence0218 Silence0218 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

📝 Summary of Changes

  • Set TF_PER_DEVICE_MEMORY_LIMIT_MB to 2048 MB by default in the HCU test runner, while allowing it to be overridden.
  • Pass the limit to Bazel test processes and build actions, and print the effective value in the test log.

🎯 Justification

An HCU test run attempted a 115.12 GiB device allocation and failed with HIP_ERROR_OutOfMemory. This change limits allocations made through TensorFlow’s StreamExecutor during testing, reducing the risk of oversized allocations while preserving the existing test coverage. It does not replace device isolation or cap memory used by every allocator.

🚀 Kind of Contribution

🐛 Bug Fix,
🧪 Tests

@Silence0218
Silence0218 deployed to ci-protection October 15, 2026 01:28 — with GitHub Actions Active

@hygon-ai-reviewer hygon-ai-reviewer 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.

AI Review

🟡 建议修改

发现有明确证据的问题,建议核对并处理。

已确认 1 个问题,其中 1 个已添加到对应代码行。

变更概览

本次变更主要包含:

  • 新增一个 CI 诊断脚本,将对并行 HCU 测试中仍失败的 18 个 bazel 测试目标逐条串行重跑,用于排查内存上限问题。
  • 将默认 pytest 命令清单切换为仅含 18 个失败用例的重测列表,移除默认路径下的 ctest 追加与跳过列表校验,并新增 TF_PER_DEVICE_MEMORY_LIMIT_MB 每设备显存上限传入 bazel 测试环境。
文件审查摘要
文件 变更 审查结果
scripts/ci/run_tensorflow_hcu_tests.sh 修改 · +9/-8 P2 × 1
scripts/ci/pytest_failed_18.sh 新增 · +25/-0 —
审查信息
  • 变更统计:2 个文件,+34/-8。
  • 覆盖情况:共 2 个文件,已完整审查 2 个。
  • 候选问题:2 项;证据复核过滤:1 项;发布前敏感信息保护:0 项。
  • 本服务以 GitHub 提供的 PR diff 为审查主体,PR 描述与按相关性选取的仓库片段仅用于核验;未执行代码或重跑测试,结论仍需维护者核验。
提交修复并推送新 commit 后,将自动审查 PR 的最新版本。

Comment thread scripts/ci/run_tensorflow_hcu_tests.sh Outdated
@Silence0218
Silence0218 deployed to ci-protection October 15, 2026 01:57 — with GitHub Actions Active

@hygon-ai-reviewer hygon-ai-reviewer 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.

AI Review

🟢 未发现有明确证据的问题

在已提供并完成审查的 diff 范围内未形成可确认问题。

变更概览

本次变更主要包含:

  • 为 HCU 测试脚本新增 TF_PER_DEVICE_MEMORY_LIMIT_MB 环境变量(默认 2048 MB),在配置摘要中打印,并通过 --test_env 传递给 bazel 测试进程。
文件审查摘要
文件 变更 审查结果
scripts/ci/run_tensorflow_hcu_tests.sh 修改 · +3/-0 —
审查信息
  • 变更统计:1 个文件,+3/-0。
  • 覆盖情况:共 1 个文件,已完整审查 1 个。
  • 候选问题:0 项;证据复核过滤:0 项;发布前敏感信息保护:0 项。
  • 本服务以 GitHub 提供的 PR diff 为审查主体,PR 描述与按相关性选取的仓库片段仅用于核验;未执行代码或重跑测试,结论仍需维护者核验。
CI 结果:质量门禁未通过

质量门禁检测到需处理的问题;敏感命中原文、字段值、路径和日志引用不在评论中展示,请由有权限的维护者查看原始报告并处理。

CI 失败证据:CI HCU
  • TensorFlow Linux x86 HCU:本批直接失败:L358 'Unable to establish SSL connection.' 后 L359 'Process completed with exit code 4.',为一个对外下载步骤与 github.com 建立 SSL 连接失败、以退出码 4 结束的网络层错误。此前 L137 git fetch 曾报网络错误,但 L144-146 重试成功并完成 SHA 校验,非本次失败根因。
    • 与本次改动的关系:无关;失败点在网络连接层(SSL 连接无法建立,进程退出码 4),发生在外部下载/传输步骤,本批未见代码编译或测试路径报错;早期 git fetch 网络错误已重试成功。本批无可引用 PR patch,但错误类型与代码内容之间无可核对的触发路径。
    • 建议:最小处理方向:先单独重跑该 job 排除瞬时网络抖动;若复现,检查 runner 到 github.com:443 的网络、代理与 TLS 状况,并为该下载步骤增加重试参数。暂不建议改动代码。

@Silence0218
Silence0218 force-pushed the perf/hcu-ci-parallel-tests branch from 8243d68 to 08559b5 Compare October 16, 2026 02:03
@Silence0218
Silence0218 deployed to ci-protection October 16, 2026 02:03 — with GitHub Actions Active

@hygon-ai-reviewer hygon-ai-reviewer 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.

AI Review

🟢 未发现有明确证据的问题

在已提供并完成审查的 diff 范围内未形成可确认问题。

变更概览

本次变更主要包含:

  • 重新启用 5 个 strategy_gather_test 目标的 HCU 测试:跳过清单删除 5 项并将预期跳过数从 61 调整为 56,同时新增 TF_PER_DEVICE_MEMORY_LIMIT_MB 环境变量(默认 2048MB)并通过 --test_env 传入 bazel 测试进程,以限制每设备显存占用。
文件审查摘要
文件 变更 审查结果
scripts/ci/hcu_test_skip_targets.txt 修改 · +0/-5 —
scripts/ci/run_tensorflow_hcu_tests.sh 修改 · +4/-1 —
审查信息
  • 变更统计:2 个文件,+4/-6。
  • 覆盖情况:共 2 个文件,已完整审查 2 个。
  • 候选问题:0 项;证据复核过滤:0 项;发布前敏感信息保护:0 项。
  • 本服务以 GitHub 提供的 PR diff 为审查主体,PR 描述与按相关性选取的仓库片段仅用于核验;未执行代码或重跑测试,结论仍需维护者核验。

@Silence0218
Silence0218 deployed to ci-protection October 16, 2026 06:09 — with GitHub Actions Active
@Silence0218
Silence0218 force-pushed the perf/hcu-ci-parallel-tests branch from 08559b5 to cbd54a9 Compare October 16, 2026 06:44
@Silence0218
Silence0218 force-pushed the perf/hcu-ci-parallel-tests branch from cbd54a9 to fe14327 Compare October 16, 2026 06:49
@Silence0218
Silence0218 deployed to ci-protection October 16, 2026 06:49 — with GitHub Actions Active

@hygon-ai-reviewer hygon-ai-reviewer 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.

AI Review

🟢 未发现有明确证据的问题

在已提供并完成审查的 diff 范围内未形成可确认问题。

变更概览

本次变更主要包含:

  • HCU CI 脚本为 Bazel 测试注入每设备显存上限环境变量 TF_PER_DEVICE_MEMORY_LIMIT_MB(默认 2048 MB,经 test_env 与 action_env 传递),并从跳过清单移除 strategy_gather 的 3 个测试目标以重新纳测,期望跳过目标数同步由 61 调整为 58,与移除数量一致。
文件审查摘要
文件 变更 审查结果
scripts/ci/run_tensorflow_hcu_tests.sh 修改 · +5/-1 —
scripts/ci/hcu_test_skip_targets.txt 修改 · +0/-3 —
审查信息
  • 变更统计:2 个文件,+5/-4。
  • 覆盖情况:共 2 个文件,已完整审查 2 个。
  • 候选问题:0 项;证据复核过滤:0 项;发布前敏感信息保护:0 项。
  • 本服务以 GitHub 提供的 PR diff 为审查主体,PR 描述与按相关性选取的仓库片段仅用于核验;未执行代码或重跑测试,结论仍需维护者核验。

@Silence0218
Silence0218 force-pushed the perf/hcu-ci-parallel-tests branch from fe14327 to 05bceec Compare October 17, 2026 00:53
@Silence0218
Silence0218 deployed to ci-protection October 17, 2026 00:53 — with GitHub Actions Active

@hygon-ai-reviewer hygon-ai-reviewer 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.

AI Review

🟢 未发现有明确证据的问题

在已提供并完成审查的 diff 范围内未形成可确认问题。

变更概览

本次变更主要包含:

  • HCU CI 脚本新增 TF_PER_DEVICE_MEMORY_LIMIT_MB(默认2048MB),通过 --test_env 与 --action_env 传入 bazel 测试以限制每设备显存上限。
  • 跳过名单移除两个 strategy_gather XLA 目标并重排条目顺序,预期跳过数量同步由61调整为59,被移除目标将重新参与测试。
文件审查摘要
文件 变更 审查结果
scripts/ci/run_tensorflow_hcu_tests.sh 修改 · +5/-1 —
docs/das/BUILDING.md 修改 · +0/-5 —
scripts/ci/hcu_test_skip_targets.txt 修改 · +1/-3 —
审查信息
  • 变更统计:3 个文件,+6/-9。
  • 覆盖情况:共 3 个文件,已完整审查 3 个。
  • 候选问题:0 项;证据复核过滤:0 项;发布前敏感信息保护:0 项。
  • 本服务以 GitHub 提供的 PR diff 为审查主体,PR 描述与按相关性选取的仓库片段仅用于核验;未执行代码或重跑测试,结论仍需维护者核验。

@Silence0218
Silence0218 force-pushed the perf/hcu-ci-parallel-tests branch from 05bceec to 7be16e2 Compare October 17, 2026 05:51
@Silence0218
Silence0218 deployed to ci-protection October 17, 2026 05:51 — with GitHub Actions Active

@hygon-ai-reviewer hygon-ai-reviewer 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.

AI Review

🟢 未发现有明确证据的问题

在已提供并完成审查的 diff 范围内未形成可确认问题。

变更概览

本次变更主要包含:

  • CI 脚本新增 TF_PER_DEVICE_MEMORY_LIMIT_MB 设置(默认 2048MB),并通过 bazel 的 --test_env 与 --action_env 传递给测试及构建动作,用于限制 HCU 每设备内存使用。
  • BUILDING.md 移除关于 DTK 26.10 Ubuntu 22.04 包与 Ubuntu 20.04 基础镜像组合需先确认兼容性的警示段落,其余构建说明保留。
文件审查摘要
文件 变更 审查结果
docs/das/BUILDING.md 修改 · +0/-5 —
scripts/ci/run_tensorflow_hcu_tests.sh 修改 · +4/-0 —
审查信息
  • 变更统计:2 个文件,+4/-5。
  • 覆盖情况:共 2 个文件,已完整审查 2 个。
  • 候选问题:0 项;证据复核过滤:0 项;发布前敏感信息保护:0 项。
  • 本服务以 GitHub 提供的 PR diff 为审查主体,PR 描述与按相关性选取的仓库片段仅用于核验;未执行代码或重跑测试,结论仍需维护者核验。

@Xyzhao1999
Xyzhao1999 deployed to ci-protection October 19, 2026 03:49 — with GitHub Actions Active

@hygon-ai-reviewer hygon-ai-reviewer 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.

AI Review

🟢 未发现有明确证据的问题

在已提供并完成审查的 diff 范围内未形成可确认问题。

变更概览

本次变更主要包含:

  • HCU 测试脚本默认设置 TF_PER_DEVICE_MEMORY_LIMIT_MB=2048,并通过 bazel 的 --test_env 与 --action_env 将该限制传入测试进程和构建动作,同时在测试日志中打印生效值。
文件审查摘要
文件 变更 审查结果
docs/das/BUILDING.md 修改 · +0/-5 —
scripts/ci/run_tensorflow_hcu_tests.sh 修改 · +4/-0 —
审查信息
  • 变更统计:2 个文件,+4/-5。
  • 覆盖情况:共 2 个文件,已完整审查 2 个。
  • 候选问题:1 项;证据复核过滤:1 项;发布前敏感信息保护:0 项。
  • 本服务以 GitHub 提供的 PR diff 为审查主体,PR 描述与按相关性选取的仓库片段仅用于核验;未执行代码或重跑测试,结论仍需维护者核验。

@Xyzhao1999
Xyzhao1999 merged commit 482d983 into HYGON-AI:r2.13-das Oct 19, 2026
9 of 10 checks passed

This branch was successfully deployed

1 active deployment
ci-protection — 5389e2e3 Deployed Oct 19, 2026 by Xyzhao1999 via Manual approval for HCU CI #32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants