# Creating store\_at in TVM

**URL:** <https://discuss.tvm.apache.org/t/creating-store-at-in-tvm/8083>\
**Category:** Development\
**Created:** [October 5, 2020, 10:11am UTC](https://discuss.tvm.apache.org/t/creating-store-at-in-tvm/8083 "2020-10-05T10:11:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbaret](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/mbaret/32/1906_2.png) [@mbaret](https://discuss.tvm.apache.org/u/mbaret)\
**Post date:** [October 5, 2020, 10:11am UTC](https://discuss.tvm.apache.org/t/creating-store-at-in-tvm/8083/1 "2020-10-05T10:11:56Z")

</div>

Halide provides the scheduling primitive `store_at` (as well as `store_root`) to move where the storage of a tensor happens independent of the compute. This is very useful for when we want to make use of the sliding window optimization and create rolling buffers - both of which can be critical in reducing memory usage on memory constrained devices. For examples of how this is used in Halide, you can reference the tutorial on multi-stage pipelines: [https://halide-lang.org/tutorials/tutorial\_lesson\_08\_scheduling\_2.html](https://halide-lang.org/tutorials/tutorial_lesson_08_scheduling_2.html).

Is this something we can emulate in TVM with the existing scheduling intrinsics? And if not, is this something the design of TE would permit? In the latter case, I’d be interested to know whether it would currently be worth implementing in TE given the change of approach in TensorIR, or whether it would be better to wait.

Thanks

cc @junrushao @tqchen@manupa-arm

---

<div class="post-metadata">

**Author:** ![manupa-arm](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/manupa-arm/32/2625_2.png) [@manupa-arm](https://discuss.tvm.apache.org/u/manupa-arm)\
**Post date:** [October 5, 2020, 10:34am UTC](https://discuss.tvm.apache.org/t/creating-store-at-in-tvm/8083/2 "2020-10-05T10:34:52Z")

</div>

Yes definitely useful to have! might save a lot of hacks/workarounds that would otherwise needed to get the same functionality. Also cc : @spectrometerHBH @merrymercy
