Skip to content

Commit e42dfbe

Browse files
committed
Add RequantizediHardswish
1 parent c6e38c3 commit e42dfbe

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
@@ -277,6 +277,17 @@ class GeluApprox(str, Enum):
277277
AttrDesc("three", IntUnpack),
278278
])
279279

280+
requantizedIHardswishDesc = OperatorDescriptor(inputDescriptor = IoDesc("data_in"),
281+
outputDescriptor = IoDesc("data_out"),
282+
attrDescriptors = [
283+
AttrDesc("one_over_six", IntUnpack),
284+
AttrDesc("six", IntUnpack),
285+
AttrDesc("three", IntUnpack),
286+
AttrDesc("mul", IntUnpack),
287+
AttrDesc("add", IntUnpack),
288+
AttrDesc("shift", IntUnpack),
289+
])
290+
280291
iNoNormDesc = OperatorDescriptor(inputDescriptor = IoDesc(["data_in", "weights", "bias"]),
281292
outputDescriptor = IoDesc("data_out"),
282293
attrDescriptors = [
@@ -715,6 +726,7 @@ def canonicalize(self, node: gs.Node, opset: int) -> bool:
715726
"RequantizedConv": requantizedConvDesc,
716727
"RequantizedGemm": requantizedGemmDesc,
717728
"RequantizediGELU": requantizedIGeluDesc,
729+
"RequantizediHardswish": requantizedIHardswishDesc,
718730
"RequantShift": requantShiftDesc,
719731
"Reshape": reshapeDesc,
720732
"Slice": sliceDesc,

0 commit comments

Comments
 (0)