check.expect.approximate
← check dialect
Requires independently typed floating-point values to be approximately equal.
Operation contract
| Property |
Value |
| Semantic phase |
— |
| Traits |
UnknownEffects, HasAnyAncestor(check.case, check.compare) |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
actual |
any |
required |
— |
| Operand |
expected |
any |
required |
— |
| Attribute |
atol |
f64 |
required |
— |
| Attribute |
rtol |
f64 |
required |
— |
| Attribute |
nan |
enum NanPolicy |
required |
— |
| Attribute |
subnormal |
enum SubnormalPolicy |
optional |
— |
Examples
check.expect.approximate actual(%actual) expected(%expected) atol(0.0001) rtol(0.0001) nan(same) : tensor<[%m]xbf16>, tensor<[%m]xf64>
check.expect.approximate actual(%actual) expected(%expected) atol(0.0) rtol(0.00001) nan(same) subnormal(flush) : f32, f64