Skip to content

Commit e192acc

Browse files
committed
Add RequantizediHardswish
1 parent d7113f8 commit e192acc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Deeploy/OperatorDescriptor.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,17 @@ class GeluApprox(str, Enum):
270270
AttrDesc("three", IntUnpack),
271271
])
272272

273+
requantizedIHardswishDesc = OperatorDescriptor(inputDescriptor = IoDesc("data_in"),
274+
outputDescriptor = IoDesc("data_out"),
275+
attrDescriptors = [
276+
AttrDesc("one_over_six", IntUnpack),
277+
AttrDesc("six", IntUnpack),
278+
AttrDesc("three", IntUnpack),
279+
AttrDesc("mul", IntUnpack),
280+
AttrDesc("add", IntUnpack),
281+
AttrDesc("shift", IntUnpack),
282+
])
283+
273284
iNoNormDesc = OperatorDescriptor(inputDescriptor = IoDesc(["data_in", "weights", "bias"]),
274285
outputDescriptor = IoDesc("data_out"),
275286
attrDescriptors = [
@@ -699,6 +710,7 @@ def canonicalize(self, node: gs.Node, opset: int) -> bool:
699710
"RequantizedConv": requantizedConvDesc,
700711
"RequantizedGemm": requantizedGemmDesc,
701712
"RequantizediGELU": requantizedIGeluDesc,
713+
"RequantizediHardswish": requantizedIHardswishDesc,
702714
"RequantShift": requantShiftDesc,
703715
"Reshape": reshapeDesc,
704716
"Slice": sliceDesc,

0 commit comments

Comments
 (0)