Skip to main content

Sparse point cloud convolution library for MLX

Project description

MLX Lattice

Sparse point cloud convolution library for Apple MLX.

[!CAUTION] Currently, the CUDA side is only compilable, the functionality is still not fully tested, and the only version supported here is CUDA 13.x.

[!WARNING] We're working on the proofing of math correctness between those operators in different backends. Currently, only the Metal operators have the identical math property, while the CUDA operators still need to be verified.

Operations

Currently, the following operations are supported:

  • Tensor: SparseTensor, sparse_collate, cat, prune, topk_rows
  • Coordinates: downsample, build_kernel_map, build_generative_map, build_transposed_kernel_map, union_coords, intersection_coords, lookup_coords, contains_coords, inverse_map
  • Features: linear, relu, sigmoid
  • Sparse convolution: conv3d with stride, padding, and dilation; conv_transpose3d; generative_conv_transpose3d; optional explicit kernel_map reuse
  • Sparse pooling: pool3d, max_pool3d, avg_pool3d, global_pool, global_sum_pool, global_avg_pool, global_max_pool; optional explicit kernel_map reuse for local pooling
  • Modules: Linear, Conv3d, ConvTranspose3d, GenerativeConvTranspose3d, SumPool3d, MaxPool3d, AvgPool3d, GlobalPool, GlobalSumPool, GlobalAvgPool, GlobalMaxPool, BatchNorm, ReLU, Sigmoid

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++ backend toolchain. Metal builds are enabled on macOS; CUDA kernels are enabled on non-Apple hosts when CMake finds a CUDA compiler and toolkit.

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.11.tar.gz (65.2 kB view details)

Uploaded Source

Built Distributions

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

mlx_lattice-0.1.11-cp314-cp314-manylinux_2_35_x86_64.whl (129.5 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.35+ x86-64

mlx_lattice-0.1.11-cp314-cp314-macosx_26_0_arm64.whl (144.5 kB view details)

Uploaded CPython 3.14macOS 26.0+ ARM64

mlx_lattice-0.1.11-cp314-cp314-macosx_15_0_arm64.whl (140.9 kB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

mlx_lattice-0.1.11-cp313-cp313-manylinux_2_35_x86_64.whl (129.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.35+ x86-64

mlx_lattice-0.1.11-cp313-cp313-macosx_26_0_arm64.whl (144.4 kB view details)

Uploaded CPython 3.13macOS 26.0+ ARM64

mlx_lattice-0.1.11-cp313-cp313-macosx_15_0_arm64.whl (140.9 kB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

mlx_lattice-0.1.11-cp312-cp312-manylinux_2_35_x86_64.whl (129.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.35+ x86-64

mlx_lattice-0.1.11-cp312-cp312-macosx_26_0_arm64.whl (144.5 kB view details)

Uploaded CPython 3.12macOS 26.0+ ARM64

mlx_lattice-0.1.11-cp312-cp312-macosx_15_0_arm64.whl (140.9 kB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

File details

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

File metadata

  • Download URL: mlx_lattice-0.1.11.tar.gz
  • Upload date:
  • Size: 65.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mlx_lattice-0.1.11.tar.gz
Algorithm Hash digest
SHA256 f8d02a113ed184be63d297234152ca74b378399ab1261703aeeead7d1d772ded
MD5 ae56452ebc2536aa880830cd3351ba9b
BLAKE2b-256 63f1eb386f100303a4f8d7a5cf1bf4ced0c5e20a74c58d9818a079d9b5d06478

See more details on using hashes here.

File details

Details for the file mlx_lattice-0.1.11-cp314-cp314-manylinux_2_35_x86_64.whl.

File metadata

  • Download URL: mlx_lattice-0.1.11-cp314-cp314-manylinux_2_35_x86_64.whl
  • Upload date:
  • Size: 129.5 kB
  • Tags: CPython 3.14, manylinux: glibc 2.35+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mlx_lattice-0.1.11-cp314-cp314-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 d6b24aeebecd85552c08c13fffd6054fc372f858b41b2d14be0c1837ea30bbeb
MD5 af1f41b1a35b3e5b5c1ebc77e8d31633
BLAKE2b-256 6101207836ac76026c92146d2b68ef439ce6a8bdac25d605e43071526b6b239d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx_lattice-0.1.11-cp314-cp314-macosx_26_0_arm64.whl
  • Upload date:
  • Size: 144.5 kB
  • Tags: CPython 3.14, macOS 26.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mlx_lattice-0.1.11-cp314-cp314-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 9002458d4ccb0474490fc4e5c050d12e6b2882de9858054c7b0e18add109dd7e
MD5 9675ef2d28946dfc44941f360164c176
BLAKE2b-256 b0b9a4a71e1d5a67bd2f87cc7a87920204a8bfe3bf98565df5acd6e45d9642da

See more details on using hashes here.

File details

Details for the file mlx_lattice-0.1.11-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

  • Download URL: mlx_lattice-0.1.11-cp314-cp314-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 140.9 kB
  • Tags: CPython 3.14, macOS 15.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mlx_lattice-0.1.11-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 5e7071d010786336425cee2f519dc39250589b373c729f5ca34eaf72c40a1e1a
MD5 6e300cc51336e5df8a799112bbd788ed
BLAKE2b-256 00e5c492980a7f4d786ac387dec8e13a6dc14d0a382fbc57162058a6a61d4355

See more details on using hashes here.

File details

Details for the file mlx_lattice-0.1.11-cp313-cp313-manylinux_2_35_x86_64.whl.

File metadata

  • Download URL: mlx_lattice-0.1.11-cp313-cp313-manylinux_2_35_x86_64.whl
  • Upload date:
  • Size: 129.5 kB
  • Tags: CPython 3.13, manylinux: glibc 2.35+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mlx_lattice-0.1.11-cp313-cp313-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 e1f52920271cffe4bbc0c82ade799de07241bbb54f55196798adbad1103159e2
MD5 942282c2623d459a358627d8f67dfea7
BLAKE2b-256 5f1be22a11bdfee6a123ae179c61a79ba3cc133ce199f384044c28f0fed0c2fe

See more details on using hashes here.

File details

Details for the file mlx_lattice-0.1.11-cp313-cp313-macosx_26_0_arm64.whl.

File metadata

  • Download URL: mlx_lattice-0.1.11-cp313-cp313-macosx_26_0_arm64.whl
  • Upload date:
  • Size: 144.4 kB
  • Tags: CPython 3.13, macOS 26.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mlx_lattice-0.1.11-cp313-cp313-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 f513ae8c33532ef216904bc9fae0ef7c82dd32df8b60f1008a4de905044ba113
MD5 befca842ddb6b5b03e2299fddf71ee2b
BLAKE2b-256 d5b5c193dadd70a76be21c6cc213a2da0d97ec6fdce89d908ba38327f68430b0

See more details on using hashes here.

File details

Details for the file mlx_lattice-0.1.11-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

  • Download URL: mlx_lattice-0.1.11-cp313-cp313-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 140.9 kB
  • Tags: CPython 3.13, macOS 15.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mlx_lattice-0.1.11-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 ef608565c7a6064d230da38de23354eefd6610ec3ac3e9a28aadef0243f66b98
MD5 e56cc3a7d18076e33bf93e99455bc89c
BLAKE2b-256 83f56a624c6c8c52f1383b83a7b7f30eb8d06c6c1573748f05f611334417d0ed

See more details on using hashes here.

File details

Details for the file mlx_lattice-0.1.11-cp312-cp312-manylinux_2_35_x86_64.whl.

File metadata

  • Download URL: mlx_lattice-0.1.11-cp312-cp312-manylinux_2_35_x86_64.whl
  • Upload date:
  • Size: 129.4 kB
  • Tags: CPython 3.12, manylinux: glibc 2.35+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mlx_lattice-0.1.11-cp312-cp312-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 16e6d7b5b8252008ff1965aaf31ba7f6e21f283de9009e3b0e8bff620f945621
MD5 e97b53278c41acae7d15da0a8d8d0a68
BLAKE2b-256 0dc24aa54a591cb13886b0d5b05a28e56095c5bab38827379d3fa072d26121dd

See more details on using hashes here.

File details

Details for the file mlx_lattice-0.1.11-cp312-cp312-macosx_26_0_arm64.whl.

File metadata

  • Download URL: mlx_lattice-0.1.11-cp312-cp312-macosx_26_0_arm64.whl
  • Upload date:
  • Size: 144.5 kB
  • Tags: CPython 3.12, macOS 26.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mlx_lattice-0.1.11-cp312-cp312-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 f23c2adae2f46ecf7971f1daeb0adde0d2981099ffc0c8a02c7fb159f360c711
MD5 51999dcdbd920e762a4f32bbe1ac8aa2
BLAKE2b-256 8ec1d32584083bba8adcc023e7f4765444ff4c7c097c2c059ab6e3a1d24efddb

See more details on using hashes here.

File details

Details for the file mlx_lattice-0.1.11-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

  • Download URL: mlx_lattice-0.1.11-cp312-cp312-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 140.9 kB
  • Tags: CPython 3.12, macOS 15.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mlx_lattice-0.1.11-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 0fa649c628d6c59dafd4b069646c43d7eb6038d88b658ea18784312651d36ff5
MD5 7882277e83a55ebdbd622dec9fc00fea
BLAKE2b-256 c9e6e4aa935668633e172eba52287603cce372ea31f3865c63dbf7381a6c9f6d

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