Add wasm coverage to SuperPMI CI pipelines#128669
Conversation
Enable SuperPMI collection, replay, and asmdiffs for the wasm cross-targeting JIT (clrjit_universal_wasm_<host_arch>). Collection: - Build clr.wasmjit alongside other JITs in collect/replay/diffs pipelines - Pass -target_os browser and -target_arch wasm to collection setup - Overlay the checked JIT for corelib crossgen2 collection so the MCH records the additional EE queries made by checked builds - Partition corelib collection per assembly for wasm Replay and diffs: - Add a daily superpmi-replay-wasm pipeline (windows_x64) - Handle wasm as a cross-target altjit in replay and asmdiffs scripts: re-derive host OS/arch, select the correct JIT name, pass --altjit and RunAltJitCode=0 - Auto-set --altjit in superpmi.py when target_arch is wasm so users don't need to pass it manually Rolling build: - Add clr.wasmjit to jitrollingbuild so the wasm JIT is uploaded to Azure Storage as the asmdiffs baseline Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
|
@dotnet/wasm-contrib PTAL Have run most of this (stripped down) on the internal collect pipeline. Full run in progress. Also ran a jitrolling build job to populate a wasm jit there. Was then able to do a local replay via: |
There was a problem hiding this comment.
Pull request overview
This PR extends the CoreCLR SuperPMI collection/replay/diffs/asmdiffs infrastructure to cover the wasm cross-targeting JIT scenario by threading target OS/arch through the collection setup and teaching replay/asmdiffs/diffs scripts (and pipelines) to treat wasm as a cross-target altjit case.
Changes:
- Add cross-target handling for wasm in SuperPMI scripts (crossgen2 rsp args, replay/asmdiffs JIT name selection, automatic
--altjitwhen targeting wasm). - Extend SuperPMI Helix project files and AzDO templates to include a
browser/wasmpartition and to flow target OS/arch overrides for cross-target collections. - Add a scheduled
superpmi-replay-wasmpipeline and ensure rolling build / replay / diffs pipelines build and publishclr.wasmjit.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/scripts/superpmi.py | Adds cross-target and wasm-specific crossgen2 rsp arguments (--targetos/--targetarch, wasm obj-format + codegenopt). |
| src/coreclr/scripts/superpmi-replay.proj | Adds a browser/wasm replay partition for SuperPmiReplayType=wasm. |
| src/coreclr/scripts/superpmi-collect.proj | Passes target OS/arch into superpmi.py collect for crossgen2, and adds Helix RID fallback for non-runtime targets (e.g., browser). |
| src/coreclr/scripts/superpmi-asmdiffs-checked-release.proj | Adds a browser/wasm partition to checked-vs-release asmdiffs. |
| src/coreclr/scripts/superpmi_replay.py | Implements wasm replay as a cross-target altjit scenario and re-derives host OS/arch at runtime. |
| src/coreclr/scripts/superpmi_replay_setup.py | Extends replay setup -type validation to include wasm. |
| src/coreclr/scripts/superpmi_diffs.py | Auto-adds --altjit when the partition target arch is wasm. |
| src/coreclr/scripts/superpmi_diffs_setup.py | Teaches partition discovery to find wasm collections stored under host-arch blob paths while recording target arch as wasm. |
| src/coreclr/scripts/superpmi_collect_setup.py | Adds -target_os/-target_arch, adds corelib-specific single-assembly partitioning, and overlays checked JIT over release Core_Root for corelib. |
| src/coreclr/scripts/superpmi_asmdiffs_checked_release.py | Handles wasm JIT naming as cross-target and appends --altjit for wasm asmdiffs runs. |
| eng/pipelines/coreclr/templates/superpmi-send-to-helix.yml | Adds optional targetOS/targetArch parameters to override TargetOS/TargetArchitecture env vars. |
| eng/pipelines/coreclr/templates/superpmi-collect-job.yml | Threads targetOS/targetArch through, and downloads wasm build artifacts for the corelib wasm collection. |
| eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml | Threads target OS/arch through setup, Helix submission, and upload to storage for cross-target collections. |
| eng/pipelines/coreclr/templates/jit-replay-pipeline.yml | Ensures wasm replay builds include clr.wasmjit. |
| eng/pipelines/coreclr/superpmi-replay-wasm.yml | New scheduled pipeline for daily wasm SuperPMI replay (windows_x64). |
| eng/pipelines/coreclr/superpmi-diffs.yml | Ensures diffs pipeline builds include clr.wasmjit. |
| eng/pipelines/coreclr/superpmi-asmdiffs-checked-release.yml | Ensures checked-vs-release asmdiffs pipeline builds include clr.wasmjit. |
| eng/pipelines/coreclr/jitrollingbuild.yml | Ensures rolling build uploads include clr.wasmjit for wasm asmdiffs baselines. |
|
Also need to look into a coredistools update for Wasm. Not sure what that means yet. |
kg
left a comment
There was a problem hiding this comment.
LGTM other than Copilot's feedback
- Fix help text in superpmi_replay_setup.py: 'Type of diff' -> 'Type of replay' - Guard TargetArgs in superpmi-collect.proj on TargetOS/TargetArchitecture being non-empty - Add FIXME comment on JitWasmNyiToR2RUnsupported in superpmi.py Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9b14dd3 to
86445e1
Compare
Use getattr(args, 'altjit', False) since upload/download subcommands don't include --altjit in their parser. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/ba-g unrelated failures and timeouts |
|
Going to merge this despite the CI issues. For new PRs it will only impact replay and there won't be a Wasm replay until a new collection is done. |
Enable SuperPMI collection, replay, and asmdiffs for the wasm cross-targeting JIT (clrjit_universal_wasm_<host_arch>).
Collection:
Replay and diffs:
Rolling build: