siliconcompiler 0.32.3__py3-none-any.whl → 0.33.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- siliconcompiler/__init__.py +19 -2
- siliconcompiler/_common.py +5 -0
- siliconcompiler/_metadata.py +1 -1
- siliconcompiler/apps/sc.py +2 -2
- siliconcompiler/apps/sc_install.py +10 -3
- siliconcompiler/apps/sc_issue.py +1 -1
- siliconcompiler/apps/sc_remote.py +10 -5
- siliconcompiler/apps/sc_show.py +2 -2
- siliconcompiler/apps/utils/replay.py +5 -3
- siliconcompiler/asic.py +120 -0
- siliconcompiler/checklist.py +150 -0
- siliconcompiler/core.py +299 -299
- siliconcompiler/flowgraph.py +803 -515
- siliconcompiler/fpga.py +84 -0
- siliconcompiler/metric.py +479 -0
- siliconcompiler/optimizer/vizier.py +2 -3
- siliconcompiler/package/__init__.py +29 -6
- siliconcompiler/pdk.py +415 -0
- siliconcompiler/record.py +453 -0
- siliconcompiler/remote/client.py +15 -5
- siliconcompiler/remote/schema.py +116 -112
- siliconcompiler/remote/server.py +9 -6
- siliconcompiler/report/dashboard/cli/__init__.py +14 -721
- siliconcompiler/report/dashboard/cli/board.py +899 -0
- siliconcompiler/report/dashboard/web/__init__.py +10 -10
- siliconcompiler/report/dashboard/web/components/__init__.py +5 -4
- siliconcompiler/report/dashboard/web/components/flowgraph.py +3 -3
- siliconcompiler/report/dashboard/web/components/graph.py +6 -3
- siliconcompiler/report/dashboard/web/state.py +1 -1
- siliconcompiler/report/dashboard/web/utils/__init__.py +4 -3
- siliconcompiler/report/html_report.py +2 -3
- siliconcompiler/report/report.py +22 -11
- siliconcompiler/report/summary_image.py +1 -1
- siliconcompiler/report/summary_table.py +3 -3
- siliconcompiler/report/utils.py +21 -14
- siliconcompiler/scheduler/__init__.py +234 -1206
- siliconcompiler/scheduler/run_node.py +2 -1
- siliconcompiler/scheduler/send_messages.py +11 -5
- siliconcompiler/scheduler/slurm.py +11 -44
- siliconcompiler/scheduler/taskscheduler.py +320 -0
- siliconcompiler/schema/__init__.py +19 -2
- siliconcompiler/schema/baseschema.py +493 -0
- siliconcompiler/schema/cmdlineschema.py +250 -0
- siliconcompiler/{sphinx_ext → schema/docs}/__init__.py +3 -1
- siliconcompiler/{sphinx_ext → schema/docs}/dynamicgen.py +63 -81
- siliconcompiler/{sphinx_ext → schema/docs}/schemagen.py +73 -85
- siliconcompiler/{sphinx_ext → schema/docs}/utils.py +12 -13
- siliconcompiler/schema/editableschema.py +136 -0
- siliconcompiler/schema/journalingschema.py +238 -0
- siliconcompiler/schema/namedschema.py +41 -0
- siliconcompiler/schema/packageschema.py +101 -0
- siliconcompiler/schema/parameter.py +791 -0
- siliconcompiler/schema/parametertype.py +323 -0
- siliconcompiler/schema/parametervalue.py +736 -0
- siliconcompiler/schema/safeschema.py +37 -0
- siliconcompiler/schema/schema_cfg.py +109 -1789
- siliconcompiler/schema/utils.py +5 -68
- siliconcompiler/schema_obj.py +119 -0
- siliconcompiler/tool.py +1416 -0
- siliconcompiler/tools/_common/__init__.py +6 -10
- siliconcompiler/tools/_common/asic.py +5 -5
- siliconcompiler/tools/_common/sdc/sc_constraints.sdc +1 -1
- siliconcompiler/tools/bluespec/convert.py +9 -8
- siliconcompiler/tools/builtin/_common.py +9 -2
- siliconcompiler/tools/builtin/concatenate.py +7 -3
- siliconcompiler/tools/builtin/minimum.py +7 -2
- siliconcompiler/tools/builtin/mux.py +8 -2
- siliconcompiler/tools/builtin/nop.py +7 -2
- siliconcompiler/tools/builtin/verify.py +11 -5
- siliconcompiler/tools/chisel/convert.py +10 -10
- siliconcompiler/tools/genfasm/bitstream.py +3 -3
- siliconcompiler/tools/ghdl/convert.py +1 -1
- siliconcompiler/tools/icarus/compile.py +4 -4
- siliconcompiler/tools/icepack/bitstream.py +6 -1
- siliconcompiler/tools/klayout/convert_drc_db.py +5 -0
- siliconcompiler/tools/klayout/drc.py +2 -2
- siliconcompiler/tools/klayout/klayout_export.py +0 -1
- siliconcompiler/tools/klayout/klayout_show.py +6 -6
- siliconcompiler/tools/klayout/klayout_utils.py +15 -22
- siliconcompiler/tools/netgen/count_lvs.py +2 -2
- siliconcompiler/tools/netgen/lvs.py +1 -1
- siliconcompiler/tools/nextpnr/apr.py +6 -1
- siliconcompiler/tools/nextpnr/nextpnr.py +4 -4
- siliconcompiler/tools/openroad/_apr.py +15 -2
- siliconcompiler/tools/openroad/rdlroute.py +3 -3
- siliconcompiler/tools/openroad/scripts/apr/postamble.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/apr/preamble.tcl +5 -5
- siliconcompiler/tools/openroad/scripts/apr/sc_antenna_repair.tcl +2 -2
- siliconcompiler/tools/openroad/scripts/apr/sc_clock_tree_synthesis.tcl +2 -2
- siliconcompiler/tools/openroad/scripts/apr/sc_detailed_placement.tcl +2 -2
- siliconcompiler/tools/openroad/scripts/apr/sc_detailed_route.tcl +2 -2
- siliconcompiler/tools/openroad/scripts/apr/sc_endcap_tapcell_insertion.tcl +2 -2
- siliconcompiler/tools/openroad/scripts/apr/sc_fillercell_insertion.tcl +2 -2
- siliconcompiler/tools/openroad/scripts/apr/sc_fillmetal_insertion.tcl +2 -2
- siliconcompiler/tools/openroad/scripts/apr/sc_global_placement.tcl +2 -2
- siliconcompiler/tools/openroad/scripts/apr/sc_global_route.tcl +2 -2
- siliconcompiler/tools/openroad/scripts/apr/sc_init_floorplan.tcl +3 -9
- siliconcompiler/tools/openroad/scripts/apr/sc_macro_placement.tcl +3 -3
- siliconcompiler/tools/openroad/scripts/apr/sc_metrics.tcl +2 -2
- siliconcompiler/tools/openroad/scripts/apr/sc_pin_placement.tcl +2 -2
- siliconcompiler/tools/openroad/scripts/apr/sc_power_grid.tcl +2 -2
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_design.tcl +2 -2
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_timing.tcl +2 -2
- siliconcompiler/tools/openroad/scripts/apr/sc_write_data.tcl +2 -2
- siliconcompiler/tools/openroad/scripts/common/procs.tcl +75 -1
- siliconcompiler/tools/openroad/scripts/common/read_input_files.tcl +1 -7
- siliconcompiler/tools/openroad/scripts/common/screenshot.tcl +2 -2
- siliconcompiler/tools/openroad/scripts/common/write_images.tcl +28 -3
- siliconcompiler/tools/openroad/scripts/sc_rcx.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/sc_rdlroute.tcl +3 -3
- siliconcompiler/tools/openroad/scripts/sc_show.tcl +6 -6
- siliconcompiler/tools/opensta/scripts/sc_timing.tcl +10 -0
- siliconcompiler/tools/opensta/timing.py +11 -0
- siliconcompiler/tools/slang/__init__.py +13 -13
- siliconcompiler/tools/slang/elaborate.py +6 -6
- siliconcompiler/tools/slang/lint.py +1 -3
- siliconcompiler/tools/surelog/parse.py +4 -4
- siliconcompiler/tools/sv2v/convert.py +20 -3
- siliconcompiler/tools/verilator/compile.py +2 -2
- siliconcompiler/tools/verilator/verilator.py +3 -3
- siliconcompiler/tools/vpr/_xml_constraint.py +8 -8
- siliconcompiler/tools/vpr/place.py +1 -1
- siliconcompiler/tools/vpr/route.py +4 -4
- siliconcompiler/tools/vpr/screenshot.py +1 -1
- siliconcompiler/tools/vpr/show.py +5 -5
- siliconcompiler/tools/vpr/vpr.py +24 -24
- siliconcompiler/tools/xdm/convert.py +2 -2
- siliconcompiler/tools/xyce/simulate.py +1 -1
- siliconcompiler/tools/yosys/prepareLib.py +2 -2
- siliconcompiler/tools/yosys/sc_synth_asic.tcl +111 -63
- siliconcompiler/tools/yosys/screenshot.py +1 -1
- siliconcompiler/tools/yosys/syn_asic.py +7 -7
- siliconcompiler/toolscripts/_tools.json +12 -10
- siliconcompiler/toolscripts/rhel8/install-chisel.sh +9 -2
- siliconcompiler/toolscripts/rhel8/install-icarus.sh +10 -3
- siliconcompiler/toolscripts/rhel8/install-klayout.sh +8 -1
- siliconcompiler/toolscripts/rhel8/install-magic.sh +9 -2
- siliconcompiler/toolscripts/rhel8/install-montage.sh +1 -1
- siliconcompiler/toolscripts/rhel8/install-netgen.sh +9 -2
- siliconcompiler/toolscripts/rhel8/install-slang.sh +11 -4
- siliconcompiler/toolscripts/rhel8/install-surelog.sh +9 -2
- siliconcompiler/toolscripts/rhel8/install-sv2v.sh +11 -4
- siliconcompiler/toolscripts/rhel8/install-verible.sh +11 -3
- siliconcompiler/toolscripts/rhel8/install-verilator.sh +10 -3
- siliconcompiler/toolscripts/rhel8/install-xyce.sh +15 -10
- siliconcompiler/toolscripts/rhel9/install-chisel.sh +9 -2
- siliconcompiler/toolscripts/rhel9/install-ghdl.sh +9 -2
- siliconcompiler/toolscripts/rhel9/install-gtkwave.sh +10 -3
- siliconcompiler/toolscripts/rhel9/install-icarus.sh +10 -3
- siliconcompiler/toolscripts/rhel9/install-klayout.sh +8 -1
- siliconcompiler/toolscripts/rhel9/install-magic.sh +9 -2
- siliconcompiler/toolscripts/rhel9/install-montage.sh +1 -1
- siliconcompiler/toolscripts/rhel9/install-netgen.sh +9 -2
- siliconcompiler/toolscripts/rhel9/install-openroad.sh +16 -3
- siliconcompiler/toolscripts/rhel9/install-opensta.sh +17 -5
- siliconcompiler/toolscripts/rhel9/install-slang.sh +11 -4
- siliconcompiler/toolscripts/rhel9/install-surelog.sh +9 -2
- siliconcompiler/toolscripts/rhel9/install-sv2v.sh +11 -4
- siliconcompiler/toolscripts/rhel9/install-verible.sh +11 -3
- siliconcompiler/toolscripts/rhel9/install-verilator.sh +10 -3
- siliconcompiler/toolscripts/rhel9/install-vpr.sh +9 -2
- siliconcompiler/toolscripts/rhel9/install-xdm.sh +10 -2
- siliconcompiler/toolscripts/rhel9/install-xyce.sh +15 -10
- siliconcompiler/toolscripts/rhel9/install-yosys-moosic.sh +9 -2
- siliconcompiler/toolscripts/rhel9/install-yosys-parmys.sh +10 -3
- siliconcompiler/toolscripts/rhel9/install-yosys-slang.sh +10 -2
- siliconcompiler/toolscripts/rhel9/install-yosys.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-bambu.sh +10 -2
- siliconcompiler/toolscripts/ubuntu20/install-bluespec.sh +10 -3
- siliconcompiler/toolscripts/ubuntu20/install-chisel.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-ghdl.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-gtkwave.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-icarus.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-icepack.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-klayout.sh +8 -1
- siliconcompiler/toolscripts/ubuntu20/install-magic.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-montage.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-netgen.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-nextpnr.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-openroad.sh +16 -3
- siliconcompiler/toolscripts/ubuntu20/install-opensta.sh +16 -5
- siliconcompiler/toolscripts/ubuntu20/install-slang.sh +11 -4
- siliconcompiler/toolscripts/ubuntu20/install-slurm.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-surelog.sh +10 -2
- siliconcompiler/toolscripts/ubuntu20/install-sv2v.sh +11 -4
- siliconcompiler/toolscripts/ubuntu20/install-verible.sh +11 -3
- siliconcompiler/toolscripts/ubuntu20/install-verilator.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-xdm.sh +10 -2
- siliconcompiler/toolscripts/ubuntu20/install-xyce.sh +13 -8
- siliconcompiler/toolscripts/ubuntu20/install-yosys-moosic.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-yosys.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-bambu.sh +10 -2
- siliconcompiler/toolscripts/ubuntu22/install-bluespec.sh +10 -3
- siliconcompiler/toolscripts/ubuntu22/install-chisel.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-ghdl.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-gtkwave.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-icarus.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-icepack.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-klayout.sh +8 -1
- siliconcompiler/toolscripts/ubuntu22/install-magic.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-montage.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-netgen.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-nextpnr.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-openroad.sh +16 -3
- siliconcompiler/toolscripts/ubuntu22/install-opensta.sh +17 -5
- siliconcompiler/toolscripts/ubuntu22/install-slang.sh +11 -4
- siliconcompiler/toolscripts/ubuntu22/install-slurm.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-surelog.sh +10 -2
- siliconcompiler/toolscripts/ubuntu22/install-sv2v.sh +11 -4
- siliconcompiler/toolscripts/ubuntu22/install-verible.sh +11 -3
- siliconcompiler/toolscripts/ubuntu22/install-verilator.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-vpr.sh +9 -4
- siliconcompiler/toolscripts/ubuntu22/install-xdm.sh +10 -2
- siliconcompiler/toolscripts/ubuntu22/install-xyce.sh +13 -8
- siliconcompiler/toolscripts/ubuntu22/install-yosys-moosic.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-yosys-parmys.sh +10 -3
- siliconcompiler/toolscripts/ubuntu22/install-yosys-slang.sh +10 -2
- siliconcompiler/toolscripts/ubuntu22/install-yosys.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-bambu.sh +12 -4
- siliconcompiler/toolscripts/ubuntu24/install-bluespec.sh +10 -3
- siliconcompiler/toolscripts/ubuntu24/install-chisel.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-ghdl.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-gtkwave.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-icarus.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-icepack.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-klayout.sh +8 -1
- siliconcompiler/toolscripts/ubuntu24/install-magic.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-montage.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-netgen.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-nextpnr.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-openroad.sh +16 -3
- siliconcompiler/toolscripts/ubuntu24/install-opensta.sh +17 -5
- siliconcompiler/toolscripts/ubuntu24/install-slang.sh +11 -4
- siliconcompiler/toolscripts/ubuntu24/install-slurm.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-surelog.sh +10 -2
- siliconcompiler/toolscripts/ubuntu24/install-sv2v.sh +11 -4
- siliconcompiler/toolscripts/ubuntu24/install-verible.sh +11 -3
- siliconcompiler/toolscripts/ubuntu24/install-verilator.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-vpr.sh +9 -4
- siliconcompiler/toolscripts/ubuntu24/install-xdm.sh +10 -2
- siliconcompiler/toolscripts/ubuntu24/install-xyce.sh +13 -8
- siliconcompiler/toolscripts/ubuntu24/install-yosys-moosic.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-yosys-parmys.sh +10 -3
- siliconcompiler/toolscripts/ubuntu24/install-yosys-slang.sh +10 -2
- siliconcompiler/toolscripts/ubuntu24/install-yosys.sh +9 -2
- siliconcompiler/utils/__init__.py +19 -112
- siliconcompiler/utils/flowgraph.py +244 -0
- siliconcompiler/{issue.py → utils/issue.py} +18 -25
- siliconcompiler/utils/logging.py +3 -4
- {siliconcompiler-0.32.3.dist-info → siliconcompiler-0.33.1.dist-info}/METADATA +9 -8
- siliconcompiler-0.33.1.dist-info/RECORD +488 -0
- {siliconcompiler-0.32.3.dist-info → siliconcompiler-0.33.1.dist-info}/WHEEL +1 -1
- {siliconcompiler-0.32.3.dist-info → siliconcompiler-0.33.1.dist-info}/entry_points.txt +8 -8
- siliconcompiler/schema/schema_obj.py +0 -1936
- siliconcompiler/toolscripts/ubuntu20/install-vpr.sh +0 -29
- siliconcompiler/toolscripts/ubuntu20/install-yosys-parmys.sh +0 -61
- siliconcompiler-0.32.3.dist-info/RECORD +0 -470
- /siliconcompiler/{templates → data/templates}/__init__.py +0 -0
- /siliconcompiler/{templates → data/templates}/email/__init__.py +0 -0
- /siliconcompiler/{templates → data/templates}/email/general.j2 +0 -0
- /siliconcompiler/{templates → data/templates}/email/summary.j2 +0 -0
- /siliconcompiler/{templates → data/templates}/issue/README.txt +0 -0
- /siliconcompiler/{templates → data/templates}/issue/__init__.py +0 -0
- /siliconcompiler/{templates → data/templates}/issue/run.sh +0 -0
- /siliconcompiler/{templates → data/templates}/replay/replay.py.j2 +0 -0
- /siliconcompiler/{templates → data/templates}/replay/replay.sh.j2 +0 -0
- /siliconcompiler/{templates → data/templates}/replay/requirements.txt +0 -0
- /siliconcompiler/{templates → data/templates}/replay/setup.sh +0 -0
- /siliconcompiler/{templates → data/templates}/report/__init__.py +0 -0
- /siliconcompiler/{templates → data/templates}/report/bootstrap.min.css +0 -0
- /siliconcompiler/{templates → data/templates}/report/bootstrap.min.js +0 -0
- /siliconcompiler/{templates → data/templates}/report/bootstrap_LICENSE.md +0 -0
- /siliconcompiler/{templates → data/templates}/report/sc_report.j2 +0 -0
- /siliconcompiler/{templates → data/templates}/slurm/__init__.py +0 -0
- /siliconcompiler/{templates → data/templates}/slurm/run.sh +0 -0
- /siliconcompiler/{templates → data/templates}/tcl/__init__.py +0 -0
- /siliconcompiler/{templates → data/templates}/tcl/manifest.tcl.j2 +0 -0
- /siliconcompiler/{units.py → utils/units.py} +0 -0
- {siliconcompiler-0.32.3.dist-info → siliconcompiler-0.33.1.dist-info}/licenses/LICENSE +0 -0
- {siliconcompiler-0.32.3.dist-info → siliconcompiler-0.33.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import math
|
|
3
|
+
from siliconcompiler import NodeStatus
|
|
4
|
+
from siliconcompiler.tools._common import input_file_node_name, get_tool_task
|
|
5
|
+
|
|
6
|
+
from siliconcompiler.flowgraph import RuntimeFlowgraph
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
###########################################################################
|
|
10
|
+
def _check_flowgraph_io(chip, nodes=None):
|
|
11
|
+
'''Check if flowgraph is valid in terms of input and output files.
|
|
12
|
+
|
|
13
|
+
Returns True if valid, False otherwise.
|
|
14
|
+
'''
|
|
15
|
+
flow = chip.get('option', 'flow')
|
|
16
|
+
|
|
17
|
+
runtime_full = RuntimeFlowgraph(
|
|
18
|
+
chip.schema.get("flowgraph", flow, field='schema'),
|
|
19
|
+
to_steps=chip.get('option', 'to'),
|
|
20
|
+
prune_nodes=chip.get('option', 'prune'))
|
|
21
|
+
runtime_flow = RuntimeFlowgraph(
|
|
22
|
+
chip.schema.get("flowgraph", flow, field='schema'),
|
|
23
|
+
args=(chip.get('arg', 'step'), chip.get('arg', 'index')),
|
|
24
|
+
from_steps=chip.get('option', 'from'),
|
|
25
|
+
to_steps=chip.get('option', 'to'),
|
|
26
|
+
prune_nodes=chip.get('option', 'prune'))
|
|
27
|
+
record = chip.schema.get("record", field='schema')
|
|
28
|
+
|
|
29
|
+
if not nodes:
|
|
30
|
+
nodes = runtime_flow.get_nodes()
|
|
31
|
+
for (step, index) in nodes:
|
|
32
|
+
# For each task, check input requirements.
|
|
33
|
+
tool, task = get_tool_task(chip, step, index, flow=flow)
|
|
34
|
+
|
|
35
|
+
if tool == 'builtin':
|
|
36
|
+
# We can skip builtins since they don't have any particular
|
|
37
|
+
# input requirements -- they just pass through what they
|
|
38
|
+
# receive.
|
|
39
|
+
continue
|
|
40
|
+
|
|
41
|
+
# Get files we receive from input nodes.
|
|
42
|
+
in_nodes = runtime_full.get_node_inputs(step, index, record=record)
|
|
43
|
+
all_inputs = set()
|
|
44
|
+
requirements = chip.get('tool', tool, 'task', task, 'input', step=step, index=index)
|
|
45
|
+
for in_step, in_index in in_nodes:
|
|
46
|
+
if (in_step, in_index) not in nodes:
|
|
47
|
+
# If we're not running the input step, the required
|
|
48
|
+
# inputs need to already be copied into the build
|
|
49
|
+
# directory.
|
|
50
|
+
workdir = chip.getworkdir(step=in_step, index=in_index)
|
|
51
|
+
in_step_out_dir = os.path.join(workdir, 'outputs')
|
|
52
|
+
|
|
53
|
+
if not os.path.isdir(in_step_out_dir):
|
|
54
|
+
# This means this step hasn't been run, but that
|
|
55
|
+
# will be flagged by a different check. No error
|
|
56
|
+
# message here since it would be redundant.
|
|
57
|
+
inputs = []
|
|
58
|
+
continue
|
|
59
|
+
|
|
60
|
+
design = chip.get('design')
|
|
61
|
+
manifest = f'{design}.pkg.json'
|
|
62
|
+
inputs = [inp for inp in os.listdir(in_step_out_dir) if inp != manifest]
|
|
63
|
+
else:
|
|
64
|
+
in_tool, _ = get_tool_task(chip, in_step, in_index, flow=flow)
|
|
65
|
+
task_class = chip.get("tool", in_tool, field="schema")
|
|
66
|
+
task_class.set_runtime(chip, step=in_step, index=in_index)
|
|
67
|
+
|
|
68
|
+
inputs = task_class.get_output_files()
|
|
69
|
+
|
|
70
|
+
for inp in inputs:
|
|
71
|
+
node_inp = input_file_node_name(inp, in_step, in_index)
|
|
72
|
+
if node_inp in requirements:
|
|
73
|
+
inp = node_inp
|
|
74
|
+
if inp in all_inputs:
|
|
75
|
+
chip.logger.error(f'Invalid flow: {step}{index} '
|
|
76
|
+
f'receives {inp} from multiple input tasks')
|
|
77
|
+
return False
|
|
78
|
+
all_inputs.add(inp)
|
|
79
|
+
|
|
80
|
+
for requirement in requirements:
|
|
81
|
+
if requirement not in all_inputs:
|
|
82
|
+
chip.logger.error(f'Invalid flow: {step}{index} will '
|
|
83
|
+
f'not receive required input {requirement}.')
|
|
84
|
+
return False
|
|
85
|
+
|
|
86
|
+
return True
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def _get_flowgraph_information(chip, flow, io=True):
|
|
90
|
+
from siliconcompiler.scheduler import _setup_node
|
|
91
|
+
from siliconcompiler.tools._common import input_provides, input_file_node_name
|
|
92
|
+
|
|
93
|
+
# Save schema to avoid making permanent changes
|
|
94
|
+
org_schema = chip.schema
|
|
95
|
+
chip.schema = chip.schema.copy()
|
|
96
|
+
|
|
97
|
+
# Setup nodes
|
|
98
|
+
node_exec_order = chip.schema.get("flowgraph", flow, field="schema").get_execution_order()
|
|
99
|
+
if io:
|
|
100
|
+
# try:
|
|
101
|
+
for layer_nodes in node_exec_order:
|
|
102
|
+
for step, index in layer_nodes:
|
|
103
|
+
_setup_node(chip, step, index, flow=flow)
|
|
104
|
+
# except: # noqa E722
|
|
105
|
+
# io = False
|
|
106
|
+
|
|
107
|
+
node_rank = {}
|
|
108
|
+
for rank, rank_nodes in enumerate(node_exec_order):
|
|
109
|
+
for step, index in rank_nodes:
|
|
110
|
+
node_rank[f'{step}{index}'] = rank
|
|
111
|
+
|
|
112
|
+
graph_inputs = {}
|
|
113
|
+
all_graph_inputs = set()
|
|
114
|
+
if io:
|
|
115
|
+
for step, index in chip.schema.get("flowgraph", flow, field="schema").get_nodes():
|
|
116
|
+
tool, task = get_tool_task(chip, step, index, flow=flow)
|
|
117
|
+
for keypath in chip.get('tool', tool, 'task', task, 'require', step=step, index=index):
|
|
118
|
+
key = tuple(keypath.split(','))
|
|
119
|
+
if key[0] == 'input':
|
|
120
|
+
graph_inputs.setdefault((step, index), set()).add(keypath)
|
|
121
|
+
|
|
122
|
+
for inputs in graph_inputs.values():
|
|
123
|
+
all_graph_inputs.update(inputs)
|
|
124
|
+
|
|
125
|
+
exit_nodes = [f'{step}{index}' for step, index in chip.schema.get(
|
|
126
|
+
"flowgraph", flow, field="schema").get_exit_nodes()]
|
|
127
|
+
|
|
128
|
+
nodes = {}
|
|
129
|
+
edges = []
|
|
130
|
+
|
|
131
|
+
def clean_label(label):
|
|
132
|
+
return label.replace("<", "").replace(">", "")
|
|
133
|
+
|
|
134
|
+
def clean_text(label):
|
|
135
|
+
return label.replace("<", r"\<").replace(">", r"\>")
|
|
136
|
+
|
|
137
|
+
all_nodes = [(step, index) for step, index in sorted(
|
|
138
|
+
chip.schema.get("flowgraph", flow, field="schema").get_nodes())
|
|
139
|
+
if chip.get('record', 'status', step=step, index=index) != NodeStatus.SKIPPED]
|
|
140
|
+
|
|
141
|
+
runtime_flow = RuntimeFlowgraph(chip.schema.get("flowgraph", flow, field='schema'))
|
|
142
|
+
record = chip.schema.get("record", field='schema')
|
|
143
|
+
|
|
144
|
+
for step, index in all_nodes:
|
|
145
|
+
tool, task = get_tool_task(chip, step, index, flow=flow)
|
|
146
|
+
|
|
147
|
+
if io:
|
|
148
|
+
inputs = chip.get('tool', tool, 'task', task, 'input', step=step, index=index)
|
|
149
|
+
outputs = chip.get('tool', tool, 'task', task, 'output', step=step, index=index)
|
|
150
|
+
if chip.get('record', 'status', step=step, index=index) == NodeStatus.SKIPPED:
|
|
151
|
+
continue
|
|
152
|
+
else:
|
|
153
|
+
inputs = []
|
|
154
|
+
outputs = []
|
|
155
|
+
|
|
156
|
+
node = f'{step}{index}'
|
|
157
|
+
if io and (step, index) in graph_inputs:
|
|
158
|
+
inputs.extend(graph_inputs[(step, index)])
|
|
159
|
+
|
|
160
|
+
nodes[node] = {
|
|
161
|
+
"node": (step, index),
|
|
162
|
+
"file_inputs": inputs,
|
|
163
|
+
"inputs": {clean_text(f): f'input-{clean_label(f)}' for f in sorted(inputs)},
|
|
164
|
+
"outputs": {clean_text(f): f'output-{clean_label(f)}' for f in sorted(outputs)},
|
|
165
|
+
"task": f'{tool}/{task}' if tool != 'builtin' else task,
|
|
166
|
+
"is_input": node_rank[node] == 0,
|
|
167
|
+
"rank": node_rank[node]
|
|
168
|
+
}
|
|
169
|
+
nodes[node]["width"] = max(len(nodes[node]["inputs"]), len(nodes[node]["outputs"]))
|
|
170
|
+
|
|
171
|
+
if tool is None or task is None:
|
|
172
|
+
nodes[node]["task"] = None
|
|
173
|
+
|
|
174
|
+
rank_diff = {}
|
|
175
|
+
for in_step, in_index in runtime_flow.get_node_inputs(step, index, record=record):
|
|
176
|
+
rank_diff[f'{in_step}{in_index}'] = node_rank[node] - node_rank[f'{in_step}{in_index}']
|
|
177
|
+
nodes[node]["rank_diff"] = rank_diff
|
|
178
|
+
|
|
179
|
+
for step, index in all_nodes:
|
|
180
|
+
node = f'{step}{index}'
|
|
181
|
+
if io:
|
|
182
|
+
# get inputs
|
|
183
|
+
edge_stats = {}
|
|
184
|
+
for infile, in_nodes in input_provides(chip, step, index, flow=flow).items():
|
|
185
|
+
outfile = infile
|
|
186
|
+
for in_step, in_index in in_nodes:
|
|
187
|
+
infile = outfile
|
|
188
|
+
if infile not in nodes[node]["file_inputs"]:
|
|
189
|
+
infile = input_file_node_name(infile, in_step, in_index)
|
|
190
|
+
if infile not in nodes[node]["file_inputs"]:
|
|
191
|
+
continue
|
|
192
|
+
in_node_name = f"{in_step}{in_index}"
|
|
193
|
+
outlabel = f"{in_node_name}:output-{clean_label(outfile)}"
|
|
194
|
+
inlabel = f"{step}{index}:input-{clean_label(infile)}"
|
|
195
|
+
|
|
196
|
+
if in_node_name not in edge_stats:
|
|
197
|
+
edge_stats[in_node_name] = {
|
|
198
|
+
"count": 0,
|
|
199
|
+
"pairs": [],
|
|
200
|
+
"weight": min(nodes[node]["width"], nodes[in_node_name]["width"])
|
|
201
|
+
}
|
|
202
|
+
edge_stats[in_node_name]["count"] += 1
|
|
203
|
+
edge_stats[in_node_name]["pairs"].append((outlabel, inlabel))
|
|
204
|
+
|
|
205
|
+
# assign edge weights
|
|
206
|
+
|
|
207
|
+
# scale multiple weights
|
|
208
|
+
for edge_data in edge_stats.values():
|
|
209
|
+
edge_data["weight"] = int(
|
|
210
|
+
math.floor(max(1, edge_data["weight"] / edge_data["count"])))
|
|
211
|
+
|
|
212
|
+
# lower exit nodes weights
|
|
213
|
+
if node in exit_nodes:
|
|
214
|
+
for edge_data in edge_stats.values():
|
|
215
|
+
edge_data["weight"] = 1
|
|
216
|
+
else:
|
|
217
|
+
for edge_data in edge_stats.values():
|
|
218
|
+
edge_data["weight"] *= 2
|
|
219
|
+
|
|
220
|
+
# adjust for rank differences, lower weight if rankdiff is greater than 1
|
|
221
|
+
for in_node, edge_data in edge_stats.items():
|
|
222
|
+
if nodes[node]["rank_diff"][in_node] > 1:
|
|
223
|
+
edge_data["weight"] = 1
|
|
224
|
+
|
|
225
|
+
# create edges
|
|
226
|
+
for edge_data in edge_stats.values():
|
|
227
|
+
for outlabel, inlabel in edge_data["pairs"]:
|
|
228
|
+
edges.append([outlabel, inlabel, edge_data["weight"]])
|
|
229
|
+
|
|
230
|
+
if (step, index) in graph_inputs:
|
|
231
|
+
for key in graph_inputs[(step, index)]:
|
|
232
|
+
inlabel = f"{step}{index}:input-{clean_label(key)}"
|
|
233
|
+
edges.append((key, inlabel, 1))
|
|
234
|
+
else:
|
|
235
|
+
all_inputs = []
|
|
236
|
+
for in_step, in_index in chip.get('flowgraph', flow, step, index, 'input'):
|
|
237
|
+
all_inputs.append(f'{in_step}{in_index}')
|
|
238
|
+
for item in all_inputs:
|
|
239
|
+
edges.append((item, node, 1 if node in exit_nodes else 2))
|
|
240
|
+
|
|
241
|
+
# Restore schema
|
|
242
|
+
chip.schema = org_schema
|
|
243
|
+
|
|
244
|
+
return all_graph_inputs, nodes, edges, io
|
|
@@ -8,8 +8,8 @@ import time
|
|
|
8
8
|
import tempfile
|
|
9
9
|
from datetime import datetime
|
|
10
10
|
from siliconcompiler.utils import get_file_template
|
|
11
|
-
from siliconcompiler.scheduler import _makecmd, _write_task_manifest, _get_machine_info
|
|
12
11
|
from siliconcompiler.tools._common import get_tool_task
|
|
12
|
+
from siliconcompiler import RecordSchema
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
def generate_testcase(chip,
|
|
@@ -23,7 +23,6 @@ def generate_testcase(chip,
|
|
|
23
23
|
include_specific_libraries=None,
|
|
24
24
|
hash_files=False,
|
|
25
25
|
verbose_collect=True):
|
|
26
|
-
|
|
27
26
|
# Save original schema since it will be modified
|
|
28
27
|
schema_copy = chip.schema.copy()
|
|
29
28
|
|
|
@@ -42,7 +41,7 @@ def generate_testcase(chip,
|
|
|
42
41
|
sc_type = chip.get(*key, field='type')
|
|
43
42
|
if 'file' not in sc_type and 'dir' not in sc_type:
|
|
44
43
|
continue
|
|
45
|
-
for _, key_step, key_index in chip.schema.
|
|
44
|
+
for _, key_step, key_index in chip.schema.get(*key, field=None).getvalues():
|
|
46
45
|
chip.hash_files(*key,
|
|
47
46
|
check=False,
|
|
48
47
|
allow_cache=True,
|
|
@@ -152,38 +151,32 @@ def generate_testcase(chip,
|
|
|
152
151
|
current_work_dir = os.getcwd()
|
|
153
152
|
os.chdir(new_work_dir)
|
|
154
153
|
|
|
154
|
+
flow = chip.get('option', 'flow')
|
|
155
|
+
|
|
156
|
+
task_class = chip.get("tool", tool, field="schema")
|
|
157
|
+
|
|
158
|
+
task_class.set_runtime(chip, step=step, index=index)
|
|
159
|
+
|
|
155
160
|
# Rewrite replay.sh
|
|
156
161
|
prev_quiet = chip.get('option', 'quiet', step=step, index=index)
|
|
157
162
|
chip.set('option', 'quiet', True, step=step, index=index)
|
|
158
|
-
from siliconcompiler import SiliconCompilerError
|
|
159
163
|
try:
|
|
160
|
-
# Rerun
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
func = getattr(chip._get_task_module(step, index, flow=flow), 'pre_process', None)
|
|
164
|
-
if func:
|
|
165
|
-
try:
|
|
166
|
-
# Rerun pre_process
|
|
167
|
-
func(chip)
|
|
168
|
-
except Exception:
|
|
169
|
-
pass
|
|
170
|
-
except SiliconCompilerError:
|
|
164
|
+
# Rerun pre_process
|
|
165
|
+
task_class.pre_process()
|
|
166
|
+
except Exception:
|
|
171
167
|
pass
|
|
172
168
|
chip.set('option', 'quiet', prev_quiet, step=step, index=index)
|
|
173
169
|
|
|
174
|
-
|
|
175
|
-
is_python_tool = hasattr(chip._get_task_module(step, index, flow=flow), 'run')
|
|
170
|
+
is_python_tool = task_class.get_exe() is None
|
|
176
171
|
|
|
177
172
|
if not is_python_tool:
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
173
|
+
task_class.generate_replay_script(
|
|
174
|
+
f'{chip.getworkdir(step=step, index=index)}/replay.sh',
|
|
175
|
+
'.',
|
|
176
|
+
include_path=False)
|
|
182
177
|
|
|
183
178
|
# Rewrite tool manifest
|
|
184
|
-
|
|
185
|
-
chip.set('arg', 'index', index)
|
|
186
|
-
_write_task_manifest(chip, tool, path=new_work_dir)
|
|
179
|
+
task_class.write_task_manifest('.')
|
|
187
180
|
|
|
188
181
|
# Restore normal path behavior
|
|
189
182
|
chip._relative_path = None
|
|
@@ -224,7 +217,7 @@ def generate_testcase(chip,
|
|
|
224
217
|
issue_information['python'] = {"path": sys.path,
|
|
225
218
|
"version": sys.version}
|
|
226
219
|
issue_information['date'] = datetime.fromtimestamp(issue_time).strftime('%Y-%m-%d %H:%M:%S')
|
|
227
|
-
issue_information['machine'] =
|
|
220
|
+
issue_information['machine'] = RecordSchema.get_machine_information()
|
|
228
221
|
issue_information['run'] = {'step': step,
|
|
229
222
|
'index': index,
|
|
230
223
|
'libraries_included': include_libraries,
|
siliconcompiler/utils/logging.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
import sys
|
|
3
|
-
from siliconcompiler.flowgraph import _get_flowgraph_nodes
|
|
4
3
|
from siliconcompiler.remote import client
|
|
5
4
|
from siliconcompiler import utils
|
|
6
5
|
|
|
@@ -33,17 +32,17 @@ class SCLoggerFormatter(logging.Formatter):
|
|
|
33
32
|
class SCInRunLoggerFormatter(logging.Formatter):
|
|
34
33
|
def __init__(self, chip, jobname, step, index):
|
|
35
34
|
super().__init__(
|
|
36
|
-
SCInRunLoggerFormatter.
|
|
35
|
+
SCInRunLoggerFormatter.configure_format(
|
|
37
36
|
"| %(levelname)-8s | {} | {} | {} | %(message)s",
|
|
38
37
|
chip, step, index))
|
|
39
38
|
|
|
40
39
|
@staticmethod
|
|
41
|
-
def
|
|
40
|
+
def configure_format(fmt, chip, step, index):
|
|
42
41
|
max_width = 20
|
|
43
42
|
|
|
44
43
|
flow = chip.get('option', 'flow')
|
|
45
44
|
if flow:
|
|
46
|
-
nodes_to_run =
|
|
45
|
+
nodes_to_run = list(chip.schema.get("flowgraph", flow, field="schema").get_nodes())
|
|
47
46
|
else:
|
|
48
47
|
nodes_to_run = []
|
|
49
48
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: siliconcompiler
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.33.1
|
|
4
4
|
Summary: A compiler framework that automates translation from source code to silicon.
|
|
5
5
|
Author-email: Andreas Olofsson <andreas.d.olofsson@gmail.com>
|
|
6
6
|
License: Apache License 2.0
|
|
@@ -26,7 +26,7 @@ Requires-Python: >=3.8
|
|
|
26
26
|
Description-Content-Type: text/markdown
|
|
27
27
|
License-File: LICENSE
|
|
28
28
|
Requires-Dist: aiohttp==3.10.11; python_version <= "3.8"
|
|
29
|
-
Requires-Dist: aiohttp
|
|
29
|
+
Requires-Dist: aiohttp<3.12.0,>=3.10.11; python_version >= "3.9"
|
|
30
30
|
Requires-Dist: requests==2.32.3
|
|
31
31
|
Requires-Dist: PyYAML==6.0.2
|
|
32
32
|
Requires-Dist: pandas>=1.1.5
|
|
@@ -36,7 +36,7 @@ Requires-Dist: distro==1.9.0
|
|
|
36
36
|
Requires-Dist: packaging<25,>=21.3
|
|
37
37
|
Requires-Dist: psutil>=5.8.0
|
|
38
38
|
Requires-Dist: Pillow==10.4.0; python_version <= "3.8"
|
|
39
|
-
Requires-Dist: Pillow==11.1
|
|
39
|
+
Requires-Dist: Pillow==11.2.1; python_version >= "3.9"
|
|
40
40
|
Requires-Dist: GitPython==3.1.44
|
|
41
41
|
Requires-Dist: lambdapdk>=0.1.47
|
|
42
42
|
Requires-Dist: PyGithub==2.6.1
|
|
@@ -46,19 +46,20 @@ Requires-Dist: fastjsonschema==2.21.1
|
|
|
46
46
|
Requires-Dist: docker==7.1.0
|
|
47
47
|
Requires-Dist: importlib_metadata; python_version < "3.10"
|
|
48
48
|
Requires-Dist: orjson==3.10.15; python_version <= "3.8"
|
|
49
|
-
Requires-Dist: orjson==3.10.
|
|
49
|
+
Requires-Dist: orjson==3.10.18; python_version >= "3.9"
|
|
50
50
|
Requires-Dist: pyslang==8.0.0
|
|
51
51
|
Requires-Dist: streamlit==1.40.1; python_version <= "3.8"
|
|
52
|
-
Requires-Dist: streamlit==1.
|
|
52
|
+
Requires-Dist: streamlit==1.45.1; python_version >= "3.9" and python_full_version != "3.9.7"
|
|
53
53
|
Requires-Dist: streamlit_agraph==0.0.45; python_full_version != "3.9.7"
|
|
54
54
|
Requires-Dist: streamlit-antd-components==0.3.2; python_full_version != "3.9.7"
|
|
55
55
|
Requires-Dist: streamlit_javascript==0.1.5; python_full_version != "3.9.7"
|
|
56
56
|
Requires-Dist: streamlit-autorefresh==1.0.1; python_full_version != "3.9.7"
|
|
57
|
-
Requires-Dist: rich==13.9.4
|
|
57
|
+
Requires-Dist: rich==13.9.4; python_version <= "3.8"
|
|
58
|
+
Requires-Dist: rich<15.0.0,>=14.0.0; python_version >= "3.9"
|
|
58
59
|
Provides-Extra: test
|
|
59
60
|
Requires-Dist: pytest==8.3.5; extra == "test"
|
|
60
61
|
Requires-Dist: pytest-xdist==3.6.1; extra == "test"
|
|
61
|
-
Requires-Dist: pytest-timeout==2.
|
|
62
|
+
Requires-Dist: pytest-timeout==2.4.0; extra == "test"
|
|
62
63
|
Requires-Dist: pytest-asyncio==0.24.0; python_version <= "3.8" and extra == "test"
|
|
63
64
|
Requires-Dist: pytest-asyncio==0.26.0; python_version >= "3.9" and extra == "test"
|
|
64
65
|
Requires-Dist: pytest-cov==5.0.0; python_version <= "3.8" and extra == "test"
|
|
@@ -76,7 +77,7 @@ Requires-Dist: pip-licenses==5.0.0; extra == "docs"
|
|
|
76
77
|
Requires-Dist: pydata-sphinx-theme==0.16.1; extra == "docs"
|
|
77
78
|
Requires-Dist: sc-leflib>=0.2.0; extra == "docs"
|
|
78
79
|
Provides-Extra: profile
|
|
79
|
-
Requires-Dist: gprof2dot==
|
|
80
|
+
Requires-Dist: gprof2dot==2025.4.14; extra == "profile"
|
|
80
81
|
Provides-Extra: optimizer
|
|
81
82
|
Requires-Dist: google-vizier[jax]==0.1.21; python_version >= "3.10" and extra == "optimizer"
|
|
82
83
|
Dynamic: license-file
|