Repository navigation
Re-land moving tensor->flow passes. - #6651
Conversation
Of the top of my head I dont know if the move of |
The specific need I have for detensoring is for the |
Abbreviated Benchmark Summary@ commit 21ecd0ce52fcf928a541e6e096adbfdbb7e882a1 (vs. base cd0d8bf37104354ede6c8e8021c9fc7c90abff2f) Raw Benchmarks
[Top 3 out of 51 benchmark results showed] For more information: |
|
Benchmark results look inline with prior commits to me - no regression from this :) |
Agreed it is tricky to maintain, but is also tricky to write tests. Only realistic way to test these is to use the number of dispatches created as a proxy for this. I cant think of good lit tests you can write for this. These are whole program optimizations. |
Still would be better to not do |
Okay. I'm not totally following the rationale here and in #6368, but could we just drop the 2-4 patterns from |
I think that would be ideal, but its going to be non-trivial. If I understand correctly you can move the The @stellaraccident might help more on that. I am just saying in the table above make the before and after this change the same. The demarcation of what "tensor" ops are and what "linalg on tensors" ops are is blur. So they dont bucket neatly by dialect. |
|
Looked through this again. I am more convinced that the |
|
I removed the common input conversion pass entirely, moving those |
MaheshRavishankar
left a comment
There was a problem hiding this comment.
Ok, this looks good to me. Hopefully doesnt cause any other issues. If there is, I think we should try to preserve this flow anyway.
…6850) This refactoring prepares for a similar before/after split within `populateTensorToFlowPatterns` so I can move the `tensor.extract` to `flow.tensor.load` pattern from `PromoteTensorLoads` into that common location. This also follows work in #6651 to organize conversions from `tensor` and `linalg` to `flow`. <sub>[Related Discord discussion here](https://discord.com/channels/689900678990135345/689906000043573354/879860687747289099)</sub>
Reverts #6648, rolling-forward #6586.
First commit is the pure revert, second is a set of proposed fixes for the performance regression. The single pass (with a true/false option) is now split further:
createConvertTensorOpsPasscreateConvertLinalgTensorOpsPass(true)createConvertLinalgTensorOpsPass(false)This gets the original change closer to an NFC (but it is still not an NFC).
Before this change:
buildCommonInputConversionPassPipelinetensor::CastOp,tensor::FromElementsOptensor::InsertSliceOp,tensor::ExtractSliceOp,linalg::TensorCollapseShapeOp,linalg::TensorExpandShapeOplinalg::FillOpAfter this change:
buildCommonInputConversionPassPipelinetensor::CastOp,tensor::FromElementsOp,tensor::InsertSliceOp,tensor::ExtractSliceOp,linalg::TensorCollapseShapeOp,linalg::TensorExpandShapeOplinalg::FillOpPasses on
linalgops are the same, but twotensorops are now converted after linalg fusion, rather than at input conversion time. The first version of this change had thoselinalgops converted during the "common input conversion pipeline".