Skip to content

Conversation

@lixiaoquan
Copy link
Contributor

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?

@tqchen
Copy link
Member

tqchen commented Jun 18, 2020

@icemelon9 please manage this PR

@MarisaKirisame
Copy link
Contributor

LGTM. @jroesch please take a look to make sure it is good. I am confused about the semantic of Any.

@MarisaKirisame MarisaKirisame merged commit 782190e into apache:master Jul 24, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Sep 2, 2020
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Sep 3, 2020
@masahi masahi mentioned this pull request Oct 10, 2020
4 tasks
masahi pushed a commit to masahi/tvm that referenced this pull request Oct 10, 2020
masahi added a commit that referenced this pull request Oct 10, 2020
…6658)

* Revert "[Relay] Keep fixed dim when unifying dynamic shape (#5795)"

This reverts commit 782190e.

* run infer type on test_sparse_dense_padded_alter_op() to fix CI

Co-authored-by: masa <masa@pop-os.localdomain>
TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Oct 13, 2020
…)" (apache#6658)

* Revert "[Relay] Keep fixed dim when unifying dynamic shape (apache#5795)"

This reverts commit 782190e.

* run infer type on test_sparse_dense_padded_alter_op() to fix CI

Co-authored-by: masa <masa@pop-os.localdomain>
TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Oct 14, 2020
…)" (apache#6658)

* Revert "[Relay] Keep fixed dim when unifying dynamic shape (apache#5795)"

This reverts commit 782190e.

* run infer type on test_sparse_dense_padded_alter_op() to fix CI

Co-authored-by: masa <masa@pop-os.localdomain>
TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Oct 15, 2020
…)" (apache#6658)

* Revert "[Relay] Keep fixed dim when unifying dynamic shape (apache#5795)"

This reverts commit 782190e.

* run infer type on test_sparse_dense_padded_alter_op() to fix CI

Co-authored-by: masa <masa@pop-os.localdomain>
TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Oct 15, 2020
…)" (apache#6658)

* Revert "[Relay] Keep fixed dim when unifying dynamic shape (apache#5795)"

This reverts commit 782190e.

* run infer type on test_sparse_dense_padded_alter_op() to fix CI

Co-authored-by: masa <masa@pop-os.localdomain>
TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Oct 16, 2020
…)" (apache#6658)

* Revert "[Relay] Keep fixed dim when unifying dynamic shape (apache#5795)"

This reverts commit 782190e.

* run infer type on test_sparse_dense_padded_alter_op() to fix CI

Co-authored-by: masa <masa@pop-os.localdomain>
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Oct 19, 2020
…)" (apache#6658)

* Revert "[Relay] Keep fixed dim when unifying dynamic shape (apache#5795)"

This reverts commit 782190e.

* run infer type on test_sparse_dense_padded_alter_op() to fix CI

Co-authored-by: masa <masa@pop-os.localdomain>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants