[Doc] Add developer guide for CustomOp (#30886)
Signed-off-by: shen-shanshan <467638484@qq.com>
This commit is contained in:
@@ -29,6 +29,7 @@ class MLAModules:
|
||||
indexer_rotary_emb: torch.nn.Module | None = None
|
||||
|
||||
|
||||
# --8<-- [start:multi_head_latent_attention]
|
||||
@CustomOp.register("multi_head_latent_attention")
|
||||
class MultiHeadLatentAttentionWrapper(CustomOp):
|
||||
"""MLA layer registered as CustomOp to allow OOT backends to add
|
||||
@@ -47,6 +48,8 @@ class MultiHeadLatentAttentionWrapper(CustomOp):
|
||||
3. Return the output tensor.
|
||||
"""
|
||||
|
||||
# --8<-- [end:multi_head_latent_attention]
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
hidden_size: int,
|
||||
|
||||
Reference in New Issue
Block a user