Skip to content

[wasm] Enable SIMD - #80797

Merged
radekdoulik merged 38 commits into
dotnet:mainfrom
radekdoulik:pr-wasm-enable-simd
Mar 1, 2023
Merged

[wasm] Enable SIMD#80797
radekdoulik merged 38 commits into
dotnet:mainfrom
radekdoulik:pr-wasm-enable-simd

Conversation

@radekdoulik

@radekdoulikradekdoulik commented Jan 18, 2023

Copy link
Copy Markdown
Member

Change default value of WasmEnableSIMD property to true. That enables SIMD for wasm/AOT.

Use docker image with newer v8 and node on helix.

@ghostghost added the area-Build-mono label Jan 18, 2023
Co-authored-by: Ankit Jain <radical@gmail.com>
@radekdoulik

Copy link
Copy Markdown
MemberAuthor

Currently we fail on helix because v8 is too old. I am trying to improve that with 2 independent approaches, #80808 and dotnet/dotnet-buildtools-prereqs-docker#774

radicaland others added 8 commits January 19, 2023 22:55
.. instead crashing with an exception like:
```
src/mono/wasm/build/WasmApp.Native.targets(296,5): error MSB4018: (NETCORE_ENGINEERING_TELEMETRY=Build) The "ManagedToNativeGenerator" task failed unexpectedly.
System.BadImageFormatException: This PE image is not a managed executable.
at System.Reflection.MetadataLoadContext.LoadFromStreamCore(Stream peStream)
at System.Reflection.MetadataLoadContext.LoadFromAssemblyPath(String assemblyPath)
at PInvokeTableGenerator.Generate(String[] pinvokeModules, String[] assemblies, String outputPath) in /_/src/tasks/WasmAppBuilder/PInvokeTableGenerator.cs:line 42
at ManagedToNativeGenerator.ExecuteInternal() in /_/src/tasks/WasmAppBuilder/ManagedToNativeGenerator.cs:line 68
at ManagedToNativeGenerator.Execute() in /_/src/tasks/WasmAppBuilder/ManagedToNativeGenerator.cs:line 53
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
```
The wasm targets currently are not able to differentiate the managed
assemblies from the unmanaged ones. so it needs to be handled here.
…leSIMD=true
Instead, let the property be effective only for the AOT case.
@radical

Copy link
Copy Markdown
Member

/azp run runtime-wasm

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Also remove --experimental-wasm-simd option, which shouldn't be needed
for newer v8
@radicalradical added the arch-wasm WebAssembly architecture label Jan 20, 2023
@ghost

Copy link
Copy Markdown

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Let see how it goes on CI

Author:radekdoulik
Assignees:radekdoulik
Labels:

arch-wasm, area-Build-mono

Milestone:-

Let see whether it will avoid all the writes to correlation payload
path
To try if we can use newer node in path
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@radekdoulik
radekdoulik marked this pull request as ready for review February 21, 2023 18:58

@lewinglewing left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but we need to resolve the wbt failure

Comment threadsrc/libraries/sendtohelix-wasm.targets
Comment threadsrc/libraries/sendtohelixhelp.proj Outdated
@radical

Copy link
Copy Markdown
Member

/azp run runtime-wasm

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@radekdoulik

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-wasm

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@radekdoulik

Copy link
Copy Markdown
MemberAuthor

The runtime-wasm (Build browser-wasm linux Release LibraryTests_NodeJs) fails on main too.

@lewing

Copy link
Copy Markdown
Member

The runtime-wasm (Build browser-wasm linux Release LibraryTests_NodeJs) fails on main too.

@maraf are you looking into this?

Comment threadeng/testing/WasmRunnerAOTTemplate.sh
kg
kg approved these changes Mar 1, 2023

@kgkg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, with the caveat that I don't have the ability to fully vet the yml or msbuild bits (but the latter do look correct to me), and I left some comments

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasmWebAssembly architecturearea-Build-mono

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@radekdoulik@radical@lewing@kg