Skip to content

LoopVectorizer depends on ifthenelse #4890

@yongfeng-nv

Description

@yongfeng-nv

My PR (#4885) is blocked by a test failure (https://ci.tvm.ai/blue/organizations/jenkins/tvm/detail/PR-4885/1/pipeline).
The bug can be reproduced without my change. Pick this commit (yongfeng-nv@42cef28) and run tests/python/relay/test_op_level4.py to reproduce the failure.

The original test passes the following IR to LoopVectorizer:

produce strided_set {
  parallel (i0.i1.fused, 0, 12) {
    vectorized (i2.inner, 0, 16) {
      if ((i2.inner < 3)) {
        if ((i2.inner < 3)) {
            strided_set[((i0.i1.fused*16) + i2.inner)] = tvm_if_then_else(...
        }
      }
    }
  }
}

The modified test passes this:

produce strided_set {
  parallel (i0.i1.fused, 0, 12) {
    vectorized (i2.inner, 0, 16) {
      strided_set[((i0.i1.fused*16) + i2.inner)] = tvm_if_then_else(...
    }
  }
}

The "if" statements make some difference, but I don't know the exact impact. My PR removes the "if" statements from the original test and exposes this bug.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions