-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
misc: enable --split-input-file --verify-diagnostics (#1011)
Currently, `xdsl-opt --split-input-file --verify-diagnostics` will only diagnose the first chunk and exit, preventing the `invalid.mlir` kind of filecheck. This enables it -for verification diagnostics only- and should allow to clean some filechecks already.
- Loading branch information
1 parent
5da2fa8
commit 95702ea
Showing
4 changed files
with
34 additions
and
34 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// RUN: xdsl-opt %s --verify-diagnostics --split-input-file | filecheck %s | ||
|
||
"builtin.module"()({ | ||
"gpu.module"()({ | ||
%init = "arith.constant"() {"value" = 42 : index} : () -> index | ||
%sum = "gpu.all_reduce"(%init) ({ | ||
^bb(%lhs : index, %rhs : index): | ||
%sum = "arith.addi"(%lhs, %rhs) : (index, index) -> index | ||
"gpu.yield"(%sum) : (index) -> () | ||
}) {"op" = #gpu<all_reduce_op add>} : (index) -> index | ||
"gpu.module_end"() : () -> () | ||
}) {"sym_name" = "all_reduce_both"} : () -> () | ||
}) {} : () -> () | ||
|
||
// CHECK: gpu.all_reduce can't have both a non-empty region and an op attribute. | ||
|
||
// ----- | ||
|
||
"builtin.module"()({ | ||
"gpu.module"()({ | ||
%init = "arith.constant"() {"value" = 42 : index} : () -> index | ||
%sum = "gpu.all_reduce"(%init) ({ | ||
^bb(%lhs : index): | ||
%c = "arith.constant"() {"value" = 42 : index} : () -> index | ||
%sum = "arith.addi"(%lhs, %c) : (index, index) -> index | ||
"gpu.yield"(%sum) : (index) -> () | ||
}) : (index) -> index | ||
"gpu.module_end"() : () -> () | ||
}) {"sym_name" = "all_reduce_body_types"} : () -> () | ||
}) {} : () -> () | ||
|
||
// CHECK: Expected ['index', 'index'], got ['index']. A gpu.all_reduce's body must have two arguments matching the result type. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters