|
5 | 5 | - M0 scaffold: mix project, MLX 0.25.1 prebuilt fetch pipeline, |
6 | 6 | Makefile wiring `fine` + MLX, `Emily.Native` NIF surface for tensor |
7 | 7 | round-trip, application supervisor skeleton, smoke test suite. |
8 | | -- M1 (partial) — `Emily.Native` op inventory. Shared headers in |
9 | | - `c_src/emily/` (dtype mapping, Tensor resource, helpers); |
10 | | - per-category op files under `c_src/ops/`: |
| 8 | +- M1 — `Emily.Native` op inventory. Shared headers in `c_src/emily/` |
| 9 | + (dtype mapping, Tensor resource, helpers); per-category op files |
| 10 | + under `c_src/ops/`: |
11 | 11 | - Creation: `zeros`, `ones`, `full`, `arange`, `eye`. |
12 | 12 | - Cast: `astype`. |
13 | 13 | - Unary elementwise: `negative`, `abs`, `sign`, `floor`, `ceil`, |
|
26 | 26 | `right_shift`. |
27 | 27 | - Reductions (axes + keepdims): `sum`, `mean`, `prod`, `max`, `min`, |
28 | 28 | `all`, `any`, `logsumexp`; plus `var`/`std` with `ddof`, |
29 | | - `argmax`/`argmin`, cumulative `cumsum`/`cumprod`/`cummax`/`cummin`. |
| 29 | + `argmax`/`argmin`, cumulative `cumsum`/`cumprod`/`cummax`/`cummin`/ |
| 30 | + `logcumsumexp`. |
30 | 31 | - Shape: `reshape`, `transpose`, `squeeze`, `expand_dims`, |
31 | 32 | `broadcast_to`, `concatenate`, `stack`, `flatten`, `tile`, |
32 | 33 | `swapaxes`, `pad`, `repeat`. |
33 | | - - Indexing: `slice`, `take`, `where`. |
| 34 | + - Sort family: `sort`, `argsort`, `partition`, `argpartition`, |
| 35 | + `topk`. |
| 36 | + - Indexing: `slice`, `take`, `where`, `take_along_axis`, |
| 37 | + `put_along_axis`, `scatter_add_axis`. |
| 38 | + - Misc: `clip`, `roll`, `softmax`, `array_equal`. |
34 | 39 | - Linalg: `matmul`, `tensordot`, `outer`, `inner`. |
35 | | -- `Emily.Native.to_binary/1` now routes through `mx::contiguous` so |
| 40 | + - Convolution: `conv_general` (N-D with asymmetric padding, |
| 41 | + dilation, groups, flip). |
| 42 | + - Random: `random_key`, `random_split`, `random_uniform`, |
| 43 | + `random_normal`, `random_randint`, `random_bernoulli`, |
| 44 | + `random_gumbel`, `random_categorical` — keys passed as optional |
| 45 | + tensor args (nil uses MLX's default key sequence). |
| 46 | + - FFT: `fftn`, `ifftn`, `rfftn`, `irfftn`. |
| 47 | + - Memory: `get_active_memory`, `get_peak_memory`, |
| 48 | + `reset_peak_memory`, `get_cache_memory`, `clear_cache` — exposed |
| 49 | + so the soak harness can observe allocator state. |
| 50 | +- `Emily.Native.to_binary/1` routes through `mx::contiguous` so |
36 | 51 | strided views (transpose/slice/swapaxes/broadcast) materialize |
37 | 52 | correctly. |
| 53 | +- `test/support/tensor_helpers.ex` — shared build/inspect helpers. |
| 54 | +- `test/soak/memory_test.exs` (`@tag :soak`, excluded by default) — |
| 55 | + 5000-iteration allocate/eval/drop loop; asserts MLX active memory |
| 56 | + returns within 1 MB of baseline after `clear_cache`. |
| 57 | +- `test/emily/dtype_matrix_test.exs` — smoke matrix covering every |
| 58 | + supported dtype across creation, cast, unary (float + numeric), |
| 59 | + binary, reductions, and comparisons. |
38 | 60 | - Makefile compiles `c_src/**/*.cpp` recursively. |
39 | 61 |
|
40 | 62 | ## Notes |
41 | 63 |
|
42 | 64 | - Ops files use anonymous namespaces to prevent NIF function names |
43 | 65 | (`sin`, `log1p`, `sqrt`, ...) from colliding with C math-library |
44 | 66 | symbols pulled in by MLX headers. |
45 | | -- Deferred to later iterations of M1: sort/argsort, clip, |
46 | | - `slice_update`, `take_along_axis`, `scatter*`, convolutions, |
47 | | - `hadamard_transform`, random ops, FFT, quantized ops, |
48 | | - memory-stats/soak tests. Tracked for M1 completion before moving to |
49 | | - M2 (Backend). |
| 67 | +- Deferred beyond M1: the full `scatter`/`scatter_add`/... family with |
| 68 | + vector-of-indices (only the axis-aligned forms are bound), |
| 69 | + `hadamard_transform`, quantized matmul, `linalg.*` decompositions |
| 70 | + (LU, QR, Cholesky, SVD). These will be added opportunistically when |
| 71 | + M2/M3 callers need them. |
0 commit comments