[mlir] [MLIR][Linalg] Add aggregate ops decomposition pass and softmax decom… (PR #97582)

Andrzej Warzyński llvmlistbot at llvm.org
Tue Jul 9 01:45:56 PDT 2024


================
@@ -250,6 +282,8 @@ module attributes {transform.with_named_sequence} {
 
     %2 = transform.structured.match ops{["linalg.softmax"]} in %arg1 : (!transform.any_op) -> !transform.any_op
     %3 = transform.structured.decompose_interface %2 : (!transform.any_op) -> !transform.any_op
+    %4 = transform.structured.generalize %3: (!transform.any_op) -> !transform.any_op
----------------
banach-space wrote:

I agree with what's being proposed here (in terms of test coverage), but please make sure that we don't duplicate tests and that test files reflect what's being tested (I consider test file names to be part of documentation). 

ATM:
1. This file is called "transform-op-decompose.mlir", but it's being updated to test both decomposition _and_ generalisation. 
2. Another file added in this PR, "decompose-named-ops.mlir", also tests both decomposition _and_ generalisation.

IMO, there's should be a separate test file for:
* decomposition
* generalisation
* e2e/integration (decomposition -> generalisation

This way it will be clear _what_ is being tested and _where_. 

https://github.com/llvm/llvm-project/pull/97582


More information about the Mlir-commits mailing list