siliconcompiler 0.32.2__py3-none-any.whl → 0.33.0__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/_metadata.py +3 -2
- siliconcompiler/apps/sc.py +2 -2
- siliconcompiler/apps/sc_install.py +3 -3
- siliconcompiler/apps/sc_issue.py +1 -1
- siliconcompiler/apps/sc_remote.py +4 -4
- 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 +319 -345
- siliconcompiler/{templates → data/templates}/replay/replay.sh.j2 +2 -2
- siliconcompiler/flowgraph.py +803 -515
- siliconcompiler/fpga.py +84 -0
- siliconcompiler/metric.py +420 -0
- siliconcompiler/optimizer/vizier.py +2 -3
- siliconcompiler/package/__init__.py +29 -6
- siliconcompiler/pdk.py +415 -0
- siliconcompiler/record.py +449 -0
- siliconcompiler/remote/client.py +61 -19
- siliconcompiler/remote/schema.py +116 -112
- siliconcompiler/remote/server.py +3 -5
- siliconcompiler/report/__init__.py +3 -2
- siliconcompiler/report/dashboard/__init__.py +61 -170
- siliconcompiler/report/dashboard/cli/__init__.py +79 -0
- siliconcompiler/report/dashboard/cli/board.py +895 -0
- siliconcompiler/report/dashboard/web/__init__.py +196 -0
- siliconcompiler/report/dashboard/{components → web/components}/__init__.py +9 -8
- siliconcompiler/report/dashboard/{components → web/components}/flowgraph.py +3 -3
- siliconcompiler/report/dashboard/{components → web/components}/graph.py +7 -4
- siliconcompiler/report/dashboard/{layouts → web/layouts}/__init__.py +3 -3
- siliconcompiler/report/dashboard/{layouts → web/layouts}/_common.py +1 -1
- siliconcompiler/report/dashboard/{layouts → web/layouts}/vertical_flowgraph.py +5 -5
- siliconcompiler/report/dashboard/{layouts → web/layouts}/vertical_flowgraph_node_tab.py +6 -6
- siliconcompiler/report/dashboard/{layouts → web/layouts}/vertical_flowgraph_sac_tabs.py +6 -6
- siliconcompiler/report/dashboard/{state.py → web/state.py} +1 -1
- siliconcompiler/report/dashboard/{utils → web/utils}/__init__.py +4 -3
- siliconcompiler/report/dashboard/{viewer.py → web/viewer.py} +4 -4
- siliconcompiler/report/html_report.py +2 -3
- siliconcompiler/report/report.py +13 -7
- siliconcompiler/report/summary_image.py +1 -1
- siliconcompiler/report/summary_table.py +3 -3
- siliconcompiler/report/utils.py +11 -10
- siliconcompiler/scheduler/__init__.py +153 -286
- siliconcompiler/scheduler/run_node.py +2 -1
- siliconcompiler/scheduler/send_messages.py +4 -4
- siliconcompiler/scheduler/slurm.py +2 -2
- 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 +1308 -0
- siliconcompiler/tools/_common/__init__.py +8 -10
- siliconcompiler/tools/_common/sdc/sc_constraints.sdc +1 -1
- siliconcompiler/tools/bluespec/convert.py +7 -7
- siliconcompiler/tools/builtin/_common.py +1 -1
- siliconcompiler/tools/builtin/concatenate.py +2 -2
- siliconcompiler/tools/builtin/minimum.py +1 -1
- siliconcompiler/tools/builtin/mux.py +2 -1
- siliconcompiler/tools/builtin/nop.py +1 -1
- siliconcompiler/tools/builtin/verify.py +6 -4
- siliconcompiler/tools/chisel/convert.py +4 -4
- 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/klayout_export.py +0 -1
- siliconcompiler/tools/klayout/klayout_utils.py +3 -10
- siliconcompiler/tools/nextpnr/apr.py +6 -1
- siliconcompiler/tools/nextpnr/nextpnr.py +4 -4
- siliconcompiler/tools/openroad/_apr.py +17 -0
- siliconcompiler/tools/openroad/fillmetal_insertion.py +14 -14
- 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 +3 -3
- siliconcompiler/tools/openroad/scripts/apr/sc_clock_tree_synthesis.tcl +3 -3
- siliconcompiler/tools/openroad/scripts/apr/sc_detailed_placement.tcl +3 -3
- siliconcompiler/tools/openroad/scripts/apr/sc_detailed_route.tcl +3 -3
- siliconcompiler/tools/openroad/scripts/apr/sc_endcap_tapcell_insertion.tcl +3 -3
- siliconcompiler/tools/openroad/scripts/apr/sc_fillercell_insertion.tcl +3 -3
- siliconcompiler/tools/openroad/scripts/apr/sc_fillmetal_insertion.tcl +4 -4
- siliconcompiler/tools/openroad/scripts/apr/sc_global_placement.tcl +3 -3
- siliconcompiler/tools/openroad/scripts/apr/sc_global_route.tcl +3 -3
- siliconcompiler/tools/openroad/scripts/apr/sc_init_floorplan.tcl +3 -3
- siliconcompiler/tools/openroad/scripts/apr/sc_macro_placement.tcl +4 -4
- siliconcompiler/tools/openroad/scripts/apr/sc_metrics.tcl +3 -3
- siliconcompiler/tools/openroad/scripts/apr/sc_pin_placement.tcl +3 -3
- siliconcompiler/tools/openroad/scripts/apr/sc_power_grid.tcl +3 -3
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_design.tcl +3 -3
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_timing.tcl +4 -4
- siliconcompiler/tools/openroad/scripts/apr/sc_write_data.tcl +3 -3
- siliconcompiler/tools/openroad/scripts/common/procs.tcl +58 -2
- siliconcompiler/tools/openroad/scripts/common/reports.tcl +2 -2
- 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 +2 -2
- siliconcompiler/tools/openroad/scripts/sc_rdlroute.tcl +4 -4
- siliconcompiler/tools/openroad/scripts/sc_show.tcl +7 -7
- siliconcompiler/tools/opensta/__init__.py +1 -1
- siliconcompiler/tools/opensta/scripts/sc_check_library.tcl +1 -1
- siliconcompiler/tools/opensta/scripts/sc_procs.tcl +16 -0
- siliconcompiler/tools/opensta/scripts/sc_report_libraries.tcl +1 -1
- siliconcompiler/tools/opensta/scripts/sc_timing.tcl +35 -7
- siliconcompiler/tools/opensta/timing.py +6 -2
- siliconcompiler/tools/slang/__init__.py +10 -10
- 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/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/sc_synth_asic.tcl +104 -90
- siliconcompiler/tools/yosys/syn_asic.py +13 -4
- siliconcompiler/toolscripts/_tools.json +12 -7
- siliconcompiler/toolscripts/rhel8/install-chisel.sh +2 -0
- siliconcompiler/toolscripts/rhel8/install-icarus.sh +1 -0
- siliconcompiler/toolscripts/rhel8/install-klayout.sh +2 -0
- siliconcompiler/toolscripts/rhel8/install-magic.sh +1 -2
- siliconcompiler/toolscripts/rhel8/install-netgen.sh +1 -1
- siliconcompiler/toolscripts/rhel8/install-slang.sh +2 -0
- siliconcompiler/toolscripts/rhel8/install-surelog.sh +3 -1
- siliconcompiler/toolscripts/rhel8/install-sv2v.sh +1 -0
- siliconcompiler/toolscripts/rhel8/install-verible.sh +2 -0
- siliconcompiler/toolscripts/rhel8/install-verilator.sh +1 -0
- siliconcompiler/toolscripts/rhel8/install-xyce.sh +2 -0
- siliconcompiler/toolscripts/rhel9/install-chisel.sh +2 -0
- siliconcompiler/toolscripts/rhel9/install-ghdl.sh +1 -0
- siliconcompiler/toolscripts/rhel9/install-gtkwave.sh +1 -0
- siliconcompiler/toolscripts/rhel9/install-icarus.sh +1 -0
- siliconcompiler/toolscripts/rhel9/install-klayout.sh +2 -0
- siliconcompiler/toolscripts/rhel9/install-magic.sh +1 -2
- siliconcompiler/toolscripts/rhel9/install-netgen.sh +1 -1
- siliconcompiler/toolscripts/rhel9/install-openroad.sh +2 -0
- siliconcompiler/toolscripts/rhel9/install-opensta.sh +76 -0
- siliconcompiler/toolscripts/rhel9/install-slang.sh +3 -1
- siliconcompiler/toolscripts/rhel9/install-surelog.sh +2 -1
- siliconcompiler/toolscripts/rhel9/install-sv2v.sh +1 -0
- siliconcompiler/toolscripts/rhel9/install-verible.sh +2 -0
- siliconcompiler/toolscripts/rhel9/install-verilator.sh +1 -0
- siliconcompiler/toolscripts/rhel9/install-vpr.sh +2 -0
- siliconcompiler/toolscripts/rhel9/install-xdm.sh +2 -0
- siliconcompiler/toolscripts/rhel9/install-xyce.sh +2 -0
- siliconcompiler/toolscripts/rhel9/install-yosys-moosic.sh +2 -0
- siliconcompiler/toolscripts/rhel9/install-yosys-parmys.sh +2 -0
- siliconcompiler/toolscripts/rhel9/install-yosys-slang.sh +3 -1
- siliconcompiler/toolscripts/rhel9/install-yosys.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-bambu.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-bluespec.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-chisel.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-ghdl.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-gtkwave.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-icarus.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-icepack.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-klayout.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-magic.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-netgen.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-nextpnr.sh +1 -3
- siliconcompiler/toolscripts/ubuntu20/install-openroad.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-opensta.sh +72 -0
- siliconcompiler/toolscripts/ubuntu20/install-slang.sh +3 -1
- siliconcompiler/toolscripts/ubuntu20/install-slurm.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-surelog.sh +3 -1
- siliconcompiler/toolscripts/ubuntu20/install-sv2v.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-verible.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-verilator.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-xdm.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-xyce.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-yosys-moosic.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-yosys.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-bambu.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-bluespec.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-chisel.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-ghdl.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-gtkwave.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-icarus.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-icepack.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-klayout.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-magic.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-netgen.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-nextpnr.sh +1 -2
- siliconcompiler/toolscripts/ubuntu22/install-openroad.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-opensta.sh +72 -0
- siliconcompiler/toolscripts/ubuntu22/install-slang.sh +3 -1
- siliconcompiler/toolscripts/ubuntu22/install-slurm.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-surelog.sh +3 -1
- siliconcompiler/toolscripts/ubuntu22/install-sv2v.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-verible.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-verilator.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-vpr.sh +2 -2
- siliconcompiler/toolscripts/ubuntu22/install-xdm.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-xyce.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-yosys-moosic.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-yosys-parmys.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-yosys-slang.sh +3 -1
- siliconcompiler/toolscripts/ubuntu22/install-yosys.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-bambu.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-bluespec.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-chisel.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-ghdl.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-gtkwave.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-icarus.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-icepack.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-klayout.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-magic.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-netgen.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-nextpnr.sh +1 -3
- siliconcompiler/toolscripts/ubuntu24/install-openroad.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-opensta.sh +72 -0
- siliconcompiler/toolscripts/ubuntu24/install-slang.sh +3 -1
- siliconcompiler/toolscripts/ubuntu24/install-slurm.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-surelog.sh +3 -1
- siliconcompiler/toolscripts/ubuntu24/install-sv2v.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-verible.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-verilator.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-vpr.sh +2 -2
- siliconcompiler/toolscripts/ubuntu24/install-xdm.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-xyce.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-yosys-moosic.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-yosys-parmys.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-yosys-slang.sh +3 -1
- siliconcompiler/toolscripts/ubuntu24/install-yosys.sh +2 -0
- siliconcompiler/utils/__init__.py +8 -112
- siliconcompiler/utils/flowgraph.py +339 -0
- siliconcompiler/{issue.py → utils/issue.py} +7 -4
- siliconcompiler/utils/logging.py +86 -33
- {siliconcompiler-0.32.2.dist-info → siliconcompiler-0.33.0.dist-info}/METADATA +10 -8
- siliconcompiler-0.33.0.dist-info/RECORD +487 -0
- {siliconcompiler-0.32.2.dist-info → siliconcompiler-0.33.0.dist-info}/WHEEL +1 -1
- {siliconcompiler-0.32.2.dist-info → siliconcompiler-0.33.0.dist-info}/entry_points.txt +8 -8
- siliconcompiler/schema/schema_obj.py +0 -1936
- siliconcompiler/toolscripts/ubuntu20/install-vpr.sh +0 -27
- siliconcompiler/toolscripts/ubuntu20/install-yosys-parmys.sh +0 -59
- siliconcompiler-0.32.2.dist-info/RECORD +0 -464
- /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/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/report/dashboard/{utils → web/utils}/file_utils.py +0 -0
- /siliconcompiler/{units.py → utils/units.py} +0 -0
- {siliconcompiler-0.32.2.dist-info → siliconcompiler-0.33.0.dist-info}/licenses/LICENSE +0 -0
- {siliconcompiler-0.32.2.dist-info → siliconcompiler-0.33.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,339 @@
|
|
|
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
|
+
def _get_pruned_node_inputs(chip, flow, node):
|
|
10
|
+
# Ignore option from/to, we want reachable nodes of the whole flowgraph
|
|
11
|
+
flow_schema = chip.schema.get("flowgraph", flow, field="schema")
|
|
12
|
+
runtime = RuntimeFlowgraph(
|
|
13
|
+
flow_schema,
|
|
14
|
+
from_steps=set([step for step, _ in flow_schema.get_entry_nodes()]),
|
|
15
|
+
prune_nodes=chip.get('option', 'prune'))
|
|
16
|
+
|
|
17
|
+
return runtime.get_node_inputs(*node, record=chip.schema.get("record", field="schema"))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
#######################################
|
|
21
|
+
def _get_flowgraph_execution_order(chip, flow, reverse=False):
|
|
22
|
+
return chip.schema.get("flowgraph", flow, field="schema").get_execution_order(reverse=reverse)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def get_nodes_from(chip, flow, nodes):
|
|
26
|
+
runtime = RuntimeFlowgraph(
|
|
27
|
+
chip.schema.get("flowgraph", flow, field="schema"),
|
|
28
|
+
from_steps=chip.get('option', 'from'),
|
|
29
|
+
to_steps=chip.get('option', 'to'),
|
|
30
|
+
prune_nodes=chip.get('option', 'prune'))
|
|
31
|
+
|
|
32
|
+
all_nodes = set()
|
|
33
|
+
for node in nodes:
|
|
34
|
+
all_nodes.update(runtime.get_nodes_starting_at(*node))
|
|
35
|
+
|
|
36
|
+
return all_nodes
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
###########################################################################
|
|
40
|
+
def nodes_to_execute(chip, flow=None):
|
|
41
|
+
'''
|
|
42
|
+
Returns an ordered list of flowgraph nodes which will be executed.
|
|
43
|
+
This takes the from/to options into account if flow is the current flow or None.
|
|
44
|
+
|
|
45
|
+
Returns:
|
|
46
|
+
A list of nodes that will get executed during run() (or a specific flow).
|
|
47
|
+
|
|
48
|
+
Example:
|
|
49
|
+
>>> nodes = nodes_to_execute()
|
|
50
|
+
'''
|
|
51
|
+
if flow is None:
|
|
52
|
+
flow = chip.get('option', 'flow')
|
|
53
|
+
|
|
54
|
+
runtime = RuntimeFlowgraph(
|
|
55
|
+
chip.schema.get("flowgraph", flow, field='schema'),
|
|
56
|
+
args=(chip.get('arg', 'step'), chip.get('arg', 'index')),
|
|
57
|
+
from_steps=chip.get('option', 'from'),
|
|
58
|
+
to_steps=chip.get('option', 'to'),
|
|
59
|
+
prune_nodes=chip.get('option', 'prune'))
|
|
60
|
+
|
|
61
|
+
return runtime.get_nodes()
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
###########################################################################
|
|
65
|
+
def _check_flowgraph(chip, flow=None):
|
|
66
|
+
'''
|
|
67
|
+
Check if flowgraph is valid.
|
|
68
|
+
|
|
69
|
+
* Checks if all edges have valid nodes
|
|
70
|
+
* Checks that there are no duplicate edges
|
|
71
|
+
* Checks if from/to is valid
|
|
72
|
+
|
|
73
|
+
Returns True if valid, False otherwise.
|
|
74
|
+
'''
|
|
75
|
+
|
|
76
|
+
if not flow:
|
|
77
|
+
flow = chip.get('option', 'flow')
|
|
78
|
+
|
|
79
|
+
error = not chip.schema.get("flowgraph", flow, field="schema").validate(logger=chip.logger)
|
|
80
|
+
if not error:
|
|
81
|
+
error = not RuntimeFlowgraph.validate(
|
|
82
|
+
chip.schema.get("flowgraph", flow, field="schema"),
|
|
83
|
+
from_steps=chip.get('option', 'from'),
|
|
84
|
+
to_steps=chip.get('option', 'to'),
|
|
85
|
+
prune_nodes=chip.get('option', 'prune'),
|
|
86
|
+
logger=chip.logger)
|
|
87
|
+
|
|
88
|
+
return not error
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
###########################################################################
|
|
92
|
+
def _check_flowgraph_io(chip, nodes=None):
|
|
93
|
+
'''Check if flowgraph is valid in terms of input and output files.
|
|
94
|
+
|
|
95
|
+
Returns True if valid, False otherwise.
|
|
96
|
+
'''
|
|
97
|
+
flow = chip.get('option', 'flow')
|
|
98
|
+
|
|
99
|
+
runtime_full = RuntimeFlowgraph(
|
|
100
|
+
chip.schema.get("flowgraph", flow, field='schema'),
|
|
101
|
+
args=(chip.get('arg', 'step'), chip.get('arg', 'index')),
|
|
102
|
+
to_steps=chip.get('option', 'to'),
|
|
103
|
+
prune_nodes=chip.get('option', 'prune'))
|
|
104
|
+
runtime_flow = RuntimeFlowgraph(
|
|
105
|
+
chip.schema.get("flowgraph", flow, field='schema'),
|
|
106
|
+
args=(chip.get('arg', 'step'), chip.get('arg', 'index')),
|
|
107
|
+
from_steps=chip.get('option', 'from'),
|
|
108
|
+
to_steps=chip.get('option', 'to'),
|
|
109
|
+
prune_nodes=chip.get('option', 'prune'))
|
|
110
|
+
record = chip.schema.get("record", field='schema')
|
|
111
|
+
|
|
112
|
+
if not nodes:
|
|
113
|
+
nodes = runtime_flow.get_nodes()
|
|
114
|
+
for (step, index) in nodes:
|
|
115
|
+
# For each task, check input requirements.
|
|
116
|
+
tool, task = get_tool_task(chip, step, index, flow=flow)
|
|
117
|
+
|
|
118
|
+
if tool == 'builtin':
|
|
119
|
+
# We can skip builtins since they don't have any particular
|
|
120
|
+
# input requirements -- they just pass through what they
|
|
121
|
+
# receive.
|
|
122
|
+
continue
|
|
123
|
+
|
|
124
|
+
# Get files we receive from input nodes.
|
|
125
|
+
in_nodes = runtime_full.get_node_inputs(step, index, record=record)
|
|
126
|
+
all_inputs = set()
|
|
127
|
+
requirements = chip.get('tool', tool, 'task', task, 'input', step=step, index=index)
|
|
128
|
+
for in_step, in_index in in_nodes:
|
|
129
|
+
if (in_step, in_index) not in nodes:
|
|
130
|
+
# If we're not running the input step, the required
|
|
131
|
+
# inputs need to already be copied into the build
|
|
132
|
+
# directory.
|
|
133
|
+
workdir = chip.getworkdir(step=in_step, index=in_index)
|
|
134
|
+
in_step_out_dir = os.path.join(workdir, 'outputs')
|
|
135
|
+
|
|
136
|
+
if not os.path.isdir(in_step_out_dir):
|
|
137
|
+
# This means this step hasn't been run, but that
|
|
138
|
+
# will be flagged by a different check. No error
|
|
139
|
+
# message here since it would be redundant.
|
|
140
|
+
inputs = []
|
|
141
|
+
continue
|
|
142
|
+
|
|
143
|
+
design = chip.get('design')
|
|
144
|
+
manifest = f'{design}.pkg.json'
|
|
145
|
+
inputs = [inp for inp in os.listdir(in_step_out_dir) if inp != manifest]
|
|
146
|
+
else:
|
|
147
|
+
inputs = _gather_outputs(chip, in_step, in_index)
|
|
148
|
+
|
|
149
|
+
for inp in inputs:
|
|
150
|
+
node_inp = input_file_node_name(inp, in_step, in_index)
|
|
151
|
+
if node_inp in requirements:
|
|
152
|
+
inp = node_inp
|
|
153
|
+
if inp in all_inputs:
|
|
154
|
+
chip.logger.error(f'Invalid flow: {step}{index} '
|
|
155
|
+
f'receives {inp} from multiple input tasks')
|
|
156
|
+
return False
|
|
157
|
+
all_inputs.add(inp)
|
|
158
|
+
|
|
159
|
+
for requirement in requirements:
|
|
160
|
+
if requirement not in all_inputs:
|
|
161
|
+
chip.logger.error(f'Invalid flow: {step}{index} will '
|
|
162
|
+
f'not receive required input {requirement}.')
|
|
163
|
+
return False
|
|
164
|
+
|
|
165
|
+
return True
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
###########################################################################
|
|
169
|
+
def _gather_outputs(chip, step, index):
|
|
170
|
+
'''Return set of filenames that are guaranteed to be in outputs
|
|
171
|
+
directory after a successful run of step/index.'''
|
|
172
|
+
|
|
173
|
+
flow = chip.get('option', 'flow')
|
|
174
|
+
task_gather = getattr(chip._get_task_module(step, index, flow=flow, error=False),
|
|
175
|
+
'_gather_outputs',
|
|
176
|
+
None)
|
|
177
|
+
if task_gather:
|
|
178
|
+
return set(task_gather(chip, step, index))
|
|
179
|
+
|
|
180
|
+
tool, task = get_tool_task(chip, step, index, flow=flow)
|
|
181
|
+
return set(chip.get('tool', tool, 'task', task, 'output', step=step, index=index))
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
def _get_flowgraph_information(chip, flow, io=True):
|
|
185
|
+
from siliconcompiler.scheduler import _setup_node
|
|
186
|
+
from siliconcompiler.tools._common import input_provides, input_file_node_name
|
|
187
|
+
|
|
188
|
+
# Save schema to avoid making permanent changes
|
|
189
|
+
org_schema = chip.schema
|
|
190
|
+
chip.schema = chip.schema.copy()
|
|
191
|
+
|
|
192
|
+
# Setup nodes
|
|
193
|
+
node_exec_order = _get_flowgraph_execution_order(chip, flow)
|
|
194
|
+
if io:
|
|
195
|
+
# try:
|
|
196
|
+
for layer_nodes in node_exec_order:
|
|
197
|
+
for step, index in layer_nodes:
|
|
198
|
+
_setup_node(chip, step, index, flow=flow)
|
|
199
|
+
# except: # noqa E722
|
|
200
|
+
# io = False
|
|
201
|
+
|
|
202
|
+
node_rank = {}
|
|
203
|
+
for rank, rank_nodes in enumerate(node_exec_order):
|
|
204
|
+
for step, index in rank_nodes:
|
|
205
|
+
node_rank[f'{step}{index}'] = rank
|
|
206
|
+
|
|
207
|
+
graph_inputs = {}
|
|
208
|
+
all_graph_inputs = set()
|
|
209
|
+
if io:
|
|
210
|
+
for step, index in chip.schema.get("flowgraph", flow, field="schema").get_nodes():
|
|
211
|
+
tool, task = get_tool_task(chip, step, index, flow=flow)
|
|
212
|
+
for keypath in chip.get('tool', tool, 'task', task, 'require', step=step, index=index):
|
|
213
|
+
key = tuple(keypath.split(','))
|
|
214
|
+
if key[0] == 'input':
|
|
215
|
+
graph_inputs.setdefault((step, index), set()).add(keypath)
|
|
216
|
+
|
|
217
|
+
for inputs in graph_inputs.values():
|
|
218
|
+
all_graph_inputs.update(inputs)
|
|
219
|
+
|
|
220
|
+
exit_nodes = [f'{step}{index}' for step, index in chip.schema.get(
|
|
221
|
+
"flowgraph", flow, field="schema").get_exit_nodes()]
|
|
222
|
+
|
|
223
|
+
nodes = {}
|
|
224
|
+
edges = []
|
|
225
|
+
|
|
226
|
+
def clean_label(label):
|
|
227
|
+
return label.replace("<", "").replace(">", "")
|
|
228
|
+
|
|
229
|
+
def clean_text(label):
|
|
230
|
+
return label.replace("<", r"\<").replace(">", r"\>")
|
|
231
|
+
|
|
232
|
+
all_nodes = [(step, index) for step, index in sorted(
|
|
233
|
+
chip.schema.get("flowgraph", flow, field="schema").get_nodes())
|
|
234
|
+
if chip.get('record', 'status', step=step, index=index) != NodeStatus.SKIPPED]
|
|
235
|
+
|
|
236
|
+
runtime_flow = RuntimeFlowgraph(chip.schema.get("flowgraph", flow, field='schema'))
|
|
237
|
+
record = chip.schema.get("record", field='schema')
|
|
238
|
+
|
|
239
|
+
for step, index in all_nodes:
|
|
240
|
+
tool, task = get_tool_task(chip, step, index, flow=flow)
|
|
241
|
+
|
|
242
|
+
if io:
|
|
243
|
+
inputs = chip.get('tool', tool, 'task', task, 'input', step=step, index=index)
|
|
244
|
+
outputs = chip.get('tool', tool, 'task', task, 'output', step=step, index=index)
|
|
245
|
+
if chip.get('record', 'status', step=step, index=index) == NodeStatus.SKIPPED:
|
|
246
|
+
continue
|
|
247
|
+
else:
|
|
248
|
+
inputs = []
|
|
249
|
+
outputs = []
|
|
250
|
+
|
|
251
|
+
node = f'{step}{index}'
|
|
252
|
+
if io and (step, index) in graph_inputs:
|
|
253
|
+
inputs.extend(graph_inputs[(step, index)])
|
|
254
|
+
|
|
255
|
+
nodes[node] = {
|
|
256
|
+
"node": (step, index),
|
|
257
|
+
"file_inputs": inputs,
|
|
258
|
+
"inputs": {clean_text(f): f'input-{clean_label(f)}' for f in sorted(inputs)},
|
|
259
|
+
"outputs": {clean_text(f): f'output-{clean_label(f)}' for f in sorted(outputs)},
|
|
260
|
+
"task": f'{tool}/{task}' if tool != 'builtin' else task,
|
|
261
|
+
"is_input": node_rank[node] == 0,
|
|
262
|
+
"rank": node_rank[node]
|
|
263
|
+
}
|
|
264
|
+
nodes[node]["width"] = max(len(nodes[node]["inputs"]), len(nodes[node]["outputs"]))
|
|
265
|
+
|
|
266
|
+
if tool is None or task is None:
|
|
267
|
+
nodes[node]["task"] = None
|
|
268
|
+
|
|
269
|
+
rank_diff = {}
|
|
270
|
+
for in_step, in_index in runtime_flow.get_node_inputs(step, index, record=record):
|
|
271
|
+
rank_diff[f'{in_step}{in_index}'] = node_rank[node] - node_rank[f'{in_step}{in_index}']
|
|
272
|
+
nodes[node]["rank_diff"] = rank_diff
|
|
273
|
+
|
|
274
|
+
for step, index in all_nodes:
|
|
275
|
+
node = f'{step}{index}'
|
|
276
|
+
if io:
|
|
277
|
+
# get inputs
|
|
278
|
+
edge_stats = {}
|
|
279
|
+
for infile, in_nodes in input_provides(chip, step, index, flow=flow).items():
|
|
280
|
+
outfile = infile
|
|
281
|
+
for in_step, in_index in in_nodes:
|
|
282
|
+
infile = outfile
|
|
283
|
+
if infile not in nodes[node]["file_inputs"]:
|
|
284
|
+
infile = input_file_node_name(infile, in_step, in_index)
|
|
285
|
+
if infile not in nodes[node]["file_inputs"]:
|
|
286
|
+
continue
|
|
287
|
+
in_node_name = f"{in_step}{in_index}"
|
|
288
|
+
outlabel = f"{in_node_name}:output-{clean_label(outfile)}"
|
|
289
|
+
inlabel = f"{step}{index}:input-{clean_label(infile)}"
|
|
290
|
+
|
|
291
|
+
if in_node_name not in edge_stats:
|
|
292
|
+
edge_stats[in_node_name] = {
|
|
293
|
+
"count": 0,
|
|
294
|
+
"pairs": [],
|
|
295
|
+
"weight": min(nodes[node]["width"], nodes[in_node_name]["width"])
|
|
296
|
+
}
|
|
297
|
+
edge_stats[in_node_name]["count"] += 1
|
|
298
|
+
edge_stats[in_node_name]["pairs"].append((outlabel, inlabel))
|
|
299
|
+
|
|
300
|
+
# assign edge weights
|
|
301
|
+
|
|
302
|
+
# scale multiple weights
|
|
303
|
+
for edge_data in edge_stats.values():
|
|
304
|
+
edge_data["weight"] = int(
|
|
305
|
+
math.floor(max(1, edge_data["weight"] / edge_data["count"])))
|
|
306
|
+
|
|
307
|
+
# lower exit nodes weights
|
|
308
|
+
if node in exit_nodes:
|
|
309
|
+
for edge_data in edge_stats.values():
|
|
310
|
+
edge_data["weight"] = 1
|
|
311
|
+
else:
|
|
312
|
+
for edge_data in edge_stats.values():
|
|
313
|
+
edge_data["weight"] *= 2
|
|
314
|
+
|
|
315
|
+
# adjust for rank differences, lower weight if rankdiff is greater than 1
|
|
316
|
+
for in_node, edge_data in edge_stats.items():
|
|
317
|
+
if nodes[node]["rank_diff"][in_node] > 1:
|
|
318
|
+
edge_data["weight"] = 1
|
|
319
|
+
|
|
320
|
+
# create edges
|
|
321
|
+
for edge_data in edge_stats.values():
|
|
322
|
+
for outlabel, inlabel in edge_data["pairs"]:
|
|
323
|
+
edges.append([outlabel, inlabel, edge_data["weight"]])
|
|
324
|
+
|
|
325
|
+
if (step, index) in graph_inputs:
|
|
326
|
+
for key in graph_inputs[(step, index)]:
|
|
327
|
+
inlabel = f"{step}{index}:input-{clean_label(key)}"
|
|
328
|
+
edges.append((key, inlabel, 1))
|
|
329
|
+
else:
|
|
330
|
+
all_inputs = []
|
|
331
|
+
for in_step, in_index in chip.get('flowgraph', flow, step, index, 'input'):
|
|
332
|
+
all_inputs.append(f'{in_step}{in_index}')
|
|
333
|
+
for item in all_inputs:
|
|
334
|
+
edges.append((item, node, 1 if node in exit_nodes else 2))
|
|
335
|
+
|
|
336
|
+
# Restore schema
|
|
337
|
+
chip.schema = org_schema
|
|
338
|
+
|
|
339
|
+
return all_graph_inputs, nodes, edges, io
|
|
@@ -8,8 +8,9 @@ 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
|
|
11
|
+
from siliconcompiler.scheduler import _makecmd, _write_task_manifest
|
|
12
12
|
from siliconcompiler.tools._common import get_tool_task
|
|
13
|
+
from siliconcompiler import RecordSchema
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
def generate_testcase(chip,
|
|
@@ -42,7 +43,7 @@ def generate_testcase(chip,
|
|
|
42
43
|
sc_type = chip.get(*key, field='type')
|
|
43
44
|
if 'file' not in sc_type and 'dir' not in sc_type:
|
|
44
45
|
continue
|
|
45
|
-
for _, key_step, key_index in chip.schema.
|
|
46
|
+
for _, key_step, key_index in chip.schema.get(*key, field=None).getvalues():
|
|
46
47
|
chip.hash_files(*key,
|
|
47
48
|
check=False,
|
|
48
49
|
allow_cache=True,
|
|
@@ -224,7 +225,7 @@ def generate_testcase(chip,
|
|
|
224
225
|
issue_information['python'] = {"path": sys.path,
|
|
225
226
|
"version": sys.version}
|
|
226
227
|
issue_information['date'] = datetime.fromtimestamp(issue_time).strftime('%Y-%m-%d %H:%M:%S')
|
|
227
|
-
issue_information['machine'] =
|
|
228
|
+
issue_information['machine'] = RecordSchema.get_machine_information()
|
|
228
229
|
issue_information['run'] = {'step': step,
|
|
229
230
|
'index': index,
|
|
230
231
|
'libraries_included': include_libraries,
|
|
@@ -273,7 +274,9 @@ def generate_testcase(chip,
|
|
|
273
274
|
full_archive_path = os.path.join(archive_directory, archive_name)
|
|
274
275
|
full_archive_path = os.path.abspath(full_archive_path)
|
|
275
276
|
# Build archive
|
|
276
|
-
arch_base_dir = os.path.basename(archive_name)
|
|
277
|
+
arch_base_dir = os.path.basename(archive_name)
|
|
278
|
+
while arch_base_dir.lower().split('.')[-1] in ('gz', 'tar'):
|
|
279
|
+
arch_base_dir = '.'.join(arch_base_dir.split('.')[0:-1])
|
|
277
280
|
with tarfile.open(full_archive_path, "w:gz") as tar:
|
|
278
281
|
# Add individual files
|
|
279
282
|
add_files = [manifest_path,
|
siliconcompiler/utils/logging.py
CHANGED
|
@@ -1,34 +1,77 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
import sys
|
|
3
|
+
from siliconcompiler.remote import client
|
|
4
|
+
from siliconcompiler import utils
|
|
3
5
|
|
|
4
6
|
|
|
5
|
-
class
|
|
6
|
-
def __init__(self
|
|
7
|
-
|
|
7
|
+
class SCBlankLoggerFormatter(logging.Formatter):
|
|
8
|
+
def __init__(self):
|
|
9
|
+
super().__init__("%(message)s")
|
|
8
10
|
|
|
9
|
-
self.add_format(None, log_formatprefix + level_fmt, message_fmt)
|
|
10
|
-
for level in [logging.DEBUG,
|
|
11
|
-
logging.INFO,
|
|
12
|
-
logging.WARNING,
|
|
13
|
-
logging.ERROR,
|
|
14
|
-
logging.CRITICAL]:
|
|
15
|
-
self.add_format(level, log_formatprefix + level_fmt, message_fmt)
|
|
16
11
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
class SCDebugLoggerFormatter(logging.Formatter):
|
|
13
|
+
def __init__(self):
|
|
14
|
+
super().__init__(
|
|
15
|
+
"| %(levelname)-8s | %(filename)-20s : %(funcName)-10s | %(lineno)-4s | %(message)s")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class SCDebugInRunLoggerFormatter(logging.Formatter):
|
|
19
|
+
def __init__(self, chip, jobname, step, index):
|
|
20
|
+
super().__init__(
|
|
21
|
+
SCInRunLoggerFormatter.configureFormat(
|
|
22
|
+
"| %(levelname)-8s | %(filename)-20s : %(funcName)-10s | %(lineno)-4s |"
|
|
23
|
+
" {} | {} | {} | %(message)s",
|
|
24
|
+
chip, step, index))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class SCLoggerFormatter(logging.Formatter):
|
|
28
|
+
def __init__(self):
|
|
29
|
+
super().__init__("| %(levelname)-8s | %(message)s")
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class SCInRunLoggerFormatter(logging.Formatter):
|
|
33
|
+
def __init__(self, chip, jobname, step, index):
|
|
34
|
+
super().__init__(
|
|
35
|
+
SCInRunLoggerFormatter.configureFormat(
|
|
36
|
+
"| %(levelname)-8s | {} | {} | {} | %(message)s",
|
|
37
|
+
chip, step, index))
|
|
38
|
+
|
|
39
|
+
@staticmethod
|
|
40
|
+
def configureFormat(fmt, chip, step, index):
|
|
41
|
+
max_width = 20
|
|
23
42
|
|
|
24
|
-
|
|
25
|
-
if
|
|
26
|
-
|
|
43
|
+
flow = chip.get('option', 'flow')
|
|
44
|
+
if flow:
|
|
45
|
+
nodes_to_run = list(chip.schema.get("flowgraph", flow, field="schema").get_nodes())
|
|
27
46
|
else:
|
|
28
|
-
|
|
47
|
+
nodes_to_run = []
|
|
29
48
|
|
|
49
|
+
# Figure out how wide to make step and index fields
|
|
50
|
+
max_step_len = 1
|
|
51
|
+
max_index_len = 1
|
|
30
52
|
|
|
31
|
-
|
|
53
|
+
if chip.get('option', 'remote'):
|
|
54
|
+
nodes_to_run.append((client.remote_step_name, '0'))
|
|
55
|
+
for future_step, future_index in nodes_to_run:
|
|
56
|
+
max_step_len = max(len(future_step), max_step_len)
|
|
57
|
+
max_index_len = max(len(future_index), max_index_len)
|
|
58
|
+
max_step_len = min(max_step_len, max_width)
|
|
59
|
+
max_index_len = min(max_index_len, max_width)
|
|
60
|
+
|
|
61
|
+
jobname = chip.get('option', 'jobname')
|
|
62
|
+
|
|
63
|
+
if step is None:
|
|
64
|
+
step = '-' * max(max_step_len // 4, 1)
|
|
65
|
+
if index is None:
|
|
66
|
+
index = '-' * max(max_index_len // 4, 1)
|
|
67
|
+
|
|
68
|
+
return fmt.format(
|
|
69
|
+
utils.truncate_text(jobname, max_width),
|
|
70
|
+
f'{utils.truncate_text(step, max_step_len): <{max_step_len}}',
|
|
71
|
+
f'{utils.truncate_text(index, max_step_len): >{max_index_len}}')
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class SCColorLoggerFormatter(logging.Formatter):
|
|
32
75
|
'''
|
|
33
76
|
Apply color to stream logger
|
|
34
77
|
'''
|
|
@@ -38,20 +81,30 @@ class ColorStreamFormatter(LoggerFormatter):
|
|
|
38
81
|
bold_red = u"\u001b[31;1m"
|
|
39
82
|
reset = u"\u001b[0m"
|
|
40
83
|
|
|
41
|
-
def __init__(self,
|
|
42
|
-
super().__init__(
|
|
84
|
+
def __init__(self, root_formatter):
|
|
85
|
+
super().__init__()
|
|
43
86
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
87
|
+
self.__create_color_format(root_formatter._style._fmt)
|
|
88
|
+
|
|
89
|
+
def __create_color_format(self, fmt):
|
|
90
|
+
self.__formatters = {
|
|
91
|
+
None: logging.Formatter(fmt)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
for level, color in [(logging.DEBUG, SCColorLoggerFormatter.blue),
|
|
95
|
+
(logging.WARNING, SCColorLoggerFormatter.yellow),
|
|
96
|
+
(logging.ERROR, SCColorLoggerFormatter.red),
|
|
97
|
+
(logging.CRITICAL, SCColorLoggerFormatter.bold_red)]:
|
|
98
|
+
self.__formatters[level] = logging.Formatter(
|
|
99
|
+
fmt.replace('%(levelname)-8s',
|
|
100
|
+
color + '%(levelname)-8s' + SCColorLoggerFormatter.reset))
|
|
101
|
+
|
|
102
|
+
def format(self, record):
|
|
103
|
+
log_fmt = self.__formatters.get(record.levelno)
|
|
104
|
+
if not log_fmt:
|
|
105
|
+
log_fmt = self.__formatters.get(None)
|
|
53
106
|
|
|
54
|
-
|
|
107
|
+
return log_fmt.format(record)
|
|
55
108
|
|
|
56
109
|
@staticmethod
|
|
57
110
|
def supports_color(handler):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: siliconcompiler
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.33.0
|
|
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,22 +46,24 @@ 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.0; 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; python_version <= "3.8"
|
|
58
|
+
Requires-Dist: rich<15.0.0,>=14.0.0; python_version >= "3.9"
|
|
57
59
|
Provides-Extra: test
|
|
58
60
|
Requires-Dist: pytest==8.3.5; extra == "test"
|
|
59
61
|
Requires-Dist: pytest-xdist==3.6.1; extra == "test"
|
|
60
|
-
Requires-Dist: pytest-timeout==2.
|
|
62
|
+
Requires-Dist: pytest-timeout==2.4.0; extra == "test"
|
|
61
63
|
Requires-Dist: pytest-asyncio==0.24.0; python_version <= "3.8" and extra == "test"
|
|
62
64
|
Requires-Dist: pytest-asyncio==0.26.0; python_version >= "3.9" and extra == "test"
|
|
63
65
|
Requires-Dist: pytest-cov==5.0.0; python_version <= "3.8" and extra == "test"
|
|
64
|
-
Requires-Dist: pytest-cov==6.
|
|
66
|
+
Requires-Dist: pytest-cov==6.1.1; python_version >= "3.9" and extra == "test"
|
|
65
67
|
Requires-Dist: responses==0.25.7; extra == "test"
|
|
66
68
|
Requires-Dist: PyVirtualDisplay==3.0; extra == "test"
|
|
67
69
|
Requires-Dist: logiklib==0.1.0; extra == "test"
|
|
@@ -75,7 +77,7 @@ Requires-Dist: pip-licenses==5.0.0; extra == "docs"
|
|
|
75
77
|
Requires-Dist: pydata-sphinx-theme==0.16.1; extra == "docs"
|
|
76
78
|
Requires-Dist: sc-leflib>=0.2.0; extra == "docs"
|
|
77
79
|
Provides-Extra: profile
|
|
78
|
-
Requires-Dist: gprof2dot==
|
|
80
|
+
Requires-Dist: gprof2dot==2025.4.14; extra == "profile"
|
|
79
81
|
Provides-Extra: optimizer
|
|
80
82
|
Requires-Dist: google-vizier[jax]==0.1.21; python_version >= "3.10" and extra == "optimizer"
|
|
81
83
|
Dynamic: license-file
|