triton-lang/triton

how to implement backward propagation

Open

#1,189 opened on Feb 13, 2023

 (4 comments) (0 reactions) (0 assignees)MLIR (3,126 forks)github user discovery
help wanted

Repository metrics

Stars
 (19,982 stars)
PR merge metrics
 (Avg merge 2d 18h) (185 merged PRs in 30d)

Description

Hi. I am new to triton and cuda. From my understanding, when we implement a customized pytorch operator using cuda, we need to define both forward and backward function, so that the gradients are propagated properly. However, in the triton document (e.g., how to implement vector addition, fused softmax ...), there seems nothing about backward function? Does that mean the backward function is automatically generated by triton? Thx!

Contributor guide