Skip to main content

Sparse point cloud convolution library for MLX

Project description

MLX Lattice

Sparse point cloud convolution library for Apple MLX.

[!CAUTION] 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
  • Features: linear, relu, sigmoid
  • Sparse convolution: conv3d with stride, padding, and dilation; conv_transpose3d; generative_conv_transpose3d
  • Sparse pooling: pool3d, max_pool3d, avg_pool3d, global_pool, global_sum_pool, global_avg_pool, global_max_pool
  • 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.10.tar.gz (64.6 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.10-cp314-cp314-manylinux_2_35_x86_64.whl (129.2 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.35+ x86-64

mlx_lattice-0.1.10-cp314-cp314-macosx_26_0_arm64.whl (144.8 kB view details)

Uploaded CPython 3.14macOS 26.0+ ARM64

mlx_lattice-0.1.10-cp314-cp314-macosx_15_0_arm64.whl (141.0 kB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

mlx_lattice-0.1.10-cp313-cp313-manylinux_2_35_x86_64.whl (129.2 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.35+ x86-64

mlx_lattice-0.1.10-cp313-cp313-macosx_26_0_arm64.whl (144.7 kB view details)

Uploaded CPython 3.13macOS 26.0+ ARM64

mlx_lattice-0.1.10-cp313-cp313-macosx_15_0_arm64.whl (141.0 kB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

mlx_lattice-0.1.10-cp312-cp312-manylinux_2_35_x86_64.whl (129.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.35+ x86-64

mlx_lattice-0.1.10-cp312-cp312-macosx_26_0_arm64.whl (144.7 kB view details)

Uploaded CPython 3.12macOS 26.0+ ARM64

mlx_lattice-0.1.10-cp312-cp312-macosx_15_0_arm64.whl (141.0 kB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

File details

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

File metadata

  • Download URL: mlx_lattice-0.1.10.tar.gz
  • Upload date:
  • Size: 64.6 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.10.tar.gz
Algorithm Hash digest
SHA256 c98a242a3d272835f58947b688d35a628f7298a0e616aaa93d00e8bf32c0b984
MD5 97946802f97b0603d5a34cee742763c2
BLAKE2b-256 7622b05f1ccf8882a07dfbcb35562d0fcbc1d59b395e5971a34290a8f81ca9cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx_lattice-0.1.10-cp314-cp314-manylinux_2_35_x86_64.whl
  • Upload date:
  • Size: 129.2 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.10-cp314-cp314-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 1fc4f791bee842c8eaebe50d6405753a62d3aeb7c7646f32b86f81d882a5c5d2
MD5 b44997acff95f5d98c929693bb76ecde
BLAKE2b-256 de14a76ddaeef66d2b0299beba9e253bc8558927dc856e88c93123ab579930f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx_lattice-0.1.10-cp314-cp314-macosx_26_0_arm64.whl
  • Upload date:
  • Size: 144.8 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.10-cp314-cp314-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 0257bc878aa7ef86682e7e3ed346a5cdbf6cc8c688007c46e0aa179da002e3eb
MD5 591be2c8917a8ed0083b31ff4159af74
BLAKE2b-256 7ae9de40edb711a08ea94f7cd8ab7834544841ac4d8244c5436468281bc43d80

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx_lattice-0.1.10-cp314-cp314-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 141.0 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.10-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 54692390f89983102fe9bbe1ac22f3c6815226fcb42bd87334fd564b731d9794
MD5 6c93549c5a601588ba49551b39b258e3
BLAKE2b-256 67f0306ee91b030037b29bfee510859c6a2e54d5ad5ff2de4b17af7633d26835

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx_lattice-0.1.10-cp313-cp313-manylinux_2_35_x86_64.whl
  • Upload date:
  • Size: 129.2 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.10-cp313-cp313-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 0be595c7a3dbaaddb2b6c6654bc97c2966f8e3b4d767110a8fb6872ec48f9433
MD5 6195e679e6c7b14a602fee99f5823ec2
BLAKE2b-256 5d8e5f25a1664fdc7f4f1c1b5d09e4e52741756cd4455b87c223e1673c4ffdfd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx_lattice-0.1.10-cp313-cp313-macosx_26_0_arm64.whl
  • Upload date:
  • Size: 144.7 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.10-cp313-cp313-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 21592fabfe3f7e4a129b90387f6eae99ba633ba1ada640336ba964754fa13284
MD5 2cff4febbce3dff67e4d17e1a76d4393
BLAKE2b-256 4ec5edeff87b6183da2e0fea25d61b14aa731436e6c842ea9e8beb7c162e67f4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx_lattice-0.1.10-cp313-cp313-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 141.0 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.10-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 139f7364806d5d25de52eef18d7c82c044f9d1426138ef2beabfd2e698289a7f
MD5 8d444d94d4dc034030532e1807a2d4c3
BLAKE2b-256 0e2850c47d1e2b85bd0b2c2b53c4b1a65ec1404249de61791e3d8605d3dba860

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx_lattice-0.1.10-cp312-cp312-manylinux_2_35_x86_64.whl
  • Upload date:
  • Size: 129.2 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.10-cp312-cp312-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 08759d194f27226c6cc758b6d9b83f277fb12c2c4460c73caad359ffce8ebedf
MD5 bb749fd66e6cec08527d88ef87ec4620
BLAKE2b-256 4b823659fa83d596b6179111976e254da20fbffc0c08f7292e0f0f33dce6571e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx_lattice-0.1.10-cp312-cp312-macosx_26_0_arm64.whl
  • Upload date:
  • Size: 144.7 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.10-cp312-cp312-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 8639fb7921bb7ea9c6377bc61071980d178a5e3845003887300f71c630ba5214
MD5 6db0433bbd8bd69461388cce4a6567c2
BLAKE2b-256 699420f8a0b65265277edcac76670e1c5f5b0e9ed91dd353546e5480c9e922e5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx_lattice-0.1.10-cp312-cp312-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 141.0 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.10-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 0546ba0ba2ea03e6c8a3954413ecc134f47f4832194aaaff504741d6020cb7a4
MD5 7082f4b1742bcd44966fcd41d88d9783
BLAKE2b-256 f7c959d6b85b90371daef89dea128f26a9529299f8df6284782cd0b4bd068203

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