Skip to content

Combining residual block and layer norm fusion #874

Answered by masahi
masahi asked this question in Q&A
Discussion options

You must be logged in to vote

Looking more closely at how layer norm fusion is supported, I'm assuming that layer norm fusion in cutlass is intended to be used for gemm -> layer norm -> gemm fusion. Since the residual add happens before layer norm, I think what I need to do is to replace the first gemm implementation https://github.com/NVIDIA/cutlass/blob/master/examples/37_gemm_layernorm_gemm_fusion/gemm_with_epilogue_visitor.h with the one that supports residual addition.

The situation seems much better now.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@masahi
Comment options

@jackkosaian
Comment options

@MingZwhy
Comment options

@jackkosaian
Comment options

Answer selected by masahi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants