Skip to content

Improve CI DX#4352

Open
narendasan wants to merge 2 commits into
mainfrom
narendasan/push-xunsslrxsyuv
Open

Improve CI DX#4352
narendasan wants to merge 2 commits into
mainfrom
narendasan/push-xunsslrxsyuv

Conversation

@narendasan

Copy link
Copy Markdown
Collaborator

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant and/or add your own.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project (You can use the linters)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas and hacks
  • I have made corresponding changes to the documentation
  • I have added tests to verify my fix or my feature
  • New and existing unit tests pass locally with my changes
  • I have added the relevant labels to my PR in so that relevant reviewers are notified

@meta-cla meta-cla Bot added the cla signed label Jun 18, 2026
@github-actions github-actions Bot added component: tests Issues re: Tests component: core Issues re: The core compiler component: build system Issues re: Build system component: api [Python] Issues re: Python API component: runtime component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths labels Jun 18, 2026
@github-actions github-actions Bot requested a review from cehongwang June 18, 2026 22:30
Comment on lines +675 to +755
name: CI / Linux x86_64
if: ${{ always() }}
needs:
[
build,
L0-dynamo-converter-tests,
L0-dynamo-core-tests,
L0-py-core-tests,
L0-torchscript-tests,
L1-dynamo-core-tests,
L1-dynamo-compile-tests,
L1-torch-compile-tests,
L1-torchscript-tests,
L2-torch-compile-tests,
L2-dynamo-compile-tests,
L2-dynamo-core-tests,
L2-dynamo-plugin-tests,
L2-torchscript-tests,
L2-dynamo-distributed-tests,
]
runs-on: ubuntu-latest
steps:
- name: Aggregate job results
env:
RESULTS: ${{ toJSON(needs) }}
run: |
set -euo pipefail
# Emit two surfaces:
# * stdout / job exit code → drives the green/red rollup
# status that branch protection keys on.
# * $GITHUB_STEP_SUMMARY → the markdown that renders
# on the workflow run page, with a per-job result table.
python3 - <<'PY'
import json, os, sys
needs = json.loads(os.environ["RESULTS"])
by_result = {"success": [], "failure": [], "skipped": [], "cancelled": []}
for name, info in needs.items():
by_result.setdefault(info.get("result") or "unknown", []).append(name)
failed = sorted(by_result["failure"])
passed = sorted(by_result["success"])
skipped = sorted(by_result["skipped"])
cancelled = sorted(by_result["cancelled"])

# --- stdout: short pass/fail summary for the log tab ---
print(f"PASS: {len(passed)}")
print(f"FAIL: {len(failed)}")
print(f"SKIPPED: {len(skipped)} (label-gated or never started)")
print(f"CANCELLED: {len(cancelled)}")
if failed:
print()
print("Failed jobs:")
for name in failed:
print(f" - {name}")

# --- step summary: markdown table for reviewers ---
summary_path = os.environ.get("GITHUB_STEP_SUMMARY")
if summary_path:
icon = {"success": "✅", "failure": "❌", "skipped": "⏭️", "cancelled": "🚫"}
with open(summary_path, "a", encoding="utf-8") as f:
f.write("# CI / Linux x86_64 — rollup\n\n")
f.write(
f"**{len(passed)}** passed · "
f"**{len(failed)}** failed · "
f"**{len(skipped)}** skipped · "
f"**{len(cancelled)}** cancelled\n\n"
)
f.write("| Result | Job |\n|---|---|\n")
for status in ("failure", "cancelled", "skipped", "success"):
for name in sorted(by_result.get(status, [])):
f.write(f"| {icon.get(status, '?')} {status} | `{name}` |\n")
if failed:
f.write(
"\n> Click into a failed job above to see "
"the rendered test table (via `pytest-results-action`) "
"and the `::warning::Reproduce locally with: ...` hint "
"near the bottom of the log.\n"
)

if failed:
sys.exit(1)
PY
Comment on lines +422 to +496
name: CI / Linux x86_64 (RTX)
if: ${{ always() }}
needs:
[
build,
L0-dynamo-converter-tests,
L0-dynamo-core-tests,
L0-py-core-tests,
L1-dynamo-core-tests,
L1-dynamo-compile-tests,
L1-torch-compile-tests,
L2-torch-compile-tests,
L2-dynamo-compile-tests,
L2-dynamo-core-tests,
L2-dynamo-plugin-tests,
]
runs-on: ubuntu-latest
steps:
- name: Aggregate job results
env:
RESULTS: ${{ toJSON(needs) }}
# Surface a label so the markdown summary disambiguates RTX vs standard.
WORKFLOW_LABEL: "Linux x86_64 (RTX)"
run: |
set -euo pipefail
# Same logic as the non-RTX rollup: stdout for the rollup status,
# $GITHUB_STEP_SUMMARY for the reviewer-facing markdown table.
python3 - <<'PY'
import json, os, sys
needs = json.loads(os.environ["RESULTS"])
label = os.environ.get("WORKFLOW_LABEL", "Linux x86_64")
by_result = {"success": [], "failure": [], "skipped": [], "cancelled": []}
for name, info in needs.items():
by_result.setdefault(info.get("result") or "unknown", []).append(name)
failed = sorted(by_result["failure"])
passed = sorted(by_result["success"])
skipped = sorted(by_result["skipped"])
cancelled = sorted(by_result["cancelled"])

print(f"PASS: {len(passed)}")
print(f"FAIL: {len(failed)}")
print(f"SKIPPED: {len(skipped)} (label-gated or never started)")
print(f"CANCELLED: {len(cancelled)}")
if failed:
print()
print("Failed jobs:")
for name in failed:
print(f" - {name}")

summary_path = os.environ.get("GITHUB_STEP_SUMMARY")
if summary_path:
icon = {"success": "✅", "failure": "❌", "skipped": "⏭️", "cancelled": "🚫"}
with open(summary_path, "a", encoding="utf-8") as f:
f.write(f"# CI / {label} — rollup\n\n")
f.write(
f"**{len(passed)}** passed · "
f"**{len(failed)}** failed · "
f"**{len(skipped)}** skipped · "
f"**{len(cancelled)}** cancelled\n\n"
)
f.write("| Result | Job |\n|---|---|\n")
for status in ("failure", "cancelled", "skipped", "success"):
for name in sorted(by_result.get(status, [])):
f.write(f"| {icon.get(status, '?')} {status} | `{name}` |\n")
if failed:
f.write(
"\n> Click into a failed job above to see the "
"rendered test table (via `pytest-results-action`) "
"and the `::warning::Reproduce locally with: ...` "
"hint near the bottom of the log.\n"
)

if failed:
sys.exit(1)
PY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed component: api [Python] Issues re: Python API component: build system Issues re: Build system component: core Issues re: The core compiler component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: runtime component: tests Issues re: Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants