Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Target][Legalization]Add Tir Level Legalization Function Registration And Update Intrinsic Lowering Pass #7936

Merged
merged 16 commits into from
May 1, 2021

Conversation

zxybazh
Copy link
Member

@zxybazh zxybazh commented Apr 28, 2021

This PR introduces tir level op legalization function registration to current tvm stack and injects the legalization function when no intrinsic lowering function is available. Currently the legalization functions are target-dependent. Previous legalization functions are migrated to the legelization function registry as well.

@junrushao junrushao self-assigned this Apr 28, 2021
@junrushao
Copy link
Member

@tqchen @zxybazh I am thinking if we should move the intrinsic registeration logic to src/tir/intrin, given it is part of TIR and is logically closer to IR manipulation

@zxybazh
Copy link
Member Author

zxybazh commented Apr 29, 2021

IMHO, the intrinsic lowering pass logic is already in src/tir and the intrinsic lowering ruls are more target dependent so I think it's okay if we keep those rules in src/target. However, since it's pure tir level manipulation, I would be fine if we want to move all intrinsic lowering and legalization rules to src/tir/intrin and src/tir/legalization, and manage them together. Would like to see how others think about it.

@junrushao
Copy link
Member

@zxybazh The PR looks good. Please retrigger the CI :-)

Copy link
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I don't have much to comment unlike the previous two :-)

Thanks for the contribution!

@junrushao
Copy link
Member

This PR looks good to me. @tqchen @anijain2305 @zhiics Please let me know if there are any further comments.

@tqchen tqchen merged commit 3d380fc into apache:main May 1, 2021
umangyadav pushed a commit to umangyadav/tvm that referenced this pull request May 5, 2021
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request May 11, 2021
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.

3 participants