Skip to content

[wasm][CoreCLR] Run Wasm HardwareIntrinsics tests, gated on IsSupported - #134771

Merged
lewing merged 4 commits into
mainfrom
lewing-run-wasm-hwintrinsics-tests
Sep 30, 2026
Merged

lewing merged 4 commits into
mainfrom
lewing-run-wasm-hwintrinsics-tests

Conversation

@lewing

@lewing lewing commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Problem: the src/tests/JIT/HardwareIntrinsics/Wasm tests never execute anywhere. They are CLRTestTargetUnsupported unless EnableWasmHWIntrinsicsTests=true, and the only pipeline that sets it (hardware-intrinsics-wasm, added in #130975) was build-only (sendToHelix: false). @jkotas pointed this out on #134762: build 1614067 ran no tests (no Helix jobs, no test runs). It turns out it didn't build them either. In browser CI, src/tests/build.proj builds only test group 1 (#114123), and these priority-1 projects are in group 3.

Change:

  • Remove the EnableWasmHWIntrinsicsTests opt-in and use the model other platforms follow: each PackedSimd test returns early when PackedSimd.IsSupported is false. The tests now run in the regular browser lanes, i.e. interpreted test code calling ReadyToRun CoreLib, as well as fully under ReadyToRun.
  • hardware-intrinsics-wasm: build the two merged runners (HardwareIntrinsics_Wasm_r/_ro.csproj) and send them to Helix with readyToRun: true (crossgen2 at Helix time, same as the browser_wasm R2R_CG2 runtime-test lane).
  • src/tests/build.proj: the browser-CI "group 1 only" OOM workaround now applies only to full-tree builds, not to -test/-dir/-tree subsets. Verified locally: a full-tree browser CI build is unchanged, and the subset build now includes the group containing the Wasm HWI runners.
  • build-runtime-tests-and-send-to-helix.yml: set helixType for ReadyToRun sends, mirroring run-test-job.yml. It was previously empty, so SendHelixJob failed.
  • PackedSimdIsSupported no longer asserts IsSupported is true. It still checks IsSupported for consistency with the reflection call and Vector128.IsHardwareAccelerated.

Evidence it should work: the libraries copy of PackedSimdTests passes 45/45 on browser CoreCLR trimmed R2R locally. The src/tests copy (66 tests) has never been built or executed in CI, so this PR's runs are the first real runs. Any failures should be triaged rather than hidden.

Note

This PR was generated with GitHub Copilot assistance.

…yToRun

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 6 pipeline(s).
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics
See info in area-owners.md if you want to be subscribed.

@lewing
lewing requested a review from jkotas September 28, 2026 05:05
Comment thread src/tests/JIT/HardwareIntrinsics/Wasm/Directory.Build.props Outdated
…msbuild opt-in

Remove EnableWasmHWIntrinsicsTests and follow the model used by other
platforms: each test returns early when PackedSimd.IsSupported is false,
so the tests run in regular browser lanes (interpreted, no-op) as well as
in the ReadyToRun hardware-intrinsics-wasm pipeline.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@lewing lewing changed the title [wasm][CoreCLR] Run Wasm HardwareIntrinsics tests in Helix under ReadyToRun [wasm][CoreCLR] Run Wasm HardwareIntrinsics tests, gated on IsSupported Sep 28, 2026
@jkotas

jkotas commented Sep 30, 2026

Copy link
Copy Markdown
Member

hardware-intrinsics-wasm is failing with .packages/microsoft.dotnet.helix.sdk/12.0.0-beta.26471.108/tools/Microsoft.DotNet.Helix.Sdk.MonoQueue.targets(79,5): error MSB4044: The "SendHelixJob" task was not given a value for the required parameter "Type".

lewing and others added 2 commits September 29, 2026 20:17
…o-helix

The template left helixType empty when readyToRun was true, so SendHelixJob
failed with a missing Type. Mirror run-test-job.yml.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The pipeline built no tests: in browser CI build.proj only builds test
group 1 (groups 2..n are skipped to avoid OOM, #114123), and the Wasm HWI
projects fall in priority-1 group 3. -tree:JIT/HardwareIntrinsics/Wasm also
excluded the merged runner projects that wrap them.

Build the two merged runners with -test:, and only apply the browser group
restriction to full-tree builds, not -test/-dir/-tree subsets.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@lewing
lewing merged commit a1cdbbb into main Sep 30, 2026
213 checks passed
@lewing
lewing deleted the lewing-run-wasm-hwintrinsics-tests branch September 30, 2026 16:42
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 1, 2026
lewing added a commit that referenced this pull request Oct 1, 2026
…loop (#134960)

**Why:** Follow-up to #134771, where @jkotas asked for this. Today the
only browser runtime-test leg that runs everything under R2R is the
browser_wasm `R2R_CG2` leg in `runtime.yml`, and that leg is innerloop
(priority 0 only). `runtime-coreclr outerloop` (`coreclr/ci.yml`) runs
priority-1 tests on browser only in the checked interpreter leg, which
uses R2R CoreLib with interpreted tests. browser_wasm is not in its
`R2R_CG2` platform list. As a result, no pipeline runs priority-1 tests
fully under ReadyToRun on browser.

**Change:** Add a checked browser_wasm `R2R_CG2` outerloop leg to
`eng/pipelines/coreclr/ci.yml`. It is a separate platform-matrix entry
rather than an addition to the shared R2R platform list, because browser
needs its own `extraBuildArgs` (`-os browser
-p:HostConfiguration=Release`), the same as the existing browser
interpreter leg. It reuses the browser build artifacts that `ci.yml`
already produces.

**Quarantines and skips:** Each failure below is specific to R2R and
limited to wasm ReadyToRun. Some came from crashed or failed work items.
Others appeared only as failed test results inside work items that
passed, because merged runners record test failures in their results
rather than in their exit code.

| Failure | Issue | Mechanism |
|---|---|---|
| `b51875`, `b77707`: an exception thrown from a `finally` reached by
leave is reported as unhandled (`Regression_8`,
`Regression_PdbOnly_r_2`) | #134975 | `ActiveIssue` with
`IsWasmReadyToRun` |
| `self_override5`: `!ShouldCallPrestub()` assert (`Loader`) | #134949 |
IL `ActiveIssue` with `IsWasmReadyToRun` |
| `AboveStackLimit`: the R2R image exceeds the 1000-parameter wasm limit
and fails to load (`Regressions`) | #132855 | `ActiveIssue` with
`IsWasmReadyToRun`. The generated wrapper skips the call, so the image
is never loaded. |
| crossgen2 aborts or hangs in `Lowering::LowerStoreLocCommon` on
`Vector128_1_*`, `Vector128_*` (`HardwareIntrinsics_General_r`/`_ro`) |
#134976 | Runner-level `R2RIncompatible` on wasm CoreCLR, since more
than one assembly is affected. Interpreter coverage is unchanged. |
| `Samples/gc`, `arrres_il_r`: an object outlives the expected
`GC.Collect`, so finalization and resurrection checks fail
(`GC-scenarios1`, `Methodical_r1`) | By design, same class as #134803 |
Permanent skip for wasm R2R only. Untracked and call-spilled stack GC
refs are reported as always live (`clr-abi.md`, "GC References at Call
Sites"). `gc` uses a `ConditionalFact`. `arrres_il_r` uses
`R2RIncompatible`, because its hand-written IL entry point has no
generated wrapper. |
| `test115667`, `test132982`, `ResolvedFromDifferentContext`,
`Runtime_64883`, `Runtime_66624`: they load their own assembly file, but
`Assembly.Location` is empty for assemblies loaded from an R2R wasm
image | — | Early return when `Location` is empty, following
`ByRefLocals` and #134076 |

Merged children are compiled by the all-targets `AnyOS` managed test
build, so a wasm-conditioned project property on a merged child does not
exclude it. The quarantines therefore use method-level attributes,
properties on a runner, or properties on a process-isolated test. Runner
and process-isolated test scripts are generated for browser, so those
properties do apply.

**Expectation:** This leg is expected to find more everything-R2R issues
on browser. Failures should be triaged and tracked (Known Build Errors /
`ActiveIssue`), not hidden.

**Validation:**
- [Build
1618757](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1618757),
two quarantine commits before the current head:
- All 87 browser R2R work items passed, but 4 tests failed inside them:
`Runtime_64883`, `Runtime_66624`, `arrres_il_r`, `Samples/gc`. The newer
commits address all 4.
  - The browser interpreter leg had no failures.
- Local browser-wasm Checked run of the affected runners and
process-isolated tests, with and without `RunCrossGen2=1`, and with
`DOTNET_TieredCompilation=0` as in CI:
  - Under R2R, the quarantined tests are skipped or return early.
  - In the interpreter, all of them run and pass.
- `runtime-coreclr outerloop` has no PR trigger. To validate the change
in CI, run `/azp run runtime-coreclr outerloop`.

> [!NOTE]
> This PR was generated with GitHub Copilot assistance.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants