interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / evidence / amd-qwen38-native-final-20261113 / oracle / coding24-check.py

20 lines · 1542 bytes Raw Blame History
1# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2
3from pathlib import Path
4import json,subprocess,re,runpy,hashlib,traceback
5D=Path(__file__).resolve().parent;S=D/'source'
6g=runpy.run_path(str(D/'driver-real2.py'),run_name='gold-import')['GOLD']
7r={'phase':'running','binary_sha256':hashlib.sha256((S/'omega-launch').read_bytes()).hexdigest(),'expected':g['generated_ids'],'rows':[]}
8try:
9 for label,name,match in [('coding24-control','real2-controls.plan',False),('coding24','real2.plan',True)]:
10 m=json.loads((S/(name+'.json')).read_text())
11 args=[str(S/'omega-launch'),'plan',str(S/name)]+[str(S/'code'/(n+'.hsaco')) for n in sorted(m['code_objects'])]+[str(Path('/tmp/qwen3.8-27b-fp8')/n) for n in m['files']]
12 p=subprocess.run(args,capture_output=True,timeout=120)
13 (D/(label+'.stdout')).write_bytes(p.stdout);(D/(label+'.stderr')).write_bytes(p.stderr)
14 z=re.search(rb'^OMEGA_PLAN ids=\[([\d, ]+)\]$',p.stdout,re.M);ids=list(map(int,z.group(1).split(b','))) if z else []
15 steps=re.findall(rb'^OMEGA_STEP (\d+) tok=(\d+) us=(\d+)$',p.stdout,re.M)
16 row=dict(label=label,exit=p.returncode,ids=ids,all_ids_equal=ids==g['generated_ids'],steps=len(steps),plan_sha256=hashlib.sha256((S/name).read_bytes()).hexdigest());r['rows'].append(row)
17 assert p.returncode==0 and len(steps)==47 and len(ids)==24 and row['all_ids_equal']==match,row
18 r['phase']='complete'
19except BaseException:r.update(phase='exception',detail=traceback.format_exc())
20(D/'coding24.json').write_text(json.dumps(r,indent=2));print(json.dumps(r),flush=True)