You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tvm.apache.org by Alter Xp via Apache TVM Discuss <no...@discuss.tvm.ai> on 2020/10/20 10:03:45 UTC
[Apache TVM Discuss] [Development/RFC] Add some new tensorflow ops
## Motivation
In order to enrich the support of TF operator and the need of practical work, we add 15 operators to TVM.
as follows:
* Expm1, Rint, Softsign, Cumprod, Cumsum
* SegmentMax, SegmentMin, SegmentMean, SegmentPord, SegmentSum
* UnsortedSegmentMax, UnsortedSegmentMin, UnsortedSegmentMean
* UnsortedSegmentPord, UnsortedSegmentSum
## Implementation Details
1. **Expm1** [https://tensorflow.google.cn/api_docs/python/tf/math/expm1](https://tensorflow.google.cn/api_docs/python/tf/math/expm1)

2. **Softsign** [https://tensorflow.google.cn/api_docs/python/tf/nn/softsign](https://tensorflow.google.cn/api_docs/python/tf/nn/softsign)

3. **Rint** [https://tensorflow.google.cn/api_docs/python/tf/math/rint](https://tensorflow.google.cn/api_docs/python/tf/math/rint)
4. **Cumprod** [https://tensorflow.google.cn/api_docs/python/tf/math/cumprod](https://tensorflow.google.cn/api_docs/python/tf/math/cumprod)
5. **Cumsum** [https://tensorflow.google.cn/api_docs/python/tf/math/cumsum](https://tensorflow.google.cn/api_docs/python/tf/math/cumsum)
6. **SegmentMax** [https://tensorflow.google.cn/api_docs/python/tf/math/segment_max](https://tensorflow.google.cn/api_docs/python/tf/math/segment_max)
7. **SegmentMin** [https://tensorflow.google.cn/api_docs/python/tf/math/segment_min](https://tensorflow.google.cn/api_docs/python/tf/math/segment_min)
8. **SegmentMean** [https://tensorflow.google.cn/api_docs/python/tf/math/segment_mean](https://tensorflow.google.cn/api_docs/python/tf/math/segment_mean)
9. **SegmentPord** [https://tensorflow.google.cn/api_docs/python/tf/math/segment_prod](https://tensorflow.google.cn/api_docs/python/tf/math/segment_prod)
10. **SegmentSum** [https://tensorflow.google.cn/api_docs/python/tf/math/segment_sum](https://tensorflow.google.cn/api_docs/python/tf/math/segment_sum)
11. **UnsortedSegmentMax** [https://tensorflow.google.cn/api_docs/python/tf/math/unsorted_segment_max](https://tensorflow.google.cn/api_docs/python/tf/math/unsorted_segment_max)
12. **UnsortedSegmentMin** [https://tensorflow.google.cn/api_docs/python/tf/math/unsorted_segment_min](https://tensorflow.google.cn/api_docs/python/tf/math/unsorted_segment_min)
13. **UnsortedSegmentMean** [https://tensorflow.google.cn/api_docs/python/tf/math/unsorted_segment_mean](https://tensorflow.google.cn/api_docs/python/tf/math/unsorted_segment_mean)
14. **UnsortedSegmentProd** [https://tensorflow.google.cn/api_docs/python/tf/math/unsorted_segment_prod](https://tensorflow.google.cn/api_docs/python/tf/math/unsorted_segment_prod)
15. **UnsortedSegmentSum** [https://tensorflow.google.cn/api_docs/python/tf/math/unsorted_segment_sum](https://tensorflow.google.cn/api_docs/python/tf/math/unsorted_segment_sum)
In TF frontend, exmp1 composed by exp and subtraction. Softsign composed by abs and divide. Rint replaced by round.
We provide a new implementation for Cumsum, Cumprod, SegmentMax, SegmentMin, SegmentMean, SegmentProd, and SegmentSum operators. For the UnsortedSegment operators, they share a set of implementation with Segment operators. The conversion is completed in TF frontend.
@Huyuwei @hlu1 @kazum @siju-samuel @FrozenGene
---
[Visit Topic](https://discuss.tvm.apache.org/t/add-some-new-tensorflow-ops/8217/1) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/4b587271f7819985ea9aea261def6720bb9d668071ef6e3e4595c3cd13ff013b).
[Apache TVM Discuss] [Development/RFC] Add some new tensorflow ops
Posted by Alter Xp via Apache TVM Discuss <no...@discuss.tvm.ai>.
I'll make them down into several prs, than send them directly. Thank you.
---
[Visit Topic](https://discuss.tvm.apache.org/t/add-some-new-tensorflow-ops/8217/5) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/9a92eeb8837e3fe9bc0fcd3339324a8b718566ed96b9d7fe1b263817257160a5).
[Apache TVM Discuss] [Development/RFC] Add some new tensorflow ops
Posted by Zhao Wu via Apache TVM Discuss <no...@discuss.tvm.ai>.
I think we could just send pr directly. Of course, we could make them be several prs, not one big pr.
---
[Visit Topic](https://discuss.tvm.apache.org/t/add-some-new-tensorflow-ops/8217/3) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/bf37b10f803b1526ba815551fe0d4fea549900fdf4cdcd6dc998e5ed82e0281a).
[Apache TVM Discuss] [Development/RFC] Add some new tensorflow ops
Posted by Cuiqing Li via Apache TVM Discuss <no...@discuss.tvm.ai>.
nice job! If it works out, it will be really helpful!
---
[Visit Topic](https://discuss.tvm.apache.org/t/add-some-new-tensorflow-ops/8217/2) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/daac7f6465b270e021d06c3767ee531950314c68e77f1a46e58e85573e3cf6e1).
[Apache TVM Discuss] [Development/RFC] Add some new tensorflow ops
Posted by masahi via Apache TVM Discuss <no...@discuss.tvm.ai>.
Thanks, yeah I also remember `te.scan` only supports scanning along the first axis. I think `te.extern` is good as a first step.
---
[Visit Topic](https://discuss.tvm.apache.org/t/add-some-new-tensorflow-ops/8217/7) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/89b433e65aed65c502ede08563f84813cc0b0386a3b7efb60dd3077d5b4b76f9).
[Apache TVM Discuss] [Development/RFC] Add some new tensorflow ops
Posted by Alter Xp via Apache TVM Discuss <no...@discuss.tvm.ai>.
We have tried using te.scan and te.compute to implement cumsum. But it seems that there is no way to use the same formula to adapt to all situations. Finally, we implement it with te.extern.
---
[Visit Topic](https://discuss.tvm.apache.org/t/add-some-new-tensorflow-ops/8217/6) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/4772f85ae998718392067b739704e672b00fc8038804bad1637feb629246865d).
[Apache TVM Discuss] [Development/RFC] Add some new tensorflow ops
Posted by masahi via Apache TVM Discuss <no...@discuss.tvm.ai>.
I'm curious, how did you implement cumsum? I also wanted cumsum op a while back, but for me it was not clear how it can be implemented efficiently in TVM.
---
[Visit Topic](https://discuss.tvm.apache.org/t/add-some-new-tensorflow-ops/8217/4) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/ab04a92c786162e8b210ea09bfafa1f9d1311376e1ab3716d3f734983fc57095).