Repository navigation
Add attribute to capture lowering configuration. - #5842
Conversation
dfaeff6 to
a221640
Compare
e36ceb1 to
84a997c
Compare
| nestedModulePM.addNestedPass<FuncOp>(createCanonicalizerPass()); | ||
| nestedModulePM.addNestedPass<FuncOp>( | ||
| createLinalgTileAndVectorizeWorkgroupsPass()); | ||
| // nestedModulePM.addNestedPass<FuncOp>( |
There was a problem hiding this comment.
Why this needs to be commented ?
There was a problem hiding this comment.
Getting a failure on VMVX backend. Something is not setup correctly. After the CPU backend moves to use dynamic pass pipelines, the way this is done in VMVX can be cleaned up as well. So disabling this till that PR lands. See #5925 . Ill link that issue here.
81cbf2b to
ccc9e97
Compare
asaadaldien
left a comment
There was a problem hiding this comment.
This looks good to me, lets after we check performance is on the same bar (in theory it should be :))
5ade304 to
f4420e5
Compare
antiagainst
left a comment
There was a problem hiding this comment.
BTW I used to have some prototype over the CodeGen attributes, using more structured TableGen definitions. Posted them at antiagainst@7ccc75f just in case you may find something there useful there. :)
| #ifndef IREE_CONVERSION_COMMON_LOWERINGCONFIG | ||
| #define IREE_CONVERSION_COMMON_LOWERINGCONFIG | ||
|
|
||
| // Putting this in HAL dialect for now. |
There was a problem hiding this comment.
IREE dialect might be a better place IMO.
There was a problem hiding this comment.
Ben suggested putting this in HAL dialect.
Current approach to capturing lowering configuration is to use a C++ object. This was added temporarily, but has become load-bearing. A (slightly) better approach is to just compute the configuration and add it as an attribute on the operation. All the lowering through tiling and vectorization then uses this attribute. The use of the attribute is plumbed through on the CPU side at this time. This is the first step towards using dynamic pass pipeline usage.
…ing config.
Since the lowering configuration might be shared by many ops, to clean
up the IR printed, use attribute alias to print the config as follows
```
...
linalg.matmul { lowering.config = #config }
```
To enable this the lowering configuration definition is moved into the
HAL dialect since the interface that is needed is a Dialect interface.
3f8a64d to
ab87575
Compare
* 367468b Fix tests for shift operations (#5952) * 577d9d9 Integrate MLIR-EmitC at iml130/mlir-emitc@0b9d50b (#5936) * b5f3dda Add attribute to capture lowering configuration. (#5842) * 4b31bd9 Initial Adding ROCM HAL Backend to Experimental (#5943) * 3bdcea8 Merge google -> main (#5947) * 90368f1 Remove file left during renaming from LinagToNVVM to LinalgToLLVMGPU (#5940) COPYBARA_INTEGRATE_REVIEW=#5954 from hanhanW:main-to-google 367468b PiperOrigin-RevId: 374687876
* 367468b Fix tests for shift operations (#5952) * 577d9d9 Integrate MLIR-EmitC at iml130/mlir-emitc@0b9d50b (#5936) * b5f3dda Add attribute to capture lowering configuration. (#5842) * 4b31bd9 Initial Adding ROCM HAL Backend to Experimental (#5943) * 3bdcea8 Merge google -> main (#5947) * 90368f1 Remove file left during renaming from LinagToNVVM to LinalgToLLVMGPU (#5940) PiperOrigin-RevId: 374687876
Current approach to capturing lowering configuration is to use a C++
object. This was added temporarily, but has become load-bearing. A
(slightly) better approach is to just compute the configuration and
add it as an attribute on the operation. All the lowering through
tiling and vectorization then uses this attribute.
The use of the attribute is plumbed through on the CPU side at this
time.
This is the first step towards using dynamic pass pipeline usage.
Depends on D102310