Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlx_lattice-0.1.4.tar.gz (31.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlx_lattice-0.1.4-cp314-cp314-macosx_26_0_arm64.whl (96.0 kB view details)

Uploaded CPython 3.14macOS 26.0+ ARM64

File details

Details for the file mlx_lattice-0.1.4.tar.gz.

File metadata

  • Download URL: mlx_lattice-0.1.4.tar.gz
  • Upload date:
  • Size: 31.9 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

Hashes for mlx_lattice-0.1.4.tar.gz
Algorithm Hash digest
SHA256 83145be2a6c7b3d076069b1e9eb764a0a4b63f2f6eacba8c4b52e2dd35d9731c
MD5 88d066eb495a84ff1207968cf18748fb
BLAKE2b-256 32a9b1f1f6240105c1d48daf0c2608b404c775c548baf524a8cc18c6f6d8fbcd

See more details on using hashes here.

File details

Details for the file mlx_lattice-0.1.4-cp314-cp314-macosx_26_0_arm64.whl.

File metadata

  • Download URL: mlx_lattice-0.1.4-cp314-cp314-macosx_26_0_arm64.whl
  • Upload date:
  • Size: 96.0 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

Hashes for mlx_lattice-0.1.4-cp314-cp314-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 5d13966c9cdb57f0dc696fe7cda0c2941ee5247002f68daf77cb1ebadb72cb62
MD5 47dda22fc45cf616de6c296ec9e3a58a
BLAKE2b-256 251415089c43f40fec0a3956598d4bb0415b7ef2296776a8992c923440500987

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page