# Custom autograd.Function ve PyTorch Internals: Kendi Gradient'lerini Yaz

> Source: https://sukruyusufkaya.com/learn/llm-muhendisligi/custom-autograd-function-pytorch-internals
> Updated: 2026-08-23T06:01:51.425Z
> Category: LLM Mühendisliği
> Module: Modül 2: PyTorch'tan Önce — NumPy ve Otomatik Türev Sıfırdan
**TLDR:** PyTorch autograd'ı extend etmek: torch.autograd.Function subclass'ları, custom forward/backward, ctx ile state saklama, gradcheck doğrulaması, custom CUDA/Triton kernel wrap (preview), FlashAttention block matmul mini-implementasyon, second-order gradients ve gradgradcheck.

