omega-bridge
Omega-first language interoperability: checked conversion backends and native language bindings
Brought by drakestapleton
omega-bridge / conformance / gen_fixtures.py
| 1 | #!/usr/bin/env python3 |
| 2 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 3 | """Write the frozen deterministic fixtures used by both runners.""" |
| 4 | import argparse, json, os, sys |
| 5 | sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) |
| 6 | import oracle |
| 7 | ap = argparse.ArgumentParser(); ap.add_argument("--out", default="build/fixtures"); a = ap.parse_args() |
| 8 | os.makedirs(a.out, exist_ok=True) |
| 9 | for name, fx in (("matmul-v1", oracle.make_matmul_fixture()), ("gqa-causal-v1", oracle.make_attention_fixture())): |
| 10 | p = os.path.join(a.out, name + ".json") |
| 11 | with open(p, "wb") as f: f.write(oracle.fixture_bytes(fx)) |
| 12 | print(p, fx["input_sha256"]) |