File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 22# Licensed under the MIT License.
33from __future__ import annotations
44
5+ import logging
56from typing import Sequence , TypeVar , Union
67
78__all__ = [
4849 _remove_optional_bias ,
4950)
5051
52+ logger = logging .getLogger (__name__ )
53+
5154_ModelProtoOrIr = TypeVar ("_ModelProtoOrIr" , onnx .ModelProto , ir .Model )
5255_DEFAULT_REWRITE_RULES : tuple [pattern .RewriteRule , ...] = (
5356 * _no_op .rules , # TODO: merge this rule into constant folding?
@@ -82,7 +85,8 @@ def __init__(
8285 def call (self , model : ir .Model ) -> ir .passes .PassResult :
8386 count = self .rules .apply_to_model (model )
8487 if count :
85- print (f"Applied { count } of general pattern rewrite rules." )
88+ logger .info ("Applied %s of general pattern rewrite rules." , count )
89+
8690 return ir .passes .PassResult (model , bool (count ))
8791
8892
You can’t perform that action at this time.
0 commit comments