-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wasm] Modify workload to pick threading runtime packs #72412
Conversation
This change adds the 2 wasm threading runtime packs to the wasm workload. In order for a threading runtime pack to be chosen, WorkloadManifest.targets is also modified to override the runtime pack name when the following props are set: WasmEnableThreads - full threading support and will load Microsoft.NETCore.App.Runtime.multithread.Mono.browser-wasm WasmEnablePerfTrace - runtime only threading support and will load Microsoft.NETCore.App.Runtime.perftrace.Mono.browser-wasm
Need to make sure WBT knows about the packs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of questions but should be looks good otherwise
<RuntimePackNamePatterns Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(WasmEnableThreading)' == 'true'">Microsoft.NETCore.App.Runtime.Mono.multithread.**RID**</RuntimePackNamePatterns> | ||
<RuntimePackNamePatterns Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(WasmEnablePerfTrace)' == 'true'">Microsoft.NETCore.App.Runtime.Mono.perftrace.**RID**</RuntimePackNamePatterns> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can both of these be true or do we only allow perf trace on a single threaded userspace? do we need another mt perftrace runtime pack?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perftrace is single threaded userspace, multi-threaded runtime. Do you think we should error if both are true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is probably fine for the moment we may want to have something like named configs once this is supported.
Looks good. I can add a test in WBT. |
|
To get this to work, I think WasmBuildTests is going to need to wait for the threading builds to complete and then import its runtime packs. |
Ok, I will add that. |
- Runtime pack nugets other than the one that gets built might not be available. In that case, we copy the only one available as the missing ones. - This is useful for local builds, allowing running Wasm.Build.Tests without having to build all 3 runtimes. - This is enabled for CI also, in this commit. But once CI gets the ability to fetch the other runtime packs, this will change.
I have pushed some changes that will unblock this PR. Essentially, we copy the single runtime pack nuget to the other nuget filenames, and should allow running Wasm.Build.Tests . Once I have the PR, to get the other correct runtime packs on CI, completed, I will change this behavior to be applicable only for local builds. It will emit this when it copies:
|
- The earlier approach of simply making copies of the existing runtime pack nuget with different names doesn't work, and `dotnet workload install` rejects it. ``` Installing pack Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm version 7.0.0-ci... Workload installation failed. Rolling back installed packs... ``` Instead, now we build the missing nugets from the project with different values for `$(MonoWasmBuildVariant)`. - this handles local builds, and incremental builds also - To skip building the missing nugets, for example, when you have all of them available, then set `WasmSkipMissingRuntimePackBuild=true`.
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
This change adds the 2 wasm threading runtime packs to the wasm workload. In order for a threading runtime pack to be chosen, WorkloadManifest.targets is also modified to override the runtime pack name when the following props are set:
WasmEnableThreads - full threading support and will load
Microsoft.NETCore.App.Runtime.multithread.Mono.browser-wasm
WasmEnablePerfTrace - runtime only threading support and will load
Microsoft.NETCore.App.Runtime.perftrace.Mono.browser-wasm
Contributes to #72872