iree icon indicating copy to clipboard operation
iree copied to clipboard

`EncodingAttr` to track type of source op

Open lialan opened this issue 1 year ago • 1 comments

This is to get encoding ready for ops other than MATMUL.

Resolves https://github.com/iree-org/iree/issues/17604

lialan avatar Jun 27 '24 16:06 lialan

Cant we use the indexing maps to deduce that this is a matmul?

I think it is possible. We can use linalg::inferContractionDims(maps) to see if it is a contraction op.

hanhanW avatar Jun 27 '24 22:06 hanhanW

@hanhanW @MaheshRavishankar if we can figure out by simply looking at the source op type, then we probably don't need this change?

lialan avatar Jul 06 '24 15:07 lialan

@hanhanW @MaheshRavishankar if we can figure out by simply looking at the source op type, then we probably don't need this change?

I was talking to Benoit about this. I think he clarified something. A linalg op is characterized with three things, iterator types, indexing maps and region. We dont care about iterator types here for now in the encoding, and we are considering how to represent the indexing maps. We might need to represent the region in the attribute though. So saying MATMUL is OK I think. This plus "element types" gives us description of the body. of the op. So this change might be OK

MaheshRavishankar avatar Jul 09 '24 00:07 MaheshRavishankar