Skip to main content

Measure the kernel-launch tax and memory ceiling a megakernel would remove. Future home of a residency-first megakernel compiler.

Project description

megakernel

A megakernel compiles a whole computation — up to an entire model's forward pass — into a single persistent GPU kernel: one launch, one resident working set, an in-kernel scheduler, instead of thousands of separate kernel launches bouncing activations through device memory.

Today this package ships a probe that measures, on your GPU, the two overheads a megakernel removes:

pip install megakernel
python -m megakernel
device               : <your GPU>
kernel enqueue cost  :    x.xx us  (CPU-side submit)
kernel launch tax    :    x.xx us  (end-to-end, tiny kernel)
device copy bandwidth:  xxxx.x GB/s

A decode step composed of ~500 kernel launches pays roughly y.yy ms/token
in launch tax alone, before any math or memory traffic. A megakernel pays
it once.

Requires a CUDA build of PyTorch (the probe reports a clear message otherwise). Also usable as a library: from megakernel import probe.

Roadmap

This name is the future home of a residency-first megakernel compiler currently in development: real models compiled to single persistent kernels, adoptable without rewriting anything. Watch this package for the first public release.

Contact: goinyadeng976@gmail.com

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

megakernel-0.1.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

megakernel-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file megakernel-0.1.0.tar.gz.

File metadata

  • Download URL: megakernel-0.1.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","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":null}

File hashes

Hashes for megakernel-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c977ac54ee1b3bc25a52dde4b5574cc6d4a317fb2462456a0203e26db1195813
MD5 e3bb8b048ecebf92dc90018bb1025a53
BLAKE2b-256 26c21d0615ddaf5b439da8a28352ca97791de89efb2e0ce7a32b2599f624c3ed

See more details on using hashes here.

File details

Details for the file megakernel-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: megakernel-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","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":null}

File hashes

Hashes for megakernel-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 53e668b126191f89585e99d45f6dd231c2b705a4cf8cd9613b4b16ff78eef306
MD5 de9bbb60586f75491e5b263d387becac
BLAKE2b-256 3d4ef4cb5a940162710092048ba370ade044295fbd9b21b6fc12c1d9455e8d6c

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