Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions audit_configs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import sys
from pathlib import Path

sys.path.insert(0, "hlsfactory")
from hlsfactory.design_config import read_design_config, DesignConfigError

base = Path("hlsfactory/hls_dataset_sources")

print("=" * 70)
print("HLSFactory Design Config Audit")
print("=" * 70)

for dataset_dir in sorted(base.iterdir()):
if not dataset_dir.is_dir():
continue
dataset_name = dataset_dir.name

designs = [d for d in dataset_dir.iterdir() if d.is_dir()]

with_toml = []
without_toml = []
errors = []

for design in sorted(designs):
toml_path = design / "hlsfactory.toml"
if toml_path.exists():
with_toml.append(design.name)
try:
config = read_design_config(toml_path)
except DesignConfigError as e:
errors.append((design.name, str(e)))
except Exception as e:
errors.append((design.name, f"Unexpected error: {e}"))
else:
without_toml.append(design.name)

if with_toml or without_toml:
print(f"\n{dataset_name}")
print(f" Designs WITH hlsfactory.toml: {len(with_toml)}")
print(f" Designs WITHOUT hlsfactory.toml: {len(without_toml)}")
if errors:
print(f" VALIDATION ERRORS: {len(errors)}")
for name, err in errors:
print(f" - {name}: {err}")
if without_toml and len(without_toml) <= 25:
print(f" Missing in: {', '.join(without_toml)}")

print("\n" + "=" * 70)
print("Done.")
print("=" * 70)
32 changes: 32 additions & 0 deletions generate_polybench_tomls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from pathlib import Path

base = Path("hlsfactory/hls_dataset_sources/polybench")

designs = ["bicg", "gemm", "gesummv", "k2mm", "k3mm", "mvt", "syr2k", "syrk"]

template = """design_name = "{name}"
dataset_name = "polybench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSCosimSetupFlow"
cosim_setup_tcl = "dataset_hls_cosim_setup.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
"""

for design_name in designs:
design_dir = base / design_name
if not design_dir.exists():
print(f"SKIP (folder not found): {design_name}")
continue
toml_path = design_dir / "hlsfactory.toml"
toml_path.write_text(template.format(name=design_name))
print(f"Created: {toml_path}")

print("\nDone!")
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
design_name = "DGNN_Booster_convLSTM"
dataset_name = "accelerators"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "Llama_GPT_module"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "activation_module"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "activation_op1"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "activation_op2"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "activation_op3"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "attention_op_p1"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "attention_op_p2"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "attention_op_p3"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "attn_breakdown_module"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "attn_breakdown_op1"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "attn_breakdown_op2"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
10 changes: 10 additions & 0 deletions hlsfactory/hls_dataset_sources/forgebench/conv_A/hlsfactory.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "conv_A"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
10 changes: 10 additions & 0 deletions hlsfactory/hls_dataset_sources/forgebench/conv_B/hlsfactory.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "conv_B"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
10 changes: 10 additions & 0 deletions hlsfactory/hls_dataset_sources/forgebench/conv_C/hlsfactory.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "conv_C"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "conv_block_module"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "conv_block_op1"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "conv_block_op2"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "conv_block_op3"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "conv_module"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "diff_dims_module_large"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "diff_dims_module_small"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "diff_dims_p1"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "diff_dims_p2"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "diff_dims_p3"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "diff_orders_module"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "diff_orders_p1"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
design_name = "diff_orders_p2"
dataset_name = "forgebench"

[[flow_configs]]
flow_name = "VitisHLSSynthFlow"
synth_tcl = "dataset_hls.tcl"

[[flow_configs]]
flow_name = "VitisHLSImplFlow"
impl_tcl = "dataset_hls_ip_export.tcl"
Loading