Commit 87c9624
committed
fix(build): enable WASM features in wasm-opt optimization
ONNX Runtime builds WASM with bulk memory and non-trapping float-to-int
operations, but wasm-opt was running without these features enabled,
causing validation errors.
**Error:**
```
[wasm-validator error] memory.copy operations require bulk memory
operations [--enable-bulk-memory-opt]
[wasm-validator error] all used features should be allowed
(i32.trunc_sat_f64_s requires nontrapping-float-to-int)
```
**Fix:**
Add required feature flags to wasm-opt invocation:
- --enable-bulk-memory (for memory.copy, memory.fill)
- --enable-nontrapping-float-to-int (for i32.trunc_sat_*)
- --enable-sign-ext (for sign extension operations)
These are standard modern WASM features that ONNX Runtime uses
for better performance.1 parent e054ef0 commit 87c9624
1 file changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
116 | 124 | | |
117 | 125 | | |
118 | 126 | | |
| |||
0 commit comments