🚀 The feature, motivation and pitch
Currently, we have two layouts:
- FixedLayout
- FlexibleLayout
Where FixedLayout basically means "We already decided the layout, don't change it" while FlexibleLayout means "we are free to change this layout".
However, I think there are actually two different components of "decided this layout":
- What is the output stride of this layout?
- Who allocates the actual buffer for this tensor?
I believe conflating these causes some problems:
My proposal is that we scrap our current subclasses of Layout and refactor it into:
class Layout:
stride: FlexibleStride or FixedStride
allocator: NonOwningAllocator (view into another allocation) or Flexible or SymmMem
cc: @eellison @yifuwang @shunting314 @jansel
Alternatives
No response
Additional context
No response
cc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @aakhundov @coconutruben @jataylo @ezyang @yf225 @chenyang78 @ColinPeppler @desertfire
🚀 The feature, motivation and pitch
Currently, we have two layouts:
Where FixedLayout basically means "We already decided the layout, don't change it" while FlexibleLayout means "we are free to change this layout".
However, I think there are actually two different components of "decided this layout":
I believe conflating these causes some problems:
My proposal is that we scrap our current subclasses of Layout and refactor it into:
cc: @eellison @yifuwang @shunting314 @jansel
Alternatives
No response
Additional context
No response
cc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @aakhundov @coconutruben @jataylo @ezyang @yf225 @chenyang78 @ColinPeppler @desertfire