[wasi] .NET 10: WasmEnableSIMD with AOT fails because WasiApp.targets has -msimd128 commented out
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- csharp, wasm
- Ambito
- build-system
Direzione di ricerca
Inizia dal file .NET 10 WasiApp.targets in Microsoft.NET.Runtime.WebAssembly.Wasi.Sdk e confronta il relativo flag SIMD con la versione .NET 11. Esegui la riproduzione segnalata dotnet publish -c Release; il lavoro è completato quando la pubblicazione AOT riesce e produce un'app che stampa 42.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
With the .NET 10 SDK 10.0.401 and the wasi-experimental workload 10.0.12, a wasi-wasm app with WasmEnableSIMD and RunAOTCompilation fails to publish. WasiApp.targets in Microsoft.NET.Runtime.WebAssembly.Wasi.Sdk 10.0.12 has the SIMD flag commented out:
<!--<_WasiClangCommonFlags Include="-msimd128" Condition="'$(WasmEnableSIMD)' == 'true'" />-->
so the AOT bitcode, which uses SIMD, is compiled by wasi-sdk's clang for a target without SIMD, and the LLVM backend aborts. The same line is active in the .NET 11 workload (11.0.0-rc.3.26522.148), so this looks like a fix that .NET 10 servicing is missing.
Found while building a SIMD-enabled Mono AOT baseline for the benchmarks of NetWasm, an ahead-of-time C# to WebAssembly compiler.
Reproduction Steps
macOS arm64, wasi-sdk 25.0 (the version the 10.0 targets expect), WASI_SDK_PATH set.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<RuntimeIdentifier>wasi-wasm</RuntimeIdentifier>
<RunAOTCompilation>true</RunAOTCompilation>
<WasmSingleFileBundle>true</WasmSingleFileBundle>
<WasmEnableSIMD>true</WasmEnableSIMD>
</PropertyGroup>
</Project>
System.Console.WriteLine(42);
dotnet publish -c Release
Expected behavior
An AOT-compiled AppBundle/Hello.wasm that prints 42, as without WasmEnableSIMD.
Actual behavior
WasmApp.Common.targets(816,5): error : Failed to compile .../obj/Release/net10.0/wasi-wasm/wasm/for-publish/aot-instances.dll.bc -> .../aot-instances.dll.o
error : clang version 19.1.5-wasi-sdk (https://github.com/llvm/llvm-project ab4b5a2db582958af1ee308a790cfdb42bd24720)
error : Target: wasm32-unknown-wasip2
fatal error: error in backend: Do not know how to split this operator's operand!
Regression?
Not checked against earlier 10.0 servicing releases. The .NET 11 RC3 targets have the line enabled.
Known Workarounds
Add <WasiClangFlags>-msimd128</WasiClangFlags> to the project. With it the app publishes and prints 42 under Wasmtime.
Configuration
- .NET SDK 10.0.401,
wasi-experimentalworkload 10.0.12 (manifest 10.0.112) - wasi-sdk 25.0 (clang 19.1.5-wasi-sdk), macOS arm64
Other information
Uncommenting the -msimd128 line in the 10.0 WasiApp.targets, as in 11.0, should fix it.
- Lingua principale
- C#
- Stelle
- 18.4k
- Fork
- 5.8k
- Merge medio
- 2g 16h
- PR unite (30g)
- 621
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di dotnet/runtime
-
area-System.ComponentModel untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
dotnet/runtime#136608 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
area-System.IO bug untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
dotnet/runtime#136599 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area-System.IO untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
dotnet/runtime#136577 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[mono] Native memory leak on the first invoke of every open-instance delegate to a virtual methodApertaarea-VM-meta-mono untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
dotnet/runtime#136284 · 6 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Several MemoryExtensions.LastIndexOfAnyExcept overloads incorrectly document "first occurrence"Forse di nuovo libera @ehsan-raoufi l’ha presa 7 giorni fa e non c’è nessuna pull request aperta. Apertaarea-System.Memory untriaged
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 83/100
dotnet/runtime#136282 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di dotnet/runtime
Issue simili
-
bug elsa 3 prio low
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
elsa-workflows/elsa-core#9154 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NethermindEth/nethermind#15452 ·
I maintainer di solito rispondono entro 1 giorno
-
kind:ux size:S
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
elsa-workflows/elsa-foundation#3563 ·
I maintainer di solito rispondono entro 1 giorno
-
请让 FPS 叠加层的字号大小可单独设置Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
MahdiyarGHD/GheychiApp#39 ·
I maintainer di solito rispondono entro 1 giorno