Testing Fwd Bwd Kernels

How to write and test TileLang kernels that need both forward and backward passes. Use this skill whenever the user is implementing custom operators with gradients, writing attention forward+backward, linear attention fwd+bwd, any op used inside torch.autograd.Function, or debugging gradient mismatches. Also trigger when the user mentions backward pass, gradients, dQ/dK/dV, autograd, ctx.save_for_backward, atomic_add for gradient accumulation, or gradient testing in TileLang context. Use even for questions like "how do I test my TileLang backward kernel" or "my gradients don't match the reference".

wenyi-li Updated

File contents

wenyi-li/awesome-agent-kernel-skills/tree/main/testing-fwd-bwd-kernels commit 36fdb7c405

Frequently asked questions

npx skillmds@latest add wenyi-li/testing-fwd-bwd-kernels