uwsampl / SparseTIR

SparseTIR: Sparse Tensor Compiler for Deep Learning
https://sampl.cs.washington.edu/SparseTIR/
Apache License 2.0
131 stars 14 forks source link

[Bugfix] Fix the behavior of MatchToAlloc and Reverse Cache Read/Write #57

Closed yzh119 closed 2 years ago

yzh119 commented 2 years ago

This PR fix the two issues:

  1. MatchToAlloc generates an AllocSparseBuffer instead of AllocBuffer for sparse tensors, actually to make CompactBufferRegion work, we need to allocate original multi-dimensional buffers.
  2. Reverse Cache Read/Write might generate redundant loops when generated block was placed under existing loops.