@@ -410,29 +410,50 @@ def canonicalize(self, node: gs.Node, opset: int) -> bool:
410410 AttrDesc ("div" , IntUnpack ),
411411 ])
412412
413+ debugPrintDesc = OperatorDescriptor (
414+ inputDescriptor = IoDesc ("data_in" ),
415+ outputDescriptor = IoDesc ("data_out" ),
416+ attrDescriptors = [],
417+ )
418+
419+ layerNormalizationDesc = OperatorDescriptor (
420+ inputDescriptor = IoDesc (["data_in" , "weight" , "bias" ]),
421+ outputDescriptor = IoDesc ("data_out" ),
422+ attrDescriptors = [AttrDesc ("epsilon" , FloatUnpack )],
423+ )
424+
425+ iLayerNormDesc = OperatorDescriptor (
426+ inputDescriptor = IoDesc (["data_in" , "weight" , "bias" ]),
427+ outputDescriptor = IoDesc ("data_out" ),
428+ attrDescriptors = [AttrDesc ("D" , IntUnpack ), AttrDesc ("n_levels" , IntUnpack )],
429+ )
430+
413431defaultOperatorDescriptors : Dict [str , OperatorDescriptor ] = {
414432 "Add" : addDesc ,
415433 "Concat" : concatDesc ,
416434 "Conv" : convDesc ,
435+ "DebugPrint" : debugPrintDesc ,
417436 "Dequant" : dequantDesc ,
418437 "Div" : divDesc ,
419438 "Gelu" : geluDesc ,
420- "IntegerDiv" : integerDivDescriptor ,
421439 "ITAMax" : itaMaxDesc ,
422440 "ITAPartialMax" : itaPartialMaxDesc ,
441+ "IntegerDiv" : integerDivDescriptor ,
442+ "LayerNormalization" : layerNormalizationDesc ,
423443 "MaxPool" : maxPoolDesc ,
424444 "Pad" : padDescOld ,
425445 "Quant" : quantDesc ,
446+ "RQIntegerDiv" : requantizedIntegerDivDescriptor ,
426447 "ReduceMean" : reduceMeanDesc ,
427448 "ReduceSum" : reduceSumDesc ,
428449 "RequantizedConv" : requantizedConvDesc ,
429450 "RequantizediGELU" : rqsIGeluDesc ,
430- "RQIntegerDiv" : requantizedIntegerDivDescriptor ,
431451 "Slice" : sliceDesc ,
432452 "Softmax" : softmaxDesc ,
433453 "SoftmaxGrad" : softmaxGradDesc ,
434454 "Transpose" : transposeDesc ,
435455 "iHardswish" : iHardswishDesc ,
456+ "iLayerNorm" : iLayerNormDesc ,
436457 "iNoNorm" : iNoNormDesc ,
437458 "iRMSNorm" : iRMSNormDesc ,
438459 "iSoftmax" : iSoftmaxDesc ,
0 commit comments