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/CUDApp/blob/main/evidence/amd-speed-20261114/raw/amd-launch-gap/card/final/logs/gap-hip.py # 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 Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / evidence / amd-speed-20261114 / raw / amd-launch-gap / card / final / logs / gap-hip.py` 26 lines · 1841 bytes Raw Blame History 1 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 """Instrument (not Omega): the published HIP graph arm, lighthouse-oracle.py mode `graph`, keeping the 3 per-step decode times and all 256 ids instead of only the median. Same driver, Card, kernels and timer: 4 real2 Card.forward begins perf_counter before hipGraphLaunch and stops after hipStreamSynchronize; host 5 readback of logits and the token id happen after the timer stops. 6 Usage: gap-hip.py DRIVER WEIGHTS FIXTURE OUT.json CAPACITY""" 7 import hashlib,importlib.util,json,os,sys 8 from pathlib import Path 9 10 driver,weights,fixture_path,out,cap=Path(sys.argv[1]),Path(sys.argv[2]),Path(sys.argv[3]),Path(sys.argv[4]),int(sys.argv[5]) 11 fixture=json.loads(fixture_path.read_bytes()) 12 P,G=fixture['prompt_ids'],fixture['generated_ids'] 13 os.environ['AMDSERVE_WEIGHTS']=str(weights);os.environ['AMDSERVE_OUTPUT']=str(out)+'.log' 14 spec=importlib.util.spec_from_file_location('real2driver',driver);drv=importlib.util.module_from_spec(spec);spec.loader.exec_module(drv) 15 drv.GOLD=dict(drv.GOLD,prompt_ids=list(P),generated_ids=list(G),top5=[[(0,0.0)]]*len(G)) 16 drv.top5_difference=lambda logits,expected:None 17 if cap