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.5.tar.gz (36.8 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.5-cp314-cp314-macosx_26_0_arm64.whl (115.9 kB view details)

Uploaded CPython 3.14macOS 26.0+ ARM64

File details

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

File metadata

  • Download URL: mlx_lattice-0.1.5.tar.gz
  • Upload date:
  • Size: 36.8 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.5.tar.gz
Algorithm Hash digest
SHA256 cd44a2831df83a7fdccde7948a3739d94d62b5711d6fd3957111ecce7a2a9e1b
MD5 9e7f781754603137d2e58100dde4353d
BLAKE2b-256 8e6e772c01de74d1678bad9f2b64213de2d398abc750b28c62efa1478dd18f85

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx_lattice-0.1.5-cp314-cp314-macosx_26_0_arm64.whl
  • Upload date:
  • Size: 115.9 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.5-cp314-cp314-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 992fcaf3bc6595f9c28ce0e8b72fc7324f4bd14caaaa34b594da8ae56f021089
MD5 ae344d621c181daf288741649f76b803
BLAKE2b-256 bc75bf53ea214588ec05c1e2d179e7be7d215e250c9a6a050e4e48e5c74a5c80

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