@@ -466,6 +466,23 @@ def canonicalize(self, node: gs.Node, opset: int) -> bool:
466466 attrDescriptors = [],
467467)
468468
469+ matMulDesc = OperatorDescriptor (
470+ inputDescriptor = IoDesc (["A" , "B" ]),
471+ outputDescriptor = IoDesc ("data_out" ),
472+ attrDescriptors = [],
473+ )
474+
475+ rqMatMulDesc = RequantizedOperatorDescriptor (
476+ inputDescriptor = IoDesc (["A" , "B" , "add" , "mul" ]),
477+ outputDescriptor = IoDesc ("data_out" ),
478+ attrDescriptors = [
479+ # RequantizedShift attrs
480+ AttrDesc ("n_levels" , IntUnpack ),
481+ AttrDesc ("signed" , BoolUnpack ),
482+ AttrDesc ("div" , IntUnpack ),
483+ ],
484+ )
485+
469486defaultOperatorDescriptors : Dict [str , OperatorDescriptor ] = {
470487 "Add" : addDesc ,
471488 "Concat" : concatDesc ,
@@ -480,11 +497,14 @@ def canonicalize(self, node: gs.Node, opset: int) -> bool:
480497 "ITAPartialMax" : itaPartialMaxDesc ,
481498 "IntegerDiv" : integerDivDescriptor ,
482499 "LayerNormalization" : layerNormalizationDesc ,
500+ "MatMul" : matMulDesc ,
501+ "MatMulInteger" : matMulDesc ,
483502 "MaxPool" : maxPoolDesc ,
484503 "Mul" : mulDesc ,
485504 "Pad" : padDescOld ,
486505 "Quant" : quantDesc ,
487506 "RQIntegerDiv" : requantizedIntegerDivDescriptor ,
507+ "RQMatMul" : rqMatMulDesc ,
488508 "ReduceMean" : reduceMeanDesc ,
489509 "ReduceSum" : reduceSumDesc ,
490510 "RequantizedConv" : requantizedConvDesc ,
0 commit comments