Skip to content

[TIR] Fold const or empty iter partition#12080

Merged
kparzysz-quic merged 1 commit intoapache:mainfrom
wrongtest-intellif:some_loop_partition_improvements
Jul 13, 2022
Merged

[TIR] Fold const or empty iter partition#12080
kparzysz-quic merged 1 commit intoapache:mainfrom
wrongtest-intellif:some_loop_partition_improvements

Conversation

@wrongtest-intellif
Copy link
Contributor

@wrongtest-intellif wrongtest-intellif commented Jul 13, 2022

Some minor updation to loop partition pass

  • Use tvm::min/tvm::max instead of Min/Max

    Since currently VectorizeLoop pass is just after LoopPartition, there are no extra simplifications. The loop like T.vectorize(Min(1, 8 - 3)) will just fail on vectorizer check. We could just fold constants immediately when we create partitioned loops.

  • Remove unneccesary warning log, and do not create zero-extent loop if we could prove the extent is less or equal to zero.

@junrushao
Copy link
Member

CC: @tqchen

@wrongtest-intellif wrongtest-intellif force-pushed the some_loop_partition_improvements branch from e68870c to 9a3bec0 Compare July 13, 2022 11:00
@kparzysz-quic kparzysz-quic merged commit 6a6093b into apache:main Jul 13, 2022
masahi pushed a commit to masahi/tvm that referenced this pull request Jul 15, 2022
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
mikeseven pushed a commit to mikeseven/tvm that referenced this pull request Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants