Skip to content

[docs] RewriteRuleSet's order dependency should be documented #2169

Closed
@leshabirukov

Description

@leshabirukov

Greetings!
Using rewriter, I expected RewriteRuleSet is ,namely a set, rules not ordered and applying while any is applicable. But, as I see, order is matters. Setting commute flag didn't helped. Is this behaviour is supposed?

edit:------------------------

Yes, it is fixed as simple as

  while(
      pattern.RewriteRuleSet(
          [rule_relu, rule_leak, rule_tanh, rule_bnorm ]
      ).apply_to_model(ir_model)
  ):
      pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions