You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tvm.apache.org by Mark Shields <no...@github.com.INVALID> on 2021/09/22 16:54:51 UTC

[apache/tvm] BUG #8013: Remove register_alter_op_layout example from dev/use_pass_infra.py (#9076)

This tutorial registers a global layout transformation for conv2d for all
targets which is not well-formed. Later uses of conv2d in the tutorials
pick that layout up then assert fail in the conv2d type-relation.

Better would be to register a transform for an entirely fake target, but
that is beyond my current level of expertise.

In general our use of sphinx/sphinx_gallery for running and rendering the
tutorials is highly suspect since there is no inter-example isolation:
 - Examples using tensorflow will gobble up GPU memory and not give it back.
 - Any examples which use any of the (many!) global registration mechanisms
   need to ensure the registrant is safe across all tutorials.
I recall seeing a thread with the sphinx_gallery where they said they&#39;d prefer
not to work on process-level isolation, but it&#39;s probably worth pinging again.

While digging into this I noticed we had a slicing cast in AlterOpLayout due
to a derived class of ObjectRef introducing virtuals. I moved the virtuals to
the corresponding Node classes. In this case we got away with it since the
ObjectRef happened to not get copied but we were on very thin ice.

Thanks for contributing to TVM!   Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @ them in the pull request thread.

You can view, comment on, or merge this pull request online at:

  https://github.com/apache/tvm/pull/9076

-- Commit Summary --

  * <a href="https://github.com/apache/tvm/pull/9076/commits/0c85654f7c787e01e393d7249b27f6a96b6e6d6e">BUG #8013: Remove register_alter_op_layout example from dev/use_pass_infra.py</a>

-- File Changes --

    M src/relay/transforms/alter_op_layout.cc (41)
    M src/relay/transforms/convert_layout.cc (39)
    M src/relay/transforms/transform_layout.h (36)
    M tutorials/dev/use_pass_infra.py (29)

-- Patch Links --

https://github.com/apache/tvm/pull/9076.patch
https://github.com/apache/tvm/pull/9076.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/tvm/pull/9076

Re: [apache/tvm] BUG #8013: Remove register_alter_op_layout example from dev/use_pass_infra.py (#9076)

Posted by Jared Roesch <no...@github.com.INVALID>.
@mbs-octoml can we just put a backlog item on fixing the tutorial? going to merge for CI

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/tvm/pull/9076#issuecomment-925975088

Re: [apache/tvm] BUG #8013: Remove register_alter_op_layout example from dev/use_pass_infra.py (#9076)

Posted by Junru Shao <no...@github.com.INVALID>.
Thanks @mbs-octoml @jroesch!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/tvm/pull/9076#issuecomment-925979887

Re: [apache/tvm] BUG #8013: Remove register_alter_op_layout example from dev/use_pass_infra.py (#9076)

Posted by Junru Shao <no...@github.com.INVALID>.
Merged #9076 into main.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/tvm/pull/9076#event-5351155826