[Diffusion] Refactor diffusion JIT kernel test layout and narrow CI triggers#21385
[Diffusion] Refactor diffusion JIT kernel test layout and narrow CI triggers#21385
Conversation
Summary of ChangesHello, 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
🧠 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
Using Gemini Code AssistThe 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
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 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
|
|
/tag-and-rerun-ci |
There was a problem hiding this comment.
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.
| 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 | ||
| ) |
There was a problem hiding this comment.
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.
| 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) |
|
/tag-and-rerun-ci |
|
/rerun-failed-ci |
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
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
/tag-run-ci-label,/rerun-failed-ci,/tag-and-rerun-ci