Sparse point cloud convolution library for MLX
Project description
MLX Lattice
Sparse point cloud convolution library for Apple MLX.
Usage
import mlx.core as mx
import mlx_lattice as ml
import mlx_lattice.nn as mln
coords = mx.array(
[[0, 0, 0, 0], [0, 1, 0, 0], [0, 2, 0, 0]],
dtype=mx.int32,
)
feats = mx.array([[1.0, 0.0], [0.5, 1.0], [0.0, 2.0]], dtype=mx.float32)
x = ml.SparseTensor(coords, feats)
conv = mln.Conv3d(2, 8, kernel_size=3, bias=True)
pool = mln.SumPool3d(kernel_size=2, stride=2)
y = pool(conv(x))
mx.eval(y.feats)
Coordinates follow the sparse point convention (batch, x, y, z). The module
weight layout follows MLX convolution modules:
(out_channels, kx, ky, kz, in_channels).
Development
uv sync
uv run ruff check .
uv run ty check
uv build --wheel
The native extension is built with CMake, scikit-build-core, nanobind, and the MLX C++/Metal extension toolchain. macOS is the only supported platform for now.
For native editor indexing:
uv run cmake --preset clangd
Install and run hooks with:
prek install
prek run --all-files
License
Copyright © 2026 Yu
Open sourced under MIT license
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mlx_lattice-0.1.3.tar.gz.
File metadata
- Download URL: mlx_lattice-0.1.3.tar.gz
- Upload date:
- Size: 29.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ab08b548b2b9ff9592fffb60cfb86aa094b928d3409088d25b8d33f100a458c
|
|
| MD5 |
5e0e8422c27fd62cd514854120a26159
|
|
| BLAKE2b-256 |
17c167d83c705771d250d5e421c942febfc2b3bae8366cda7d1257664b971d31
|
File details
Details for the file mlx_lattice-0.1.3-cp314-cp314-macosx_26_0_arm64.whl.
File metadata
- Download URL: mlx_lattice-0.1.3-cp314-cp314-macosx_26_0_arm64.whl
- Upload date:
- Size: 79.1 kB
- Tags: CPython 3.14, macOS 26.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8376715af5559a473d029dea0508c4fa4f268a27d7f1919892f130a6e3d35cfd
|
|
| MD5 |
52fa1f993b460632cf146c414a35b3db
|
|
| BLAKE2b-256 |
4ecb6dea3e81e11f6500bf8586dac0be2dcfac52a50a048bee60c416afbea741
|