facebookresearch / TensorComprehensions

A domain specific language to express machine learning workloads.

Home Page:https://facebookresearch.github.io/TensorComprehensions/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shared memory promotion: reuse memory in disjoint subtrees

ftynse opened this issue · comments

With #537, it is possible to promote to shared memory at disjoint subtrees. Tthe maxSharedMemory option controls the total amount of shared memory used by all subtrees, whereas the same shared memory can be reused in different subtrees because they represent non-overlapping computations and copies are scoped in the same subtree. Note that this requires to pre-allocate buffers in shared memory and use them for different parts of promoted tensors in different subtrees because the downstream compiler cannot do this for us.