simit-lang / simit

A language for computing on sparse systems
http://simit-lang.org
Other
452 stars 52 forks source link

frontend index expression syntax support #103

Closed huangjd closed 7 years ago

huangjd commented 7 years ago

Issues: Some tests disabled in elements/indexexpr because of (at least 2) issues with lower stages

  1. flattenIndexExpressions Example statement that causes a bug: d(k, i) = (a(i, k) + b(j, i)) .* c(k, j); The flatten stage extracted a(i, k) + b(j, i) as a temporary, as j is a reduction variable, a temporary tensor of dimensions i and k is made, which performs reduction on j too early. (The temporary should have dimensions i, j, and k, and reduction should only take place just before the reduction variable unscopes.
  1. lowerIndexExpressions Example statement that causes a bug: a(i, j) = b(i, i) It triggers an assert in this stage because j does not appear on rhs. However this should be a valid expression.