Hello,

Newbie question here: I want to remain as close to the affine dialect as possible and encode accumulators. I am thinking of the “fold” constructs of OCaML or the Reduce construct of MapReduce. Or, to the least, something that can compute the sum of a vector, like in TVM.

For now, the only solution I could find involves creating a memref and writing everything down between cycles. Is this how it’s supposed to be done?

Best regards,

dpotop

PS: if someone has a matrix multiplication or convolution example, possibly with mlir-opt options for optimizing it well, I’d be grateful.