taco icon indicating copy to clipboard operation
taco copied to clipboard

Is TACO capable of doing caculation with extra itervar?

Open qelk123 opened this issue 2 years ago • 2 comments

Hi all, I'm a beginer in TACO , and I am trying to use it to compile some stencil caculations.However,I didn't find a way to declare the extent and other attributes of axis which not included in the tensor dim.So,I am wondering is TACO capable of doing caculation for something like stencil? Mike

qelk123 avatar Oct 12 '22 14:10 qelk123

TACO cannot currently be used for direct stencil calculations (i.e. A(i + 1, j + 1)), but it could be used through indirect stencil operations by constructing an indirect higher order stencil matrix and multiplying by that. If you're interested in sparse stencil operations, talk to @willow-ahrens about some work she's been up to!

rohany avatar Oct 27 '22 20:10 rohany

It's been a while, but I wanted to give the best response I could on sparse tensor compiler convolution support.

https://dl.acm.org/doi/abs/10.1145/3485505 describes TACO support for static affine expressions (A[i + 1]), which would allow you to represent each point in a stencil separately. If there are only a few points in the stencil this could be a good approach.

https://drive.google.com/file/d/1_VIvuiBV7HHDOMnKppHbAMiNLOYJU7DG/view?usp=sharing is very recent work which describes TACO support for arbitrary affine expressions (A[i + j]), which would be a better fit for bigger stencils.

Finally, https://github.com/willow-ahrens/Finch.jl is a Julia-to-Julia sparse tensor compiler I've been working on which currently supports both of the above (for a very wide variety of operations and formats) using named index modifiers like A[offset[i, j]], you can read more about it at https://dl.acm.org/doi/10.1145/3579990.3580020.

willow-ahrens avatar Mar 20 '23 15:03 willow-ahrens