UN

UNet diffusion model in pure CUDA

Hacker News

UNet diffusion model in pure CUDA

Hi HN! I was inspired by Andrej Karpathy's llm.c ( https://github.com/karpathy/llm.c ), and wrote a full diffusion model training loop in CUDA. I learnt a lot about CUDA from Simon Boehm's Matmul blog ( https://siboehm.com/articles/22/CUDA-MMM ). Currently there is still a lot of room for optimization: the model is running at 45% speed of PyTorch with torch.compile. I'm curious about any thoughts or CUDA tips for convolutions.

Share card

Actual performance

8points
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Hacker NewsStrong engagement from HN community · Strong signals: io · Missing: https docs, excited, just released
70%70% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Product HuntOn track for Day 1 leaderboard · Strong signals: model · Missing: mac, agents, macos
64%64% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
52%52% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
37%37% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
35%35% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Strong signals: training · Missing: arr, mrr, revenue
20%20% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
2%2% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Na
NanoEuler – GPT-2 scale model in pure C/CUDA from scratch54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

NanoEuler – GPT-2 scale model in pure C/CUDA from scratch

Hacker News55
CU
CUDA and cuBLAS matrices in Clojure58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

CUDA and cuBLAS matrices in Clojure

Hacker News1
Ra
Raytracer with both C++ and CUDA back ends57%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Raytracer with both C++ and CUDA back ends

Hacker News5
On
One Billion Rows in CUDA52%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

One Billion Rows in CUDA

Hacker News3
CU
CUDA Fractal Renderer53%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

CUDA Fractal Renderer

Hacker News44
Pu
Pure CUDA C Inference for Qwen3 0.6B in One File, No Dependencies59%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Pure CUDA C Inference for Qwen3 0.6B in One File, No Dependencies

Hacker News1
A
A pure Tcl JPEG decoder50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A pure Tcl JPEG decoder

Hacker News3
A
A pure-Ruby implementation of systemd's sd_notify(3)43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A pure-Ruby implementation of systemd's sd_notify(3)

Hacker News1
Go
Go-osc – OSC Packet Implementation for Golang. Implemented in Pure Go47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Go-osc – OSC Packet Implementation for Golang. Implemented in Pure Go

Hacker News4
Pu
Pure functional lenses in Racket53%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Pure functional lenses in Racket

Hacker News2