Skip to content

[Diffusion] Refactor diffusion JIT kernel test layout and narrow CI triggers#21385

Merged
BBuf merged 4 commits intomainfrom
refactor/jit-kernel-diffusion-ci-scope
Mar 26, 2026
Merged

[Diffusion] Refactor diffusion JIT kernel test layout and narrow CI triggers#21385
BBuf merged 4 commits intomainfrom
refactor/jit-kernel-diffusion-ci-scope

Conversation

@BBuf
Copy link
Copy Markdown
Collaborator

@BBuf BBuf commented Mar 25, 2026

Motivation

diffusion-related JIT kernel tests and benchmarks into dedicated folders and update test discovery to scan nested paths. Narrow diffusion CI triggers so they only run when diffusion JIT kernel source, tests, or benchmarks change.

Modifications

Accuracy Tests

Benchmarking and Profiling

Checklist

Review Process

  1. Ping Merge Oncalls to start the PR flow. See the PR Merge Process.
  2. Get approvals from CODEOWNERS and other reviewers.
  3. Trigger CI tests with comments or contact authorized users to do so.
    • /tag-run-ci-label, /rerun-failed-ci, /tag-and-rerun-ci
  4. After green CI and required approvals, ask Merge Oncalls to merge.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refactors the organization of diffusion-related JIT kernel tests and benchmarks by introducing dedicated subdirectories. This change aims to improve code structure and maintainability. Concurrently, the CI system has been optimized to trigger diffusion-specific tests only when relevant files are modified, leading to more efficient and targeted continuous integration workflows. The updates also ensure that the test discovery process correctly identifies tests within these new nested directory structures.

Highlights

  • Test Organization: Diffusion-related JIT kernel tests and benchmarks have been moved into dedicated diffusion/ subfolders for better organization and clarity.
  • CI Efficiency: CI triggers for diffusion tests are now narrowed, running only when relevant JIT kernel source, tests, or benchmarks change, improving CI efficiency.
  • Recursive Test Discovery: The test discovery mechanism (run_suite.py) and related documentation have been updated to recursively scan nested paths within JIT kernel test and benchmark directories.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Ignored Files
  • Ignored by pattern: .github/workflows/** (3)
    • .github/workflows/pr-test-amd-rocm720.yml
    • .github/workflows/pr-test-amd.yml
    • .github/workflows/pr-test.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@BBuf
Copy link
Copy Markdown
Collaborator Author

BBuf commented Mar 25, 2026

/tag-and-rerun-ci

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the documentation and the run_suite.py script to correctly discover JIT kernel tests and benchmarks located in nested subfolders. The glob.glob calls in run_suite.py were modified to use recursive=True and ** patterns. A suggestion was made to refactor the glob.glob calls into a loop to reduce code duplication and improve maintainability.

Comment on lines +193 to +198
files += glob.glob(
os.path.join(jit_kernel_dir, "tests", "**", "test_*.py"), recursive=True
)
files += glob.glob(
os.path.join(jit_kernel_dir, "benchmark", "**", "bench_*.py"), recursive=True
)
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.

medium

To reduce code duplication, you could use a loop to handle both the 'tests' and 'benchmark' directories. This makes the code more concise and easier to maintain if more directories are added in the future.

Suggested change
files += glob.glob(
os.path.join(jit_kernel_dir, "tests", "**", "test_*.py"), recursive=True
)
files += glob.glob(
os.path.join(jit_kernel_dir, "benchmark", "**", "bench_*.py"), recursive=True
)
for sub_dir, prefix in [("tests", "test_"), ("benchmark", "bench_")]:
path_pattern = os.path.join(jit_kernel_dir, sub_dir, "**", f"{prefix}*.py")
files += glob.glob(path_pattern, recursive=True)

@BBuf
Copy link
Copy Markdown
Collaborator Author

BBuf commented Mar 25, 2026

/tag-and-rerun-ci

@BBuf
Copy link
Copy Markdown
Collaborator Author

BBuf commented Mar 25, 2026

/rerun-failed-ci

BBuf added 2 commits March 26, 2026 12:29
Bring the branch up to date with main while preserving the diffusion JIT kernel CI layout changes and resolving the skill guidance conflict.

Made-with: Cursor
…gl-project/sglang into refactor/jit-kernel-diffusion-ci-scope
@BBuf BBuf merged commit 7ca015f into main Mar 26, 2026
47 of 56 checks passed
@BBuf BBuf deleted the refactor/jit-kernel-diffusion-ci-scope branch March 26, 2026 07:02
satyamk7054 pushed a commit to satyamk7054/sglang that referenced this pull request Apr 3, 2026
JustinTong0323 pushed a commit to JustinTong0323/sglang that referenced this pull request Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

amd documentation Improvements or additions to documentation jit-kernel run-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant