Skip to content

Commit c0f5ae1

Browse files
committed
Add Relu, Reshape, RequantShift
1 parent 2193c64 commit c0f5ae1

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Deeploy/OperatorDescriptor.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,24 @@ def canonicalize(self, node: gs.Node, opset: int) -> bool:
604604
],
605605
)
606606

607+
reluDesc = OperatorDescriptor(
608+
inputDescriptor = IoDesc("data_in"),
609+
outputDescriptor = IoDesc("data_out"),
610+
attrDescriptors = [],
611+
)
612+
613+
reshapeDesc = OperatorDescriptor(
614+
inputDescriptor = IoDesc(["data_in", "shape"]),
615+
outputDescriptor = IoDesc("data_out"),
616+
attrDescriptors = [],
617+
)
618+
619+
requantShiftDesc = OperatorDescriptor(
620+
inputDescriptor = IoDesc(["data_in", "mul", "add"]),
621+
outputDescriptor = IoDesc("data_out"),
622+
attrDescriptors = [],
623+
)
624+
607625
defaultOperatorDescriptors: Dict[str, OperatorDescriptor] = {
608626
"Add": addDesc,
609627
"CLCA": clcaDesc,
@@ -632,9 +650,12 @@ def canonicalize(self, node: gs.Node, opset: int) -> bool:
632650
"RQMatMul": rqMatMulDesc,
633651
"ReduceMean": reduceMeanDesc,
634652
"ReduceSum": reduceSumDesc,
653+
"Relu": reluDesc,
635654
"RequantizedConv": requantizedConvDesc,
636655
"RequantizedGemm": requantizedGemmDesc,
637656
"RequantizediGELU": requantizedIGeluDesc,
657+
"RequantShift": requantShiftDesc,
658+
"Reshape": reshapeDesc,
638659
"Slice": sliceDesc,
639660
"Softmax": softmaxDesc,
640661
"SoftmaxGrad": softmaxGradDesc,

0 commit comments

Comments
 (0)