Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion QEfficient/base/onnx_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,26 @@
import torch
from onnx import ModelProto, external_data_helper, numpy_helper

from QEfficient.customop.ctx_scatter_gather import CtxGather, CtxGatherFunc, CtxScatter, CtxScatterFunc
from QEfficient.customop.ctx_scatter_gather import (
CtxGather,
CtxGather3D,
CtxGatherFunc,
CtxGatherFunc3D,
CtxScatter,
CtxScatter3D,
CtxScatterFunc,
CtxScatterFunc3D,
)
from QEfficient.customop.ctx_scatter_gather_cb import (
CtxGatherCB,
CtxGatherCB3D,
CtxGatherFuncCB,
CtxGatherFuncCB3D,
CtxScatterCB,
CtxScatterCB3D,
CtxScatterFuncCB,
CtxScatterFuncCB3D,
)
from QEfficient.customop.rms_norm import CustomRMSNorm, CustomRMSNormFunc


Expand Down Expand Up @@ -113,7 +132,13 @@ class CustomOpTransform(OnnxTransform):
_custom_ops: Dict[str, Tuple[Any, Any]] = {
"CustomRMSNormFunc": (CustomRMSNormFunc, CustomRMSNorm),
"CtxScatterFunc": (CtxScatterFunc, CtxScatter),
"CtxScatterFunc3D": (CtxScatterFunc3D, CtxScatter3D),
"CtxGatherFunc": (CtxGatherFunc, CtxGather),
"CtxGatherFunc3D": (CtxGatherFunc3D, CtxGather3D),
"CtxScatterFuncCB": (CtxScatterFuncCB, CtxScatterCB),
"CtxScatterFuncCB3D": (CtxScatterFuncCB3D, CtxScatterCB3D),
"CtxGatherFuncCB": (CtxGatherFuncCB, CtxGatherCB),
"CtxGatherFuncCB3D": (CtxGatherFuncCB3D, CtxGatherCB3D),
}

@classmethod
Expand Down
Loading