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.2.tar.gz (31.2 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.2-cp314-cp314-macosx_26_0_arm64.whl (54.5 kB view details)

Uploaded CPython 3.14macOS 26.0+ ARM64

File details

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

File metadata

  • Download URL: mlx_lattice-0.1.2.tar.gz
  • Upload date:
  • Size: 31.2 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.2.tar.gz
Algorithm Hash digest
SHA256 a9a681352b0a3e048aa51602889addcfca3d64ca29e1dfc6c0af8b5b42138078
MD5 c5314fd97cc011a73fb5d89b00ae5adc
BLAKE2b-256 dd6bebec88bf5efd1d0e04ddfbd6332d4c4ac067634896b766c196f312fcdd15

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx_lattice-0.1.2-cp314-cp314-macosx_26_0_arm64.whl
  • Upload date:
  • Size: 54.5 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.2-cp314-cp314-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 183d851f65661f2cc040dd7eef3b37f336aa72b398352b7855562cd8e294f7b6
MD5 bc4f44179138aeed3b103c9025de6ccd
BLAKE2b-256 3d149151f6630c3872d6794c2f08f51ebb80b20777c88b4e74727046587793d0

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