Conversation
- Restrict wasm cibuildwheel test command to tests/ndarray/test_wasm_dsl_jit.py - Update wasm handoff notes to reflect current status and scoped next steps - Remove unused noqa on fill_chunk_operands to satisfy Ruff (RUF100) Context: - cp313 pyodide_2025_0_wasm32 wheel builds successfully on Linux - test_wasm_dsl_jit.py passes (_WASM_MINIEXPR_ENABLED=True) - Broad lazyexpr/reductions wasm failures are tracked separately
Use platform-stable dtype translation for miniexpr in `_set_pref_expr` by mapping
NumPy dtypes via `(kind, itemsize)` instead of `dtype.num`, which differs on
Pyodide/wasm32 and caused DSL int-cast compilation/execution failures.
Changes:
- `src/blosc2/blosc2_ext.pyx`
- add `_me_dtype_from_numpy_dtype(...)` helper
- use helper for operand/output dtype setup in miniexpr compile path
- raise clear `TypeError` for unsupported dtypes
- include `me_get_last_error_message()` details in compile errors
- `CMakeLists.txt`
- pin `miniexpr` to `f5e276a151025f9307819c329a033f3f5293a714`
- `tests/ndarray/test_dsl_kernels.py`
- remove wasm-only expected `RuntimeError` in
`test_dsl_kernel_index_symbols_int_cast_matches_expected_ramp`
- `plans/wasm32-todo.md`
- mark item 7 as done and record retest result
Result:
- wasm32/Pyodide now evaluates DSL `int(...)` index-ramp kernel correctly
(`int64` ramp output), and DSL kernel test module passes locally.
- add contains/startswith/endswith support to eval-safe globals and dtype inference - quote string/bytes scalars when building lazy expressions - fix _numpy_eval_expr dummy handling for string predicates on wasm - allow string scalar specialization in DSL miniexpr input rewriting - map NumPy unicode to ME_STRING and pass validated itemsize in _set_pref_expr - register startswith/endswith in elementwise funcs - add wasm-only strict-miniexpr regression test for string predicates including lazyexpr(..., operands=...)
Member
Author
|
This overrides #584 |
Member
Author
|
FWIW, I double checked that using pyodide 0.29.3 is fully ABI compatible with pydodide 0.29.0 (the version that we have in production in cat2.cloud), so we should be safe here. |
lshaw8317
reviewed
Feb 20, 2026
Member
Author
|
Fixed most of @lshaw8317 comments here. The only open question is the update of |
Collaborator
|
Since blosc2 now supports an internal contains (not from numexpr), and safe_numpy_globals also has a contains function, it is no longer necessary to recur to ne_evaluate when the expression has ''contains''. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.