[Docs] Update Dev. Doc. on how to add a new relay operator#7893
Merged
masahi merged 4 commits intoapache:mainfrom Apr 22, 2021
Merged
[Docs] Update Dev. Doc. on how to add a new relay operator#7893masahi merged 4 commits intoapache:mainfrom
masahi merged 4 commits intoapache:mainfrom
Conversation
Contributor
Author
|
@masahi PTAL. Also Chris Hoge. |
masahi
reviewed
Apr 21, 2021
| .set_attr<TOpPattern>("TOpPattern", kOpaque); | ||
|
|
||
| In this case the ``TOpPattern`` is a hint to the compiler on the pattern of computation the operator does, which might be | ||
| useful for reordering loops and fusing operators. ``kOpaque`` tells TVM not to not bother trying to fuse this operator. |
Member
There was a problem hiding this comment.
Let's drop reordering loops, TOpPattern is only used for operater fusion.
A typo: not to not bother
masahi
reviewed
Apr 21, 2021
| more details on how to do this, we recommend looking up the tutorials | ||
| on `tensor expressions`_, `TVM's operator inventory (topi)`_ and looking at the | ||
| examples cumulative sum and product found in `python/tvm/topi/scan.py`_ and | ||
| `python/tvm/topi/cuda/scan.py`_. In the case of our cumulative sum and product operations |
Member
There was a problem hiding this comment.
Multiple references to the same file
Contributor
Author
There was a problem hiding this comment.
They actually are different files. One is the generic implementation and one is the cuda/gpu implementation. I've made this clearer in the text
masahi
reviewed
Apr 21, 2021
| ---------------------------------------- | ||
|
|
||
| While we've now defined the interface for the operation but still have not | ||
| told TVM how to perform the actual calculations for cumulative sum and product. |
masahi
reviewed
Apr 21, 2021
| 5. Hooking up Compute and Strategy with Relay | ||
| --------------------------------------------- | ||
|
|
||
| After you have implemented how your function can be computed we now need to glue it to our |
Member
There was a problem hiding this comment.
After you have implemented your compute function
Member
Contributor
Author
|
@masahi Thanks for the comments. PTAL |
masahi
approved these changes
Apr 22, 2021
Member
|
Thanks @AndrewZhaoLuo |
mehrdadh
pushed a commit
to mehrdadh/tvm
that referenced
this pull request
Apr 22, 2021
* first draft of add op * first pass editting doc * make main title visible again * address masa's comments
echuraev
pushed a commit
to echuraev/tvm
that referenced
this pull request
Apr 29, 2021
* first draft of add op * first pass editting doc * make main title visible again * address masa's comments
umangyadav
pushed a commit
to umangyadav/tvm
that referenced
this pull request
May 5, 2021
* first draft of add op * first pass editting doc * make main title visible again * address masa's comments
trevor-m
pushed a commit
to trevor-m/tvm
that referenced
this pull request
May 6, 2021
* first draft of add op * first pass editting doc * make main title visible again * address masa's comments
trevor-m
pushed a commit
to trevor-m/tvm
that referenced
this pull request
May 6, 2021
* first draft of add op * first pass editting doc * make main title visible again * address masa's comments
trevor-m
pushed a commit
to trevor-m/tvm
that referenced
this pull request
May 6, 2021
* first draft of add op * first pass editting doc * make main title visible again * address masa's comments
trevor-m
pushed a commit
to neo-ai/tvm
that referenced
this pull request
May 11, 2021
* first draft of add op * first pass editting doc * make main title visible again * address masa's comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the tutorial and goes more in depth by using a more substantial operator than simple element-wise addition.
Instead we follow how PR #7334 and PR #7722 added cumulative product and addition operators.
Testing:
Ran
restview docs/dev/relay_add_op.rstAnd read the document.