{"id":25411354,"url":"https://github.com/fattorib/thunderkittens-simple-gemm","last_synced_at":"2026-02-09T13:31:30.828Z","repository":{"id":277170591,"uuid":"931561776","full_name":"fattorib/thunderkittens-simple-gemm","owner":"fattorib","description":"Simple Tensorcore GEMM in ThunderKittens","archived":false,"fork":false,"pushed_at":"2025-02-12T13:53:21.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-13T15:58:09.148Z","etag":null,"topics":["cuda","gemm","gpu","thunderkittens"],"latest_commit_sha":null,"homepage":"","language":"Cuda","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fattorib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-12T13:43:24.000Z","updated_at":"2025-03-04T06:04:51.000Z","dependencies_parsed_at":"2025-02-12T14:51:37.231Z","dependency_job_id":"aece035b-e6d0-405a-bd5f-c86ada557a9b","html_url":"https://github.com/fattorib/thunderkittens-simple-gemm","commit_stats":null,"previous_names":["fattorib/tk-simple-gemm","fattorib/thunderkittens-simple-gemm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fattorib/thunderkittens-simple-gemm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fattorib%2Fthunderkittens-simple-gemm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fattorib%2Fthunderkittens-simple-gemm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fattorib%2Fthunderkittens-simple-gemm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fattorib%2Fthunderkittens-simple-gemm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fattorib","download_url":"https://codeload.github.com/fattorib/thunderkittens-simple-gemm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fattorib%2Fthunderkittens-simple-gemm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29266907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T12:53:16.161Z","status":"ssl_error","status_checked_at":"2026-02-09T12:52:30.244Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cuda","gemm","gpu","thunderkittens"],"created_at":"2025-02-16T10:17:14.485Z","updated_at":"2026-02-09T13:31:30.813Z","avatar_url":"https://github.com/fattorib.png","language":"Cuda","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ThunderKittens - Simple GEMM\n\nThis repo contains a performant tensorcore GEMM kernel written in ThunderKittens (*and another slower kernel lol*). For square matrices, the 4-warp, 128x128x32 kernel is within ~98% of cuBLAS and Triton. Thunderkittens is quite nice to use, and while it includes a few example GEMM kernels, these 1) use H100 specific features (WGMMA) and 2) use the author's load-compute-store-finish (LCSF) programming model. This repo intends to provide an example of a simple GEMM kernel that is still fast.  \n\n## Benchmarks\n\nBenchmarks performed on an 4096x4096x4096 problem with bfloat16 inputs and float accumulation on an RTX 4070. Triton kernel is taken from [here](https://triton-lang.org/main/getting-started/tutorials/03-matrix-multiplication.html#sphx-glr-getting-started-tutorials-03-matrix-multiplication-py):\n\n| Kernel                     | TFLOPs |\n|----------------------------|--------|\n| ThunderKittens (this repo) |   61.1 |\n| cuBLAS                     |   61.4 |\n| Triton                     |   62.2 |\n\n# Compile\n\n## Setup \nClone repo with:\n```bash\ngit clone --recurse-submodules https://github.com/fattorib/tk-simple-gemm.git\n```\n\nThis code has been tested in the following environment:\n- gcc 11.4.0\n- nvcc 12.6\n- RTX 4070 \n- ubuntu22.04\n\nAll development work was performed in the `nvidia/cuda:12.6.3-cudnn-devel-ubuntu22.04` docker image. \n\n## Build\nTo build the GEMM kernel (defaults to 128x128x32 kernel), run:\n\n```bash \nmake gemm\n```\n\nto run the kernel and benchmark it, run:\n```\n./gemm.bin\n```\n\nyour output should be something like:\n\n```bash\nProblem Size: 4096 x 4096 x 4096\nTotal Elapsed Time: 0.225039s\nTFLOP/s 61.0734\n```\n\n# Citations\n\n```bibtex\n@misc{spector2024thunderkittenssimplefastadorable,\n      title={ThunderKittens: Simple, Fast, and Adorable AI Kernels}, \n      author={Benjamin F. Spector and Simran Arora and Aaryan Singhal and Daniel Y. Fu and Christopher Ré},\n      year={2024},\n      eprint={2410.20399},\n      archivePrefix={arXiv},\n      primaryClass={cs.LG},\n      url={https://arxiv.org/abs/2410.20399}, \n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffattorib%2Fthunderkittens-simple-gemm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffattorib%2Fthunderkittens-simple-gemm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffattorib%2Fthunderkittens-simple-gemm/lists"}