|
1 | 1 | # wasm32 TODO (priority focus) |
2 | 2 |
|
| 3 | +Last local validation: 2026-02-19 (Pyodide cp313, Emscripten-4.0.9-wasm32). |
| 4 | + |
3 | 5 | Scope for this list: |
4 | 6 | - DSL control-flow stability on wasm32 (runtime OOB risk). |
5 | 7 | - miniexpr fast-path enablement/coverage on wasm32. |
6 | 8 |
|
7 | 9 | ## P0: unblock core DSL JIT stability (runtime safety) |
8 | 10 |
|
9 | | -1. Remove the unconditional Emscripten skip in the wasm smoke test. |
10 | | - - `tests/ndarray/test_wasm_dsl_jit.py:22` |
11 | | - - Current blocker: `tests/ndarray/test_wasm_dsl_jit.py:24` skips on Emscripten. |
12 | | - - Exit criteria: smoke runs and passes on Pyodide in CI (no skip). |
| 11 | +1. [x] Remove the unconditional Emscripten skip in the wasm smoke test. |
| 12 | + - Target: `tests/ndarray/test_wasm_dsl_jit.py::test_wasm_dsl_tcc_jit_smoke` |
| 13 | + - Result: skip removed, test now runs and passes on local Pyodide. |
13 | 14 |
|
14 | | -2. Stabilize full-control-flow DSL kernels on wasm32. |
15 | | - - `tests/ndarray/test_dsl_kernels.py:350` |
16 | | - - Current reason: "full DSL control-flow kernel is unstable on wasm32 (can trigger runtime OOB)". |
17 | | - - Exit criteria: unskip and pass consistently. |
| 15 | +2. [x] Stabilize full-control-flow DSL kernels on wasm32. |
| 16 | + - Target: `tests/ndarray/test_dsl_kernels.py::test_dsl_kernel_full_control_flow_kept_as_dsl_function` |
| 17 | + - Result: skip removed, test now runs and passes on local Pyodide. |
18 | 18 |
|
19 | | -3. Stabilize while-loop DSL kernels on wasm32. |
20 | | - - `tests/ndarray/test_dsl_kernels.py:376` |
21 | | - - Current reason: "while-loop DSL kernel is unstable on wasm32 (can trigger runtime OOB)". |
22 | | - - Exit criteria: unskip and pass consistently. |
| 19 | +3. [x] Stabilize while-loop DSL kernels on wasm32. |
| 20 | + - Target: `tests/ndarray/test_dsl_kernels.py::test_dsl_kernel_while_kept_as_dsl_function` |
| 21 | + - Result: skip removed, test now runs and passes on local Pyodide. |
23 | 22 |
|
24 | | -4. Stabilize scalar-parameter loop DSL kernels on wasm32. |
25 | | - - `tests/ndarray/test_dsl_kernels.py:398` |
26 | | - - Current reason: "scalar-param DSL loop kernel is unstable on wasm32 (can trigger runtime OOB)". |
27 | | - - Exit criteria: unskip and pass consistently. |
| 23 | +4. [x] Stabilize scalar-parameter loop DSL kernels on wasm32. |
| 24 | + - Target: `tests/ndarray/test_dsl_kernels.py::test_dsl_kernel_accepts_scalar_param_per_call` |
| 25 | + - Result: skip removed, test now runs and passes on local Pyodide. |
28 | 26 |
|
29 | 27 | ## P1: recover miniexpr fast-path coverage on wasm32 |
30 | 28 |
|
31 | | -5. Re-enable DSL miniexpr fast-path instrumentation tests. |
32 | | - - `tests/ndarray/test_dsl_kernels.py:202` |
33 | | - - `tests/ndarray/test_dsl_kernels.py:259` |
34 | | - - `tests/ndarray/test_dsl_kernels.py:284` |
35 | | - - `tests/ndarray/test_dsl_kernels.py:422` |
36 | | - - `tests/ndarray/test_dsl_kernels.py:467` |
37 | | - - `tests/ndarray/test_dsl_kernels.py:505` |
38 | | - - `tests/ndarray/test_dsl_kernels.py:531` |
39 | | - - Current reason: "miniexpr fast path is not available on WASM". |
40 | | - - Exit criteria: tests run (no skip) and validate `_set_pref_expr`/policy behavior on wasm. |
41 | | - |
42 | | -6. Re-enable lazyexpr miniexpr fast-path behavior tests on wasm32. |
43 | | - - `tests/ndarray/test_lazyexpr.py:1488` |
44 | | - - `tests/ndarray/test_lazyexpr.py:1523` |
45 | | - - `tests/ndarray/test_lazyexpr.py:1559` |
46 | | - - `tests/ndarray/test_lazyexpr.py:1582` |
47 | | - - Current reason: "miniexpr fast path is not available on WASM". |
48 | | - - Exit criteria: tests run (no skip), fallback/strict semantics match non-wasm expectations. |
49 | | - |
50 | | -7. Revisit int-cast DSL behavior currently expected to fail on wasm. |
51 | | - - `tests/ndarray/test_dsl_kernels.py:312` |
52 | | - - Current behavior on wasm: expects `RuntimeError("DSL kernels require miniexpr")`. |
53 | | - - Exit criteria: either (a) supported and validated, or (b) explicitly documented as out-of-scope with rationale. |
54 | | - |
55 | | -## Suggested validation order |
56 | | - |
57 | | -1. `tests/ndarray/test_wasm_dsl_jit.py` |
58 | | -2. `tests/ndarray/test_dsl_kernels.py -k "control_flow or while or scalar_param"` |
59 | | -3. `tests/ndarray/test_dsl_kernels.py -k "miniexpr_fast_path or jit_policy_forwarding"` |
60 | | -4. `tests/ndarray/test_lazyexpr.py -k "miniexpr_fast_path or strict_miniexpr or unary_negative_literal"` |
| 29 | +5. [x] Re-enable DSL miniexpr fast-path instrumentation tests. |
| 30 | + - Targets: |
| 31 | + - `tests/ndarray/test_dsl_kernels.py::test_dsl_kernel_index_symbols_keep_full_kernel` |
| 32 | + - `tests/ndarray/test_dsl_kernels.py::test_dsl_kernel_with_no_inputs_handles_windows_dtype_policy` |
| 33 | + - `tests/ndarray/test_dsl_kernels.py::test_dsl_kernel_index_symbols_float_cast_uses_miniexpr_fast_path` |
| 34 | + - `tests/ndarray/test_dsl_kernels.py::test_dsl_kernel_scalar_param_keeps_miniexpr_fast_path` |
| 35 | + - `tests/ndarray/test_dsl_kernels.py::test_dsl_kernel_scalar_float_cast_inlined_without_float_call` |
| 36 | + - `tests/ndarray/test_dsl_kernels.py::test_dsl_kernel_miniexpr_failure_raises_even_with_strict_disabled` |
| 37 | + - `tests/ndarray/test_dsl_kernels.py::test_lazyudf_jit_policy_forwarding` |
| 38 | + - Result: wasm skips removed and tests pass on local Pyodide. |
| 39 | + |
| 40 | +6. [x] Re-enable lazyexpr miniexpr fast-path behavior tests on wasm32. |
| 41 | + - Targets: |
| 42 | + - `tests/ndarray/test_lazyexpr.py::test_lazyexpr_string_scalar_keeps_miniexpr_fast_path` |
| 43 | + - `tests/ndarray/test_lazyexpr.py::test_lazyexpr_unary_negative_literal_matches_subtraction` |
| 44 | + - `tests/ndarray/test_lazyexpr.py::test_lazyexpr_miniexpr_failure_falls_back_by_default` |
| 45 | + - `tests/ndarray/test_lazyexpr.py::test_lazyexpr_miniexpr_failure_raises_when_strict` |
| 46 | + - Fix applied: removed wasm-only non-DSL miniexpr gate in `src/blosc2/lazyexpr.py` (`fast_eval`). |
| 47 | + - Result: skips removed and all four tests pass on local Pyodide. |
| 48 | + |
| 49 | +7. [ ] Revisit int-cast DSL behavior currently expected to fail on wasm. |
| 50 | + - Target: `tests/ndarray/test_dsl_kernels.py::test_dsl_kernel_index_symbols_int_cast_matches_expected_ramp` |
| 51 | + - Current local behavior (still expected): raises `RuntimeError` on wasm (`DSL kernels require miniexpr ... miniexpr compilation or execution failed`). |
| 52 | + - Rationale for keeping open: int-cast DSL/miniexpr on wasm remains unsupported in current runtime/backend. |
| 53 | + - Exit criteria: either (a) support `int(...)` casts in wasm miniexpr path, or (b) keep explicit unsupported policy with doc note. |
0 commit comments