Skip to main content

🚀 MXFrame

GPU-accelerated DataFrames — Python ergonomics, Mojo speed, every GPU.

MXFrame is a DataFrame query engine that pairs a Polars-style Python API with pre-compiled Mojo AOT kernels. The same code runs on NVIDIA, AMD, and Apple Silicon — no CUDA required, no JIT compilation at query time.

TPC-H Python Platform License


✨ Why MXFrame?

pandas Polars cuDF (Rapids) MXFrame
GPU support ✅ NVIDIA only Any GPU
Compiled kernels ✅ Rust ✅ CUDA Mojo AOT
Install complexity pip pip CUDA + Rapids stack pixi install
TPC-H competitive
Cross-vendor ✅ NVIDIA/AMD/Apple

MXFrame is the cuDF architecture without the CUDA lock-in.
Kernels are compiled once to a .so at build time — loaded in ~1 ms, then pure dispatch on every query.


⚡ Quick Start

# 1. Install pixi (Modular's package manager)
curl -fsSL https://pixi.sh/install.sh | bash

# 2. Clone and set up
git clone https://github.com/abhisheksreesaila/mxframe
cd mxframe
pixi install

# 3. Verify GPU is working
pixi run python3 scripts/_check_gpu.py
import pyarrow as pa
from mxframe import LazyFrame, Scan, col, lit

data = pa.table({
    "dept":   pa.array(["eng", "eng", "mkt", "mkt", "eng"]),
    "salary": pa.array([120.0, 95.0, 80.0, 110.0, 130.0], pa.float32()),
    "age":    pa.array([32, 28, 35, 29, 40], pa.int32()),
})

result = (
    LazyFrame(Scan(data))
    .filter(col("age") > lit(28))
    .groupby("dept")
    .agg(
        col("salary").sum().alias("total_salary"),
        col("age").count().alias("headcount"),
    )
    .sort(col("total_salary"), descending=True)
    .compute(device="gpu")   # or "cpu"
)
print(result.to_pandas())
  dept  total_salary  headcount
0  eng         345.0          3
1  mkt         110.0          1

📊 Performance — TPC-H at 1 M rows (v0.3.0)

MX CPU beats Polars on 20/22 queries. GPU advantage compounds at 10 M+ rows where kernel parallelism dominates PCIe upload cost.

Query MX CPU MX GPU Polars CPU vs Polars
Q9 · Product profit (6-table join) 0.6 ms 6.6 ms 39.9 ms 67×
Q12 · 2-table join + agg 0.5 ms 3.4 ms 23.2 ms 46×
Q3 · 3-table join + agg 2.6 ms 8.7 ms 23.3 ms
Q1 · Filter + 8 aggregations 10.7 ms 42.1 ms 33.3 ms 3.1×

Full 22-query tables (1 M + 10 M rows), methodology, and reproduce instructions


📚 Docs

API Reference LazyFrame, expressions, SQL frontend, supported operations, running tests
Benchmarks Full TPC-H tables, kernel catalogue, limitations, roadmap, reproduce instructions
Architecture Design philosophy, internal layers, how MAX Graph fits in
Contributing Dev setup, writing Mojo kernels, adding queries

📦 Dependencies

Package Required Purpose
pyarrow >= 14 Column storage, zero-copy NumPy bridge
numpy >= 1.24 Vectorized pre/post processing
pandas >= 2.0 Reference implementations
modular >= 26.4 GPU only MAX Engine runtime, Mojo GPU dispatch
polars >= 0.20 optional Benchmark comparison
sqlglot >= 25 optional SQL frontend parsing

📄 License

Apache 2.0 — see LICENSE.

Download files

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

Source Distribution

mxframe-0.3.0.tar.gz (324.4 kB view details)

Uploaded Source

Built Distribution

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

mxframe-0.3.0-py3-none-manylinux_2_34_x86_64.whl (317.8 kB view details)

Uploaded Python 3manylinux: glibc 2.34+ x86-64

File details

Details for the file mxframe-0.3.0.tar.gz.

File metadata

  • Download URL: mxframe-0.3.0.tar.gz
  • Upload date:
  • Size: 324.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mxframe-0.3.0.tar.gz
Algorithm Hash digest
SHA256 972ec48dfd6c7376f6fbcdcee9d9d5864b2e40c230b63be976efbf714cef0517
MD5 12e4ec770f8bb6623f8848bd5ef2abdb
BLAKE2b-256 840f9f17150b6c6bbf36f78ce363df0d5782cbfe98e5b09c18f36f6d9a9b6b14

See more details on using hashes here.

Provenance

The following attestation bundles were made for mxframe-0.3.0.tar.gz:

Publisher: publish.yml on abhisheksreesaila/mxframe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mxframe-0.3.0-py3-none-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mxframe-0.3.0-py3-none-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 cc49ad86af2a7b2fc96dc4ac895f85e09d18a3b9c96b86b7313cf397690d6d2a
MD5 9e6330e5f98045c23f0d49c1b2f2c6a8
BLAKE2b-256 c8bdb04a611d6acd6bc4495e8d59e9d06409e7838212c710a85691f6d8e19c42

See more details on using hashes here.

Provenance

The following attestation bundles were made for mxframe-0.3.0-py3-none-manylinux_2_34_x86_64.whl:

Publisher: publish.yml on abhisheksreesaila/mxframe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.0

2 files

This release

0.3.0 This release

2 files

0.2.3

2 files

0.2.1

2 files

0.1.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page