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

[Fix] Enhance robustness of DefuseOps #8564

Merged
merged 1 commit into from
Jul 29, 2021
Merged

Conversation

ganler
Copy link
Contributor

@ganler ganler commented Jul 27, 2021

Another solution of fix regarding #8559

@merrymercy

@ganler
Copy link
Contributor Author

ganler commented Jul 27, 2021

Instead of playing tricks regarding variable names, we create a mapping (in the FunctionNode phase) from variable names to the corresponding expressions.

@YuchenJin
Copy link
Contributor

Thanks @ganler! Do you know other passes that need to be modified to be compatible with AnnotateSpans due to the same root cause?

@ganler
Copy link
Contributor Author

ganler commented Jul 27, 2021

Thanks @ganler! Do you know other passes that need to be modified to be compatible with AnnotateSpans due to the same root cause?

@YuchenJin It is possible but I am not quite sure for now. I tried all pair combinations of the following passes, only found DefuseOps has such an issue.

    relay.transform.RemoveUnusedFunctions,
    relay.transform.Inline,
    relay.transform.PartitionGraph,
    relay.transform.ToGraphNormalForm,
    relay.transform.SimplifyInference,
    relay.transform.FoldConstant,
    relay.transform.AnnotateSpans,
    relay.transform.DefuseOps,
    relay.transform.FuseOps,
    relay.transform.SimplifyExpr,
    relay.transform.ToBasicBlockNormalForm,
    relay.transform.BatchingOps,
    relay.transform.AlterOpLayout,
    relay.transform.FoldScaleAxis,
    relay.transform.CanonicalizeOps,
    relay.transform.CanonicalizeCast,
    relay.transform.DeadCodeElimination,
    relay.transform.EliminateCommonSubexpr,
    relay.transform.CombineParallelConv2D,
    relay.transform.CombineParallelDense,
    relay.transform.CombineParallelBatchMatmul,
    relay.transform.FastMath,
    relay.transform.DynamicToStatic,
    relay.transform.FoldExplicitPadding,

@masahi masahi merged commit fcbd2b6 into apache:main Jul 29, 2021
ylc pushed a commit to ylc/tvm that referenced this pull request Sep 29, 2021
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
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.

5 participants