Commit 815b4db
Align DSL operand grids, so mixed-dtype NDArray inputs work
Blocks are sized in bytes, so same-shaped operands of different itemsize
get different chunks/blocks (float32 vs int64 over 1M elements: blocks of
31250 vs 15625). validate_inputs then refuses the miniexpr fast path, and
a DSL kernel has no slow path to fall back on, so evaluation died with a
misleading "slicing a DSL computation is not supported".
Whether the grids diverge depends on array size and on the platform's
cache detection, which is why CI caught it only on Windows (where
platform.machine() is "AMD64", so compute_chunks_blocks' x86_64 branch
never runs and blocks stay L1-sized) and WASM: their 10,007-element
operands already disagree, while elsewhere both fit a single block. At 1M
elements it failed everywhere, macOS included -- hence the regression test
sits at that size.
LazyUDF now copies mismatched NDArray operands onto the grid of the widest
dtype (fewest elements per block, so every operand still fits the cache
budget the heuristic aimed at), once at construction rather than per
evaluation, and only for DSL kernels.
Also trace the JS bridge under BLOSC_ME_JIT_TRACE. It bypasses miniexpr
entirely, so it used to report nothing at all, which is what turned the
WASM-only mandel dispatch test into a confusing empty-output failure
rather than an obvious one. Both engines now trace, and that test asserts
on both platforms instead of skipping.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 13cf972 commit 815b4db
3 files changed
Lines changed: 63 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1495 | 1495 | | |
1496 | 1496 | | |
1497 | 1497 | | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
1498 | 1507 | | |
1499 | 1508 | | |
1500 | 1509 | | |
| |||
1524 | 1533 | | |
1525 | 1534 | | |
1526 | 1535 | | |
1527 | | - | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
1528 | 1539 | | |
1529 | 1540 | | |
1530 | 1541 | | |
| |||
1541 | 1552 | | |
1542 | 1553 | | |
1543 | 1554 | | |
| 1555 | + | |
1544 | 1556 | | |
1545 | 1557 | | |
1546 | 1558 | | |
| |||
4576 | 4588 | | |
4577 | 4589 | | |
4578 | 4590 | | |
| 4591 | + | |
| 4592 | + | |
| 4593 | + | |
| 4594 | + | |
| 4595 | + | |
| 4596 | + | |
| 4597 | + | |
| 4598 | + | |
| 4599 | + | |
| 4600 | + | |
| 4601 | + | |
| 4602 | + | |
| 4603 | + | |
| 4604 | + | |
| 4605 | + | |
| 4606 | + | |
| 4607 | + | |
| 4608 | + | |
| 4609 | + | |
| 4610 | + | |
| 4611 | + | |
| 4612 | + | |
| 4613 | + | |
| 4614 | + | |
| 4615 | + | |
| 4616 | + | |
| 4617 | + | |
| 4618 | + | |
| 4619 | + | |
| 4620 | + | |
| 4621 | + | |
4579 | 4622 | | |
4580 | 4623 | | |
4581 | 4624 | | |
4582 | 4625 | | |
4583 | 4626 | | |
4584 | 4627 | | |
| 4628 | + | |
| 4629 | + | |
4585 | 4630 | | |
4586 | 4631 | | |
4587 | 4632 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1196 | 1196 | | |
1197 | 1197 | | |
1198 | 1198 | | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
1199 | 1213 | | |
1200 | 1214 | | |
1201 | 1215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
0 commit comments