Skip to content

Commit

Permalink
hot fix for HALIDE_GEN_ARGS adding to design_meta.json
Browse files Browse the repository at this point in the history
  • Loading branch information
yuchen-mei committed Sep 26, 2024
1 parent 997482d commit 096d035
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions apps/hardware_benchmarks/hw_support/parse_design_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,11 @@ def main():
if os.getenv("NUM_GLB_TILING") is not None and atoi(os.getenv("NUM_GLB_TILING")) > 0: parseLoopExtentforTiling(meta, halide_gen_args)

if os.path.isfile("bin/glb_bank_config.json"): addGLBBankConfig(meta)
if "trunc_size" in halide_gen_args and meta.get("HALIDE_GEN_ARGS") is None:
args = halide_gen_args.split()
args_dict = {key: int(value) for key, value in (item.split('=') for item in halide_gen_args.split())}
meta["HALIDE_GEN_ARGS"] = args_dict
if halide_gen_args is not None:
if "trunc_size" in halide_gen_args and meta.get("HALIDE_GEN_ARGS") is None:
args = halide_gen_args.split()
args_dict = {key: int(value) for key, value in (item.split('=') for item in halide_gen_args.split())}
meta["HALIDE_GEN_ARGS"] = args_dict

# pprint.pprint(meta, fileout, indent=2, compact=True)
print("writing to", outputName)
Expand Down

0 comments on commit 096d035

Please sign in to comment.