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

[REFACTOR][TIR] Introduce ExprDeepEqual, Remove IRDeepCompare #5206

Merged
merged 2 commits into from
Apr 2, 2020

Conversation

tqchen
Copy link
Member

@tqchen tqchen commented Apr 1, 2020

This PR introduces ExprDeepEqual which reuses the StructuralEqual infra.
We migrated the usecases of ir_pass::Equal to ExprDeepEqual and StructuralEqual.

@tqchen
Copy link
Member Author

tqchen commented Apr 1, 2020

This PR introduces ExprDeepEqual which reuses the StructuralEqual infra.
We migrated the usecases of ir_pass::Equal to ExprDeepEqual and StructuralEqual.
Copy link
Member

@zhiics zhiics left a comment

Choose a reason for hiding this comment

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

LGTM. Only a few typos

Note
----

This function do not remap variable bindings, it will not
Copy link
Member

Choose a reason for hiding this comment

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

s/do/does

Use py:func:`tvm.ir.structural_equal` to handle structural variable remapping.

Due to the restriction of not remapping variables, this function can run
faster than StructuralEqual and can be used as an utility function during arithmetic
Copy link
Member

Choose a reason for hiding this comment

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

a utility

@tqchen tqchen merged commit e60003c into apache:master Apr 2, 2020
@tqchen
Copy link
Member Author

tqchen commented Apr 2, 2020

Thanks @yzhliu @zhiics

trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Apr 16, 2020
…#5206)

* [REFACTOR][TIR] Introduce ExprDeepEqual, Remove IRDeepCompare

This PR introduces ExprDeepEqual which reuses the StructuralEqual infra.
We migrated the usecases of ir_pass::Equal to ExprDeepEqual and StructuralEqual.

* Address comments
zhiics pushed a commit to neo-ai/tvm that referenced this pull request Apr 17, 2020
…#5206)

* [REFACTOR][TIR] Introduce ExprDeepEqual, Remove IRDeepCompare

This PR introduces ExprDeepEqual which reuses the StructuralEqual infra.
We migrated the usecases of ir_pass::Equal to ExprDeepEqual and StructuralEqual.

* Address comments
@tqchen tqchen deleted the equal branch April 21, 2020 00:01
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