[FlyDSL] [Build] Use upstream parallel scheduler for AOT builds - #4905
[FlyDSL] [Build] Use upstream parallel scheduler for AOT builds#4905zhiding512 wants to merge 7 commits into
Conversation
Remove aiter's duplicate process pool and route CLI and wheel AOT compilation through the FlyDSL 0.3.2 scheduler. Co-authored-by: Cursor <cursoragent@cursor.com>
Update the AOT drivers and documentation to use FlyDSL's clearer run_parallel_jobs API. Co-authored-by: Cursor <cursoragent@cursor.com>
Return deterministic compile errors with structured causes and include those causes in unified AOT failure summaries. Co-authored-by: Cursor <cursoragent@cursor.com>
Describe automatic worker selection, FIFO retries, and logger controls used by the upstream AOT scheduler. Co-authored-by: Cursor <cursoragent@cursor.com>
Document non-blocking memory-cap fallback and the corrected OOM-only concurrency backoff semantics. Co-authored-by: Cursor <cursoragent@cursor.com>
Update AOT guidance for concurrency-neutral retries and the conservative no-psutil fallback. Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid a premature FlyDSL version bump while clarifying that unified AOT compilation must run before the CK thread pool is created. Co-authored-by: Cursor <cursoragent@cursor.com>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
PR title tags: |
There was a problem hiding this comment.
Pull request overview
This PR switches FlyDSL AOT compilation entry points (both unified run_aot and standalone modules) to use FlyDSL’s upstream run_parallel_jobs scheduler instead of aiter’s bespoke fork pool, while preserving deterministic compile failures as structured metadata for unified reporting.
Changes:
- Replace aiter’s custom multiprocessing/file-IPC AOT pool with
flydsl.utils.parallel.run_parallel_jobsacross unified (aiter.aot.flydsl.common.run_aot) and per-module AOT scripts. - Add structured failure metadata via
compile_failure_info()and aggregate failure causes in unified AOT error reporting. - Update build-time and documentation notes to reflect upstream scheduler controls and the “fork-before-ThreadPoolExecutor” constraint.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Updates FlyDSL AOT precompile banner/comments and keeps AOT before CK’s thread pool due to fork-based scheduler behavior. |
| aiter/aot/flydsl/README.md | Documents upstream scheduler usage and updates env var names/behavior to FlyDSL’s controls. |
| aiter/aot/flydsl/common.py | Removes custom fork pool, adds compile_failure_info, and runs unified AOT via run_parallel_jobs with aggregated failure reporting. |
| aiter/aot/flydsl/moe.py | Uses run_parallel_jobs and attaches structured failure info on compile exceptions. |
| aiter/aot/flydsl/mxfp4_moe.py | Attaches structured failure info on compile exceptions. |
| aiter/aot/flydsl/gemm.py | Uses run_parallel_jobs and attaches structured failure info on compile exceptions. |
| aiter/aot/flydsl/grouped_moe.py | Uses run_parallel_jobs and returns deterministic failures with structured metadata. |
| aiter/aot/flydsl/chunk_gdn_h.py | Uses run_parallel_jobs and attaches structured failure info on compile exceptions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
flydsl.utils.parallel.run_parallel_jobsacross unified and standalone AOT entry pointsDepends on ROCm/FlyDSL#1038. Merge only after the scheduler is available in the resolved FlyDSL package.
Test plan
setup.py -> run_aot -> run_parallel_jobssmoke test with FlyDSL 0.3.120 passed)Made with Cursor