Skip to content

Conversation

tqchen
Copy link
Member

@tqchen tqchen commented Jul 16, 2025

This PR decouples deep equal from structural equal implementation by providing a more direct implementatio through functor.

DeepEqual is being used at heart of arith simplification as subroutine and it performs more direct nested checking without doing var remapping as structural equal for efficiency reasons. It also do not need to trace the wrong comparison since the failed path is also expected to happen often.

This step likely will improve the deep equal efficiency because of the more direct approach and gives us opportunity to run simplify future refactor of structural equal to focus on struct path tracing.

@tqchen tqchen changed the title 11;rgb:1414/1414/1414# This is the 1st commit message: [TIR] Decouple DeepEqual from StructuralEqual Jul 16, 2025
This PR decouples deep equal from structural equal implementation
by providing a more direct implementatio through functor.

DeepEqual is being used at heart of arith simplification as subroutine
and it performs more direct nested checking without doing var remapping
as structural equal for efficiency reasons. It also do not need to trace
the wrong comparison since the failed path is also expected to happen often.

This step likely will improve the deep equal efficiency
because of the more direct approach and gives us opportunity to
run simplify future refactor of structural equal to focus on struct path tracing.
Copy link
Contributor

@MasterJH5574 MasterJH5574 left a comment

Choose a reason for hiding this comment

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

LGTM.

@MasterJH5574 MasterJH5574 merged commit 89f9573 into main Jul 17, 2025
14 checks passed
@tqchen tqchen deleted the deepequal branch July 17, 2025 19:17
ShiboXing pushed a commit to ShiboXing/tvm that referenced this pull request Aug 10, 2025
This PR decouples deep equal from structural equal implementation
by providing a more direct implementatio through functor.

DeepEqual is being used at heart of arith simplification as subroutine
and it performs more direct nested checking without doing var remapping
as structural equal for efficiency reasons. It also do not need to trace
the wrong comparison since the failed path is also expected to happen often.

This step likely will improve the deep equal efficiency
because of the more direct approach and gives us opportunity to
run simplify future refactor of structural equal to focus on struct path tracing.
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.

2 participants