check.compare
← check dialect
Ends a trial by independently invoking target and oracle subjects and checking their explicit typed observations. A single subject is used for both profiles; an optional second subject supplies the oracle implementation.
Operation contract
| Property |
Value |
| Semantic phase |
— |
| Traits |
Terminator, UnknownEffects, HasParent(check.trial), ImplicitTerminator(check.return) |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
call_parameters |
any |
variadic |
Kernel workloads or command/pipeline specialization values. |
| Operand |
arguments |
any |
variadic |
Runtime subject arguments. |
| Attribute |
callee |
symbol (callable, kernel, command_program, pipeline) |
required |
— |
| Attribute |
actual_count |
i64 |
optional |
Number of leading comparison-region arguments bound to target results. |
| Attribute |
oracle_callee |
symbol (callable, kernel, command_program, pipeline) |
optional |
Optional oracle subject; omission uses the target subject through the oracle profile. |
| Region |
comparison |
region |
required |
Explicit expectations over target and oracle result values. (single block, terminator check.return.) |
Examples
check.compare<@logarithm>(%bits) : (i32) -> [actual(%actual: f32), expected(%expected: f32)] {
check.expect.close actual(%actual) expected(%expected) atol(0.0) rtol(1.0e-6) nan(same) : f32
}
check.compare<@logarithm, @logarithm_oracle>(%bits) : (i32) -> [actual(%actual: f32), expected(%expected: f32)] {
check.expect.close actual(%actual) expected(%expected) atol(0.0) rtol(1.0e-6) nan(same) : f32
}
check.compare<@update>(%storage) : (tensor<256xf32>) -> () {
check.expect.bitwise actual(%storage) expected(%storage) : tensor<256xf32>
}