# \[RFC\] CSE Optimization

**URL:** <https://discuss.tvm.apache.org/t/rfc-cse-optimization/8130>\
**Category:** RFC\
**Created:** [October 9, 2020, 10:09am UTC](https://discuss.tvm.apache.org/t/rfc-cse-optimization/8130 "2020-10-09T10:09:29Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ArmageddonKnight](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/armageddonknight/32/1709_2.png) [@ArmageddonKnight](https://discuss.tvm.apache.org/u/ArmageddonKnight)\
**Post date:** [October 16, 2020, 5:19pm UTC](https://discuss.tvm.apache.org/t/rfc-cse-optimization/8130/3 "2020-10-16T17:19:18Z")

</div>

- The user API looks like the following:

```auto
/*!
 * \brief Eliminate common subexpressions among \p in_args and between them and \p output .
 *
 * \param output The output tensor.
 * \param input_grads The gradients of input tensors.
 */
std::pair<Tensor, std::vector<Tensor> >
CSE(const Tensor& output, const std::vector<Tensor>& input_grads);

```

- The tensor expression tree does not provide extra information. It is just an useful data structure for comparison purposes.

---

_[View the full topic](https://discuss.tvm.apache.org/t/rfc-cse-optimization/8130)._
