Skip to content

Conversation

@zhiyuan1i
Copy link
Collaborator

@zhiyuan1i zhiyuan1i commented Jun 25, 2025

Summary by CodeRabbit

  • Refactor

    • Simplified and unified multiple CI workflows by replacing detailed, job-specific logic with calls to a new reusable workflow.
    • Consolidated and renamed jobs across Intel and NVIDIA GPU workflows for consistency and maintainability.
    • Centralized test logic and environment setup in a single reusable workflow, reducing duplication and streamlining maintenance.
  • Chores

    • Broadened workflow triggers to support all branches in some workflows.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 25, 2025

Warning

Rate limit exceeded

@zhiyuan1i has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 23 minutes and 41 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 5bdc282 and 0d57d98.

📒 Files selected for processing (1)
  • .github/workflows/reusable-ci-tests.yml (1 hunks)

"""

Walkthrough

The pull request refactors all GPU-specific GitHub Actions CI workflows by replacing detailed, inline job steps with calls to a new reusable workflow. This reusable workflow, defined in .github/workflows/reusable-ci-tests.yml, standardizes CI logic for different hardware backends and PyTorch versions, simplifying maintenance and configuration.

Changes

File(s) Change Summary
.github/workflows/intel-a770.yml Replaced detailed inline job with a single job invoking the reusable workflow for Intel A770.
.github/workflows/nvidia-4090.yml
.github/workflows/nvidia-a100.yml
Refactored two separate jobs in each file into a single job calling the reusable workflow for each GPU.
.github/workflows/nvidia-h100.yml Replaced two jobs with three jobs, each invoking the reusable workflow for different PyTorch versions.
.github/workflows/reusable-ci-tests.yml Added a new reusable workflow defining standardized CI jobs for ops and models testing.

Sequence Diagram(s)

sequenceDiagram
    participant Workflow File
    participant Reusable CI Workflow
    participant Self-hosted Runner
    participant Conda/Python Env
    participant PyTorch/GPU

    Workflow File->>Reusable CI Workflow: Invoke with parameters (runner, gpu_type, etc.)
    Reusable CI Workflow->>Self-hosted Runner: Start test-ops job
    Self-hosted Runner->>Conda/Python Env: Setup environment
    Self-hosted Runner->>PyTorch/GPU: (Optional) Check GPU availability
    Self-hosted Runner->>Self-hosted Runner: Detect changes, find dependent tests
    Self-hosted Runner->>Conda/Python Env: Install dependencies
    Self-hosted Runner->>Self-hosted Runner: Run pytest for ops (standard/varlen)
    Self-hosted Runner->>Self-hosted Runner: Verify Python package import
    Reusable CI Workflow->>Self-hosted Runner: Start test-models job (after test-ops)
    Self-hosted Runner->>Self-hosted Runner: Run pytest for models (standard/varlen)
Loading

Possibly related PRs

  • #473: Updates the intel-a770 workflow job naming and environment variables; related as both PRs modify the same workflow file at different abstraction levels.
  • #274: Modifies conditional execution in the intel-a770 workflow; directly related since the current PR replaces the detailed workflow that this PR updates.

Suggested reviewers

  • yzhangcs

Poem

Hopping through workflows, I see,
Old scripts replaced with unity!
One reusable path for every test,
GPU or PyTorch—each request addressed.
Now CI’s garden is tidy and neat,
With carrots (and coverage) oh so sweet!
🥕✨
"""

✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in Comment
  • Commit Unit Tests in branch gpu-ci

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

♻️ Duplicate comments (3)
.github/workflows/reusable-ci-tests.yml (1)

205-207: Mirror the fix in the models job

test-models declares the same hard-coded value; update it exactly as in the ops job to avoid divergence.

-      PYTORCH_CUDA_VERSION: 'cu128'
+      PYTORCH_CUDA_VERSION: '${{ inputs.pytorch_cuda_version }}'
.github/workflows/nvidia-a100.yml (1)

18-27: Same unreleased PyTorch 2.7.0 issue as above – see A770 comment for details/fix.

.github/workflows/nvidia-4090.yml (1)

24-27: Unreleased PyTorch 2.7.0 again – will fail just like the other two files.
Apply the same version fix or parameterise the version in the reusable workflow.

🧹 Nitpick comments (3)
.github/workflows/reusable-ci-tests.yml (1)

57-70: Improve robustness of the Conda discovery script

Minor but valuable hardening:

  • Use set -euo pipefail to fail fast on undefined variables.
  • Quote $CANDIDATE_PATH and $FOUND_PATH to survive paths with spaces.
  • Return early when a match is found instead of continuing the loop.

No functional change, but makes future debugging easier.

.github/workflows/intel-a770.yml (1)

18-27: Consider matrix-testing instead of hard-coding a single job.
A simple matrix { {2.1.0,2.2.0}, {release,nightly} } would reuse the same reusable workflow while improving coverage and reducing copy-paste between GPU files.

.github/workflows/nvidia-a100.yml (1)

18-27: Nit: job-id naming drift (test-a100-pytorch-2-7) will need an update once version changes.
Using a neutral id such as test-a100 avoids future churn.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c1eb9d4 and 5b3fd37.

📒 Files selected for processing (5)
  • .github/workflows/intel-a770.yml (1 hunks)
  • .github/workflows/nvidia-4090.yml (1 hunks)
  • .github/workflows/nvidia-a100.yml (1 hunks)
  • .github/workflows/nvidia-h100.yml (1 hunks)
  • .github/workflows/reusable-ci-tests.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Test H100 (PyTorch 2.7) / test-models
  • GitHub Check: Test H100 (PyTorch Nightly) / test-ops
🔇 Additional comments (2)
.github/workflows/nvidia-h100.yml (1)

49-51: Mismatching CUDA version between caller & callee

The job passes pytorch_cuda_version: 'cu126', but the reusable workflow currently overwrites the env to cu128 (see previous comment).
After fixing the reusable workflow, double-check that 'cu126' really propagates, otherwise the 2.6 wheel resolution will fail.

.github/workflows/intel-a770.yml (1)

18-27: PyTorch 2.7.0 doesn’t yet exist – job will fail at environment-setup time.
Current latest upstream release is 2.2.x. The conda/pip install step inside reusable-ci-tests.yml will error out, aborting every A770 run.

-      pytorch_version: '2.7.0'
+      # keep this in sync with the highest *released* version
+      pytorch_version: '2.2.0'

Run once to prove the version absence:

#!/bin/bash
curl -s https://pypi.org/pypi/torch/json | jq -r '.releases | keys[]' | grep -q '^2\.7\.0$' && echo "found" || echo "NOT FOUND"

@zhiyuan1i zhiyuan1i merged commit c26aab2 into main Jun 25, 2025
11 checks passed
@zhiyuan1i zhiyuan1i deleted the gpu-ci branch June 25, 2025 23:34
zhiyuan1i added a commit that referenced this pull request Jun 25, 2025
yzhangcs pushed a commit that referenced this pull request Jun 26, 2025
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.

1 participant