Skip to content

Conversation

@zhiyuan1i
Copy link
Collaborator

@zhiyuan1i zhiyuan1i commented Jul 31, 2025

Summary by CodeRabbit

  • Chores
    • Improved Docker image handling and cleanup in build workflow.
    • Updated package installation method for testing, switching to standard PyPI installation for a dependency.
    • Refined Python version targeting for builds to focus on versions 3.10 through 3.13.
    • Increased timeout limits for nightly and release builds to enhance stability.
    • Added skip parameters to streamline test build processes.

@gemini-code-assist
Copy link

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 31, 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 12 minutes and 56 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 110397b and abf33d6.

📒 Files selected for processing (2)
  • .github/workflows/reusable-build-triton.yml (3 hunks)
  • .github/workflows/triton-builder.yml (2 hunks)

Walkthrough

This update modifies four GitHub Actions workflow files. The build workflow now explicitly pulls the correct manylinux Docker image based on architecture and prunes unused images, removing an environment variable. The CI test workflow changes the causal-conv1d installation method from a Git commit URL to a PyPI upgrade. The triton-builder workflow narrows the Python build versions to 3.10–3.13. The nightly workflow increases timeouts and adds a skip parameter for older Python versions.

Changes

Cohort / File(s) Change Summary
Triton Build Workflow
.github/workflows/reusable-build-triton.yml
Pulls the correct manylinux Docker image for the specified architecture, prunes unused Docker images, and removes the CIBW_FREE_THREADED_SUPPORT environment variable.
CI Test Workflow
.github/workflows/reusable-ci-tests.yml
Changes causal-conv1d installation in the test-models job from a Git commit URL to a standard PyPI upgrade command.
Triton Builder Workflow
.github/workflows/triton-builder.yml
Modifies build matrix to explicitly target Python versions 3.10, 3.11, 3.12, and 3.13 instead of all 3.x versions; increases build timeout values for x86_64 and aarch64.
Triton Nightly Workflow
.github/workflows/triton-nightly.yml
Increases build timeout values for x86_64 and aarch64 architectures and adds cibw-skip parameter to skip Python 3.5–3.9 builds.

Sequence Diagram(s)

sequenceDiagram
    participant Workflow as GitHub Actions Workflow
    participant Docker as Docker Daemon
    participant PyPI as PyPI Repository

    %% Triton Build Workflow
    Workflow->>Docker: Pull manylinux image (x86_64 or aarch64)
    Docker-->>Workflow: Image ready
    Workflow->>Docker: Prune unused images

    %% CI Test Workflow
    Workflow->>PyPI: pip install -U causal-conv1d (if runner is nvidia-h100)
    PyPI-->>Workflow: causal-conv1d installed/upgraded
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • yzhangcs

Poem

🐇
In the garden of CI, we tend and we prune,
Docker images pulled, then swept away soon.
Causal-conv1d hops from Git to PyPI,
Python versions trimmed, timeouts stretched high.
With every new build, our code grows in tune!
🥕✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch tmp

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 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: 2

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1b6f24f and 9cc331c.

📒 Files selected for processing (2)
  • .github/workflows/reusable-build-triton.yml (1 hunks)
  • .github/workflows/reusable-ci-tests.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Test H100 (PyTorch 2.7) / test-models
  • GitHub Check: check-pt-python-compatibility

Comment on lines 184 to 193
# Image selection based on architecture input
if [[ "${{ inputs.arch }}" == 'x86_64' ]]; then
export CIBW_MANYLINUX_X86_64_IMAGE="quay.io/pypa/manylinux_2_28_x86_64:latest"
docker pull "${CIBW_MANYLINUX_X86_64_IMAGE}"
else
export CIBW_MANYLINUX_AARCH64_IMAGE="quay.io/pypa/manylinux_2_28_aarch64:latest"
docker pull "${CIBW_MANYLINUX_AARCH64_IMAGE}"
fi
docker image prune -f
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Validate arch and pin Docker images for reproducible builds

  1. Any value other than the literal string x86_64 will silently fall-through to the else branch and fetch an aarch64 image, which is almost certainly unintended.
  2. Using :latest makes the build non-deterministic; tomorrow’s latest may contain breaking changes.

Consider:

+# Fail fast for unknown architectures
+case "${{ inputs.arch }}" in
+  x86_64)
+    export CIBW_MANYLINUX_X86_64_IMAGE="quay.io/pypa/manylinux_2_28_x86_64@sha256:<digest>"
+    docker pull "${CIBW_MANYLINUX_X86_64_IMAGE}"
+    ;;
+  aarch64)
+    export CIBW_MANYLINUX_AARCH64_IMAGE="quay.io/pypa/manylinux_2_28_aarch64@sha256:<digest>"
+    docker pull "${CIBW_MANYLINUX_AARCH64_IMAGE}"
+    ;;
+  *)
+    echo "::error::Unsupported arch: '${{ inputs.arch }}'"; exit 1 ;;
+esac
-# current unconditional prune remains fine
 docker image prune -f

Pinning by digest guarantees byte-for-byte identical build roots, and the explicit case guard prevents accidental misuse.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In .github/workflows/reusable-build-triton.yml around lines 184 to 193, the
current script uses a simple if-else to select Docker images based on the arch
input, defaulting to aarch64 for any non-x86_64 value, and uses the :latest tag
which is non-deterministic. To fix this, replace the if-else with a case
statement that explicitly handles only supported architectures and errors on
invalid inputs, and replace the :latest tags with pinned image digests to ensure
reproducible builds.

Comment on lines +333 to 334
$CONDA_BIN_PATH/pip install -U causal-conv1d --no-build-isolation
echo "Installing flash-attn for NVIDIA"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Unpinned causal-conv1d may break CI reproducibility

Switching from a commit-pinned Git URL to pip install -U causal-conv1d installs whatever the PyPI tip is at run-time. A sudden upstream release (e.g., incompatible with the targeted CUDA or Torch version) will break all H100 CI jobs.

Recommend pinning an explicit version or constraint:

-$CONDA_BIN_PATH/pip install -U causal-conv1d --no-build-isolation
+$CONDA_BIN_PATH/pip install causal-conv1d==0.3.1 --no-build-isolation  # ← adjust to the tested version

Optionally keep the -U flag with ~= or >=,< bounds if minor bumps are safe.

Ensure the chosen version is published for both CUDA 12.x wheels and source builds.


🏁 Script executed:

#!/bin/bash
# Search for occurrences of causal-conv1d in workflow files and codebase
echo "Searching for causal-conv1d in workflows:"
rg -n "causal-conv1d" .github/workflows
echo ""
echo "Searching for causal-conv1d in the entire repository:"
rg -n "causal-conv1d" .

Length of output: 1452


Pin causal-conv1d in CI workflow to maintain reproducibility

The GitHub Actions step at .github/workflows/reusable-ci-tests.yml:333 currently does an unpinned install:

-$CONDA_BIN_PATH/pip install -U causal-conv1d --no-build-isolation
+$CONDA_BIN_PATH/pip install causal-conv1d==<tested-version> --no-build-isolation  # e.g. 1.4.0

• Replace -U causal-conv1d with an explicit ==<version> (or a bounded specifier like >=1.4.0,<1.5.0)
• Confirm that the chosen version has published CUDA 12.x wheels (or falls back to a compatible source build)

This change will lock CI to a known working release and prevent unexpected breakage from upstream PyPI updates.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
$CONDA_BIN_PATH/pip install -U causal-conv1d --no-build-isolation
echo "Installing flash-attn for NVIDIA"
$CONDA_BIN_PATH/pip install causal-conv1d==<tested-version> --no-build-isolation # e.g. 1.4.0
echo "Installing flash-attn for NVIDIA"
🤖 Prompt for AI Agents
In .github/workflows/reusable-ci-tests.yml at lines 333-334, the pip install
command for causal-conv1d uses an unpinned version, risking CI instability.
Modify the command to specify an explicit version or a bounded version range
(e.g., ==1.4.0 or >=1.4.0,<1.5.0) that is known to have CUDA 12.x compatible
wheels or a compatible source build. This will ensure reproducible and stable CI
runs.

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: 0

🔭 Outside diff range comments (2)
.github/workflows/triton-nightly.yml (2)

49-49: Typo breaks the skip pattern – cp13t is not a valid wheel tag

cibw-skip: 'cp{35,36,37,38,39,13t}-*' will expand to cp13t-*, which cibuildwheel will just ignore, leaving CPython 3.13 wheels unskipped unintentionally.
It should be cp313-* (or omit entirely if 3.13 is intended to be built).

-      cibw-skip: 'cp{35,36,37,38,39,13t}-*'
+      cibw-skip: 'cp{35,36,37,38,39}-*'        # or add cp313 if you really mean to skip it

49-49: Skip list is inconsistent across the two jobs

The nightly job skips cp35-cp39 (plus the erroneous cp13t) while the manual single-version job skips only cp35-cp39.
A single source of truth avoids diverging behaviour.

Suggestion: extract the skip pattern into a reusable workflow input or YAML anchor so both jobs stay in lock-step.

Also applies to: 102-103

🧹 Nitpick comments (1)
.github/workflows/triton-builder.yml (1)

94-95: Hard-coding supported Python versions in multiple files invites drift

You now list cp3{10,11,12,13} here, while other workflows repeat similar literals. When 3.14 lands you’ll need to touch every file.

Consider defining an environment variable or reusable composite action (e.g. python_supported_matrix) and referencing it via YAML anchors or workflow inputs.

Keeps maintenance low and prevents accidental mismatches.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9cc331c and 263bc21.

📒 Files selected for processing (2)
  • .github/workflows/triton-builder.yml (1 hunks)
  • .github/workflows/triton-nightly.yml (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: check-pt-python-compatibility
🔇 Additional comments (1)
.github/workflows/triton-nightly.yml (1)

39-40: Double-check the massive timeout bump

Timeouts jump from 2 h → 6 h (x86_64) and 12 h → 20 h (aarch64). Such long runners can hog the self-hosted fleet and silently mask infinite-loop failures.

Consider whether the build really needs that headroom and, if so, enforce a job-level timeout-minutes: to fail fast when the limit is exceeded rather than keeping the runner busy for 20 hours.

@zhiyuan1i zhiyuan1i merged commit 4d60956 into main Aug 1, 2025
6 checks passed
@zhiyuan1i zhiyuan1i deleted the tmp branch August 1, 2025 11:07
@coderabbitai coderabbitai bot mentioned this pull request Aug 9, 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