Add CoreCLR WASM R2R performance lane - #5297
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
It changes CI/Helix orchestration and MSBuild/runtime-pack resolution behavior where correctness is environment-dependent and should be validated by a human with end-to-end runs.
Pull request overview
Adds a dedicated CoreCLR browser-WASM ReadyToRun (R2R) microbenchmark lane (V8) and wires the R2R selection through the performance repo’s Helix/job plumbing and MSBuild configuration, including validation to fail fast when required settings aren’t applied.
Changes:
- Adds CoreCLR-vs-Mono runtime-pack override logic for WASM builds and validates the expected CoreCLR runtime pack for R2R runs.
- Introduces
--wasm-ready-to-runend-to-end (CLI arg → env var → MSBuild properties → Helix forwarding) and emits a distinctR2RType=r2rrun dimension. - Adds a non-release-branch pipeline lane for CoreCLR WASM R2R microbenchmarks on V8 plus focused pytest coverage.
File summaries
| File | Description |
|---|---|
| src/scenarios/build-common/WasmOverridePacks.targets | Chooses CoreCLR vs Mono WASM runtime-pack IDs based on UseMonoRuntime. |
| src/benchmarks/micro/MicroBenchmarks.Wasm.targets | Enables/validates CoreCLR WASM R2R publish properties and validates runtime-pack selection. |
| scripts/tests/test_wasm_coreclr_r2r.py | Adds pytest coverage for argument validation, env propagation, Helix forwarding, and result dimensions. |
| scripts/run_performance_job.py | Forwards --wasm-ready-to-run to Helix work items and adds R2RType=r2r dimension. |
| scripts/micro_benchmarks.py | Adds --wasm-ready-to-run and propagates it via PERFLAB_WASM_READY_TO_RUN. |
| eng/pipelines/runtime-wasm-perf-jobs.yml | Adds a CoreCLR WASM R2R microbenchmark lane (non-release branches), V8 on linux_x64. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
dotnet/runtime#133040 is the runtime side |
|
Pushed |
There was a problem hiding this comment.
🔵 Needs a closer look
The environment-dependent MSBuild and Helix integration still requires the stated end-to-end validation after the latest package-version fix.
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 0 new
- Review effort level: Balanced
|
is there a better (non-workload) way to use the crossgen from the build? |
|
Build 1579662 was green but did not actually compile the benchmark app as R2R: the inner-TFM restore evaluation reset |
There was a problem hiding this comment.
🔵 Needs a closer look
The configuration validation runs after publishing rather than failing before build work begins.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
src/benchmarks/micro/MicroBenchmarks.Wasm.targets:21
PrepareForWasmBuildis a BenchmarkDotNet-generated target that runsAfterTargets="Publish", so this validation occurs only after the full publish/R2R work has already completed. Invalid Mono/R2R or package settings therefore do not fail fast as described; hook this validation before framework-pack resolution (or another pre-build target) instead.
- Files reviewed: 7/7 changed files
- Comments generated: 0 new
- Review effort level: Balanced
|
the crossgen we're building for the pipeline had a newer glibc because it wasn't crossbuilt dotnet/runtime#133143 it the fix for that and I will rereun the test once it is in. |
There was a problem hiding this comment.
🔵 Needs a closer look
Payload construction requires an ILLink package that the referenced runtime artifact does not stage.
Review details
Suppressed comments (1)
scripts/build_runtime_payload.py:410
- The
BrowserWasmCoreCLRartifact producer stages the WebAssembly SDK, ref pack, and (via runtime#133040) Crossgen2 package, but it does not stage anyMicrosoft.NET.ILLink.Tasksnupkg understaging/built-nugets. Consequently every CoreCLR WASM job now reaches this check with zero ILLink packages and fails while constructing the payload, before the new R2R work item can run. Either stage the matching ILLink package in the runtime artifact or stop requiring a package that is not part of that artifact contract.
illink_packages = [
package for package in Path(built_nugets_dir).glob("Microsoft.NET.ILLink.Tasks.*.nupkg")
if not package.name.endswith(".symbols.nupkg")
]
if len(illink_packages) != 1:
- Files reviewed: 7/7 changed files
- Comments generated: 0 new
- Review effort level: Balanced
|
Local coherent-VMR validation completed against BAR 330383 / AzDO 3065542 with no local version override. After excluding |
There was a problem hiding this comment.
🔵 Needs a closer look
The runtime artifact omits the newly required ILLink package, causing CoreCLR WASM jobs to fail before Helix.
Review details
Suppressed comments (1)
scripts/build_runtime_payload.py:410
- The
BrowserWasmCoreCLRartifact produced by the declared runtime dependency does not contain an ILLink package: runtime#133040 stages only the WebAssembly SDK pack, ref pack, and Crossgen2 understaging/built-nugets. Consequently this list is empty and payload construction now aborts before Helix for everywasm_coreclrjob, including the existing non-R2R lane. Please also stage the matching non-symbolMicrosoft.NET.ILLink.Taskspackage in the producer, or stop requiring and overriding it here.
illink_packages = [
package for package in Path(built_nugets_dir).glob("Microsoft.NET.ILLink.Tasks.*.nupkg")
if not package.name.endswith(".symbols.nupkg")
]
if len(illink_packages) != 1:
- Files reviewed: 7/7 changed files
- Comments generated: 0 new
- Review effort level: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
Payload validation rejects the actual runtime artifact and regresses non-R2R CoreCLR WASM runs.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
scripts/build_runtime_payload.py:412
- The linked
BrowserWasmCoreCLRproducer stages only the WebAssembly SDK/ref packages and the newly added Crossgen2 package instaging/built-nugets; it does not stage aMicrosoft.NET.ILLink.Tasksnupkg. This check therefore raises “found 0” for every CoreCLR WASM job before Helix submission, including the existing non-R2R lane. Either stage the matching ILLink package in the runtime artifact or validate/use the ILLink pack already installed indotnet-noneinstead.
illink_packages = [
package for package in Path(built_nugets_dir).glob("Microsoft.NET.ILLink.Tasks.*.nupkg")
if not package.name.endswith(".symbols.nupkg")
]
if len(illink_packages) != 1:
raise ValueError(
f"Expected one ILLink package in {built_nugets_dir}, found {len(illink_packages)}")
- Files reviewed: 7/7 changed files
- Comments generated: 2
- Review effort level: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
Approval depends on coordinated runtime artifacts and final end-to-end validation of the cross-repository toolchain path.
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 0 new
- Review effort level: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4f286edf-0a3c-43dc-92fe-26a0a57d5360
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4f286edf-0a3c-43dc-92fe-26a0a57d5360
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4f286edf-0a3c-43dc-92fe-26a0a57d5360
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4f286edf-0a3c-43dc-92fe-26a0a57d5360
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4f286edf-0a3c-43dc-92fe-26a0a57d5360
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4f286edf-0a3c-43dc-92fe-26a0a57d5360
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4f286edf-0a3c-43dc-92fe-26a0a57d5360
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4f286edf-0a3c-43dc-92fe-26a0a57d5360
c51c6c4 to
0790cb8
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The new package-version requirement breaks an existing wasm_coreclr unit-test path.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 1
- Review effort level: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4f286edf-0a3c-43dc-92fe-26a0a57d5360
Summary
R2RType=r2rresult dimensionDependency
Depends on dotnet/runtime#133040, which stages the matching host Crossgen2 pack in
BrowserWasmCoreCLR.Validation
Remaining validation
Run
runtime-wasm-perfwith this branch and the runtime artifact together, confirmCreateReadyToRunImagesexecutes, and verify uploaded results are labeledR2RType=r2r.