Skip to content

[Arith] Extend DeduceBound to handle EQ op #3774

@umangyadav

Description

@umangyadav

DeduceBound currently only works for the operators LT, GT, LE and GE.

It can be extended to handle EQ op with some checks.

DeduceBound at this point only seems to be used in one place that is in the LoopPartition.

With loop partition use-case consider the following example:

for (i, 0, 10) {
  select(likely((i == 5)), m, n)
}

On the TVM master branch currently, loop partition doesn't do anything on the above example and produces the same output as the input

However, with the EQ support in the deduce bound it can be partitioned to the following:

for (i, 0, 5) {
  n
}
m
for (i, 0, 4) {
  n
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions