'check' Dialectlink
A dialect implementing test assertions for IREE modules.
- 'check' Dialect
- Operations
- check.expect_all_true (Check::ExpectAllTrueOp)
- check.expect_almost_eq (Check::ExpectAlmostEqOp)
- check.expect_almost_eq_const (Check::ExpectAlmostEqConstOp)
- check.expect_eq (Check::ExpectEqOp)
- check.expect_eq_const (Check::ExpectEqConstOp)
- check.expect_false (Check::ExpectFalseOp)
- check.expect_true (Check::ExpectTrueOp)
- Operations
Operationslink
check.expect_all_true
(Check::ExpectAllTrueOp)link
Checks that the operand contains only values that are true
Syntax:
operation ::= `check.expect_all_true` (`` `<` $device^ `>`)?
`` `(` $operand `)` attr-dict `:` type($operand)
Verifies that the operand contains true values, which are represented by any non-zero integer.
Issues a non-fatal failure if the verification fails.
check.expect_all_true<%device>(%arg0) : !hal.buffer_view
check.expect_all_true(%arg1) : tensor<2x2xi32>
Operands:link
Operand | Description |
---|---|
device |
device |
operand |
buffer_view or tensor of signless integer values |
check.expect_almost_eq
(Check::ExpectAlmostEqOp)link
Checks that the operands are almost equal
Syntax:
operation ::= `check.expect_almost_eq` (`` `<` $device^ `>`)?
`` `(` $lhs `,` $rhs `)` attr-dict `:` type($lhs)
Verifies that the buffer view or tensor operands with float elements are almost equal to within an implementation-defined "reasonable" tolerance.
Issues a non-fatal failure if the verification fails.
check.expect_almost_eq(%arg0, %arg1) : tensor<5xf32>
Operands:link
Operand | Description |
---|---|
device |
device |
lhs |
buffer_view or tensor of floating-point values |
rhs |
buffer_view or tensor of floating-point values |
check.expect_almost_eq_const
(Check::ExpectAlmostEqConstOp)link
Checks that the tensor operand is almost equal to some constant
Syntax:
operation ::= `check.expect_almost_eq_const` (`` `<` $device^ `>`)?
`` `(` $lhs `,` $value `)` attr-dict `:` type($lhs)
Verifies that the tensor operand with float elements is almost equal to the constant attribute within an implementation-defined "reasonable" tolerance.
Issues a non-fatal failure if the verification fails.
This op is just a convenience wrapper around the expect_almost_eq op.
check.expect_almost_eq_const(%const0, dense<[0.999999, 2.0]> : tensor<5xf32>) : tensor<5xf32>
Attributes:link
Attribute | MLIR Type | Description |
---|---|---|
value | ::mlir::ElementsAttr | constant vector/tensor attribute |
Operands:link
Operand | Description |
---|---|
device |
device |
lhs |
tensor of floating-point values |
check.expect_eq
(Check::ExpectEqOp)link
Checks that the tensor or buffer view operands are equal
Syntax:
operation ::= `check.expect_eq` (`` `<` $device^ `>`)?
`` `(` $lhs `,` $rhs `)` attr-dict `:` type($lhs)
Verifies that the operands are exactly equal.
Issues a non-fatal failure if the verification fails.
check.expect_eq(%arg0, %arg1) : tensor<5xi32>
Operands:link
Operand | Description |
---|---|
device |
device |
lhs |
buffer_view or tensor of any type values |
rhs |
buffer_view or tensor of any type values |
check.expect_eq_const
(Check::ExpectEqConstOp)link
Checks that the tensor operand is equal to some constant
Syntax:
operation ::= `check.expect_eq_const` (`` `<` $device^ `>`)?
`` `(` $lhs `,` $value `)` attr-dict `:` type($lhs)
Verifies that the tensor operand is exactly equal to a constant attribute.
Issues a non-fatal failure if the verification fails.
This op is just a convenience wrapper around the expect_eq op.
check.expect_eq_const(%arg0, dense<[1, 2]> : tensor<2xi32>) : tensor<2xi32>
Attributes:link
Attribute | MLIR Type | Description |
---|---|---|
value | ::mlir::ElementsAttr | constant vector/tensor attribute |
Operands:link
Operand | Description |
---|---|
device |
device |
lhs |
tensor of any type values |
check.expect_false
(Check::ExpectFalseOp)link
Checks that the operand is false
Syntax:
operation ::= `check.expect_false` `(` $operand `)` attr-dict `:` type($operand)
Verifies that the operand contains a false value, which is represented by zero.
Issues a non-fatal failure if the verification fails.
check.expect_false(%arg0) : i32
Operands:link
Operand | Description |
---|---|
operand |
signless integer |
check.expect_true
(Check::ExpectTrueOp)link
Checks that the operand is true
Syntax:
operation ::= `check.expect_true` `(` $operand `)` attr-dict `:` type($operand)
Verifies that the operand contains a true value, which is represented by any non-zero integer.
Issues a non-fatal failure if the verification fails.
check.expect_true(%arg0) : i32
Operands:link
Operand | Description |
---|---|
operand |
signless integer |