Comments (6)
Maybe controversial: When SIMD is being used, include the simde header in the generated code (like we do with the scalar operations) so the user doesn't need to have a compatible dev repo of SIMDe in their include path to compile the wasm2c output.
This is fine by me, and from the Debian side it would be nice to have a switch to easily use an installed copy of SIMDe instead of the bundled amalgated version.
from wabt.
This is fine by me, and from the Debian side it would be nice to have a switch to easily use an installed copy of SIMDe instead of the bundled amalgated version.
Sounds reasonable... maybe --external-simde
or something?
from wabt.
Sounds reasonable... maybe
--external-simde
or something?
Oh, I was thinking at compile time of wasm2c output one would use -DEXTERNAL_SIMDE=/usr/include/
or similar
from wabt.
After attempting it, I'm realizing that pasting the simde header into the wasm2c generated code is going to be painful because:
- if the module's public interface has a public-facing v128, or contains a v128 global, we have to include the header in the generated .h file (not just the .c file), and
- the amalgamated header is 17,000 lines
Even if I try to split out the v128 definition into its own header, it still ends up pulling in about 8,000 lines because it wants simde-common.h which wants a bunch of stuff. I'm not seeing an easy way to get simde_v128 robustly without thousands of lines. And I don't really want wasm2c to be pasting all that into a generated .h file. :-(
Maaaybe the better path forward is really just to have an #include <simde/wasm/simd128.h>
(in either the .h file or the .c file, depending on whether the public interface includes a v128 or there's a v128 global) and tell the user they'll need to have a compatible version of simde on hand to compile the wasm2c output. :-/
from wabt.
Seems reasonable. Based on the above, I suspect us taking ownership of amalgamating simd is going to lead to a bunch of work. Would be happy to include it as part of the output, but it would probably be easier to leave their file structure as is.
from wabt.
Merged in WebAssembly/website#334
from wabt.
Related Issues (20)
- Error using wasm2wat on a wasm file generated by Moonbit: "unexpected type form (got -0x30)" HOT 1
- Out-of-Memory Program Abort in wabt::interp::Table::Grow() HOT 2
- Out-of-Memory Program Abort in BinaryReaderInterp::OnDataCount()
- Invalid Memory Read in FreeList<wabt::interp::Object*>::IsUsed()
- error initializing module: invalid import "a.a" HOT 1
- Error while running testsuite (simd_lane, simd_load) "loop not vectorized" HOT 3
- wasm2wat: support component wasm HOT 1
- Wrong type error when validating globals with gc proposal features
- wat2wasm: Assertion `!"ParseExpr should only be called when IsExpr() is true"' failed in wabt::WastParser::ParseExpr
- Wast2Json fails on the testsuite HOT 8
- Library not loaded: /usr/local/opt/openssl@3/lib/libcrypto.3.dylib HOT 8
- Missing Import when running global.wast HOT 1
- `wast2json` miscompiles "if.wast" from the specification tests HOT 4
- Build failed on Apple Silicon platform HOT 4
- [wasm2c] Strange issue with double parsing in msvc HOT 5
- wasm2c compiling minimal example issues HOT 1
- [wasm2c] catching traps without exception runtime
- “picosha2.h”: No such file or directory HOT 1
- Allocator is out of memory in wasm-interp
- Invalid Read Memory in wabt::interp HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wabt.