# Incorrect Boundary Infer when scheduling contain tvm\_if\_then\_else

**URL:** <https://discuss.tvm.apache.org/t/incorrect-boundary-infer-when-scheduling-contain-tvm-if-then-else/2390>\
**Category:** Questions\
**Created:** [April 26, 2019, 10:06pm UTC](https://discuss.tvm.apache.org/t/incorrect-boundary-infer-when-scheduling-contain-tvm-if-then-else/2390 "2019-04-26T22:06:30Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![aca88](https://discuss.tvm.apache.org/letter_avatar_proxy/v4/letter/a/ed8c4c/32.png) [@aca88](https://discuss.tvm.apache.org/u/aca88)\
**Post date:** [June 24, 2019, 11:17am UTC](https://discuss.tvm.apache.org/t/incorrect-boundary-infer-when-scheduling-contain-tvm-if-then-else/2390/7 "2019-06-24T11:17:55Z")

</div>

Hello,

I also encountered problems as the ones you described in your post by building schedules with more than one conv2d with `padding = 'same'`. I opened a new topic [[TVM Scheduling] Split factors missmatch to original extent - Questions - Apache TVM Discuss](https://discuss.tvm.ai/t/tvm-scheduling-split-factors-missmatch-to-original-extent/2982) and therefore would like to know more about your fix

> [@wezuo](#):
>
> Currently, we made a fix locally to use the intersect of the condition in the if\_then\_else with the iteration variable domain, to infer the output tensor. But I would really like to hear about your solutions.

1. Is there an ETA available for this PR?
2. Where exactly did you do the change? is it inside the `InferBounds` routine or is it an added `ir_pass` which makes changes based on the AST?
3. Also I was wondering if the change could work also for the case from my post copied below for ease of lecture:

> [@\[TVM Scheduling\] Split factors missmatch to original extent](https://discuss.tvm.apache.org/t/tvm-scheduling-split-factors-missmatch-to-original-extent/2982/1):
>
> Suppose now that you would want to split some axis and you wish that the split factors are integer dividers of the original domains (i.e. `if(not some_tvm_axis.dom.extent%16){some_factor=4}` ) . Because the methods mentioned before (i.e. `InferBounds`) change the domains of the axes of all stages, then you can no longer expect the inferred bounds to still be an integer multiplier of the factors.

Thanks

---

_[View the full topic](https://discuss.tvm.apache.org/t/incorrect-boundary-infer-when-scheduling-contain-tvm-if-then-else/2390)._
