interplane.Get Omega
Read in your language

omega-bridge

Omega-first language interoperability: checked conversion backends and native language bindings

Brought by drakestapleton

branch main Branches Tags History

omega-bridge / conformance / gen_fixtures.py

12 lines · 650 bytes Raw Blame History
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."""
4import argparse, json, os, sys
5sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
6import oracle
7ap = argparse.ArgumentParser(); ap.add_argument("--out", default="build/fixtures"); a = ap.parse_args()
8os.makedirs(a.out, exist_ok=True)
9for 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"])