{"id":50948127,"url":"https://github.com/poyea/lollipop","last_synced_at":"2026-06-17T22:30:58.364Z","repository":{"id":335966298,"uuid":"1014044154","full_name":"poyea/lollipop","owner":"poyea","description":"🍭 Sweet GPU compute kernels in CUDA, wrapped via CuPy","archived":false,"fork":false,"pushed_at":"2026-06-13T23:55:46.000Z","size":231,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-14T00:12:52.428Z","etag":null,"topics":["cuda","cuda-kernel","cuda-kernels","cuda-programming","gpu-kernels","gpu-programming","python"],"latest_commit_sha":null,"homepage":"","language":"Cuda","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/poyea.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-05T00:04:17.000Z","updated_at":"2026-06-13T23:55:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/poyea/lollipop","commit_stats":null,"previous_names":["poyea/lollipop"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/poyea/lollipop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Flollipop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Flollipop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Flollipop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Flollipop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poyea","download_url":"https://codeload.github.com/poyea/lollipop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Flollipop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34468766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","cuda-kernel","cuda-kernels","cuda-programming","gpu-kernels","gpu-programming","python"],"created_at":"2026-06-17T22:30:57.873Z","updated_at":"2026-06-17T22:30:58.358Z","avatar_url":"https://github.com/poyea.png","language":"Cuda","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lollipop\n\nSweet GPU compute kernels in CUDA, wrapped in Python via CuPy.\n\n```bash\nuv sync \u0026\u0026 uv pip install -e . \u0026\u0026 python examples/mandelbrot.py\n```\n\nYou need CUDA Toolkit 11.8 (well, newer version *may not* work) and an NVIDIA GPU (sm_75+ for the HMMA kernels; Turing or anything newer). CuPy's bundled `nvrtc` compiles each kernel at first use, picking up `mma.h` and friends from `CUDA_PATH`.\n\n## Example Kernels\n\n| Kernel | What it does |\n|---|---|\n| [`reduction_v2`](lollipop/kernels/_sources/reduction_v2.cu) | sum-reduce a 1D float array |\n| [`reduction_cg`](lollipop/kernels/_sources/reduction_cg.cu) | same sum-reduce via Cooperative Groups `cg::reduce` |\n| [`prefix_sum`](lollipop/kernels/_sources/prefix_sum.cu) | device-wide exclusive scan, hierarchical Blelloch |\n| [`radix_sort`](lollipop/kernels/_sources/radix_sort.cu) | LSD radix sort of uint32 keys, multi-block |\n| [`matrix_transpose`](lollipop/kernels/_sources/matrix_transpose.cu) | 2D fp32 transpose, 32×33 padded smem tile |\n| [`softmax_vec4`](lollipop/kernels/_sources/softmax_vec4.cu) | row-wise softmax with `float4` loads |\n| [`flash_attention_hmma`](lollipop/kernels/_sources/flash_attention_hmma.cu) | FA-2 forward, fp16 in / fp32 accum, `wmma` 16×16×16 |\n| [`gemm_tiled`](lollipop/kernels/_sources/gemm_tiled.cu) | dense fp32 GEMM, 128×128 macro / 8×8 register micro, manual smem double-buffer |\n| [`gemm_int8`](lollipop/kernels/_sources/gemm_int8.cu) | W8A8 INT8 GEMM, per-row act scale × per-channel weight scale |\n| [`gemm_int4`](lollipop/kernels/_sources/gemm_int4.cu) | W4A16 weight-only (AWQ/GPTQ-shaped), G=64 asymmetric, dequant-fuse-matmul |\n| [`fused_ffn_tail`](lollipop/kernels/_sources/fused_ffn_tail.cu) | RMSNorm → ×γ → +bias → GELU/SiLU → +residual, one kernel |\n| [`rope`](lollipop/kernels/_sources/rope.cu) | rotary positional embedding, Llama half-rotation (pair separation D/2), in-place safe |\n| [`rmsnorm`](lollipop/kernels/_sources/rmsnorm.cu) | RMSNorm forward + backward, per-row fused reductions, dgamma in fp32 accum |\n\n## License\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoyea%2Flollipop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoyea%2Flollipop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoyea%2Flollipop/lists"}