Skip to main content

Flash Hog

Flash Hog Logo

This repo contains the code for Flash Higher-Order-Gradients, aka. Flash Hog. This kernel achieves around a 3.7x speedup over an XLA optimized kernel, with linear memory scaling instead of quadratic scaling.

Hog Speedup

Installation

uv add flash-hog

Method

Flash Hog does 4 recomputation passes to avoid any atomics or saving any intermediary tensors of shape (N_Q, N_K). This shakes out to be thread-wise tiling across Q in 3 passes first, once to compute dd, then once for b, then once for both dQ' and ddO. Finally we do another pass tiled over K, producing dK' and dV'. The equations we implement are the following:

Equations

Metadata

Release files for flash-hog 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flash-hog 0.6.0
File Size Uploaded Provenance Actions
flash_hog-0.6.0.tar.gz 20.8 kB Without provenance Details for flash_hog-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flash-hog 0.6.0
File Interpreter ABI Platform Actions
flash_hog-0.6.0-py3-none-any.whl Python 3 none any Details for flash_hog-0.6.0-py3-none-any.whl

Total release size: 48.6 kB

Release files / flash_hog-0.6.0.tar.gz

Download URL flash_hog-0.6.0.tar.gz
Size 20.8 kB
Tags Source
SHA-256 checksum
How to use checksums
23641f16935f1b7aa04d62ed6a82c2b9b40ea5497d0c5201e5072ae31d32960c
BLAKE2b-256 checksum
How to use checksums
13ac1c1c34491a0e5b5284413a587a030c5c80e2846878d71c168572718fb8b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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}

Release files / flash_hog-0.6.0-py3-none-any.whl

Download URL flash_hog-0.6.0-py3-none-any.whl
Size 27.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
760acea57d630edb8412f5fabf295b5fcd0e2cfdcfe9002430e3c8fd7b643cf7
BLAKE2b-256 checksum
How to use checksums
3a3f98d5f450dc17b0abd5a219634f4de440176287bac6eb13c6d8a65790d0a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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}

Security for flash-hog 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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