lixiaoquan opened a new pull request #5795:
URL: https://github.com/apache/incubator-tvm/pull/5795
For this function:
```
fn (%True: Tensor[(?, 1), float32], %False: Tensor[(?, ?), float32]) {
free_var %f: fn () -> bool
%0 = %f();
if (%0) {
%True
} else {
%False
}
}
```
Original type inference result:
```
fn (%True: Tensor[(?, ?), float32], %False: Tensor[(?, ?), float32], %f: fn
() -> bool) -> Tensor[(?, ?), float32] {
%0 = %f() /* ty=bool */;
if (%0) {
%True
} else {
%False
}
}
```
Type inference result with this patch, which keeps the fixed dim
```
fn (%True: Tensor[(?, 1), float32], %False: Tensor[(?, 1), float32], %f: fn
() -> bool) -> Tensor[(?, 1), float32] {
%0 = %f() /* ty=bool */;
if (%0) {
%True
} else {
%False
}
}
```
cc @icemelon9 @kevinthesun @zhiics Could you please review?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]