vyre-conform 0.1.0

Conformance suite for vyre backends — proves byte-identical output to CPU reference
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::properties::tests::{pair, primitive, result_u32, unary};
use crate::spec::law::AlgebraicLaw;

#[inline]
pub fn verify_commutative(spec: &crate::spec::types::OpSpec) {
    for a in SAMPLE {
        for b in SAMPLE {
            let lhs = call_u32(spec, &pair(a, b));
            let rhs = call_u32(spec, &pair(b, a));
            assert_eq!(lhs, rhs, "{} violates Commutative at ({a}, {b})", spec.id);
        }
    }
}