Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/openaccel-lab/blob/main/bin/oal-gen # openaccel-lab aien-dev/openaccel-lab Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `openaccel-lab / bin / oal-gen` 21 lines ยท 907 bytes Raw Blame History 1 #!/usr/bin/env python3 2 # SPDX-License-Identifier: Apache-2.0 3 # oal-gen WORKLOAD [--seed S] [--set k=v ...] > case.bin 4 # Write one case container (docs/CONTAINER.md) for WORKLOAD to stdout. Exit 0, or 2 on a usage error. 5 # INTERIM host glue (Python). Successor: oal-gen in seeded Omega. 6 import os 7 import sys 8 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) 9 import argparse 10 from oal import manifest, matrix 11 12 ap = argparse.ArgumentParser(prog="oal-gen") 13 ap.add_argument("workload") 14 ap.add_argument("--seed", type=int, default=1) 15 ap.add_argument("--set", action="append", default=[], metavar="K=V") 16 a = ap.parse_args() 17 m = manifest.load(a.workload) 18 over = dict(kv.split("=", 1) for kv in a.set) 19 params, _, blob = matrix.make_case(m, over, a.seed) 20 sys.stderr.write("oal-gen %s seed %d params %s bytes %d\n" % (a.workload, a.seed, params, len(blob))) 21 sys.stdout.buffer.write(blob)