siliconcompiler 0.33.2__py3-none-any.whl → 0.34.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 +2 -0
- siliconcompiler/_metadata.py +1 -1
- siliconcompiler/apps/_common.py +1 -1
- siliconcompiler/apps/sc.py +1 -1
- siliconcompiler/apps/sc_issue.py +6 -4
- siliconcompiler/apps/sc_remote.py +3 -20
- siliconcompiler/apps/sc_show.py +2 -2
- siliconcompiler/apps/utils/replay.py +4 -4
- siliconcompiler/checklist.py +202 -1
- siliconcompiler/core.py +62 -293
- siliconcompiler/data/templates/email/general.j2 +3 -3
- siliconcompiler/data/templates/email/summary.j2 +1 -1
- siliconcompiler/data/templates/issue/README.txt +1 -1
- siliconcompiler/data/templates/report/sc_report.j2 +7 -7
- siliconcompiler/dependencyschema.py +392 -0
- siliconcompiler/design.py +758 -0
- siliconcompiler/flowgraph.py +79 -13
- siliconcompiler/optimizer/vizier.py +2 -2
- siliconcompiler/package/__init__.py +383 -223
- siliconcompiler/package/git.py +75 -77
- siliconcompiler/package/github.py +70 -97
- siliconcompiler/package/https.py +77 -93
- siliconcompiler/packageschema.py +260 -0
- siliconcompiler/pdk.py +5 -5
- siliconcompiler/remote/client.py +33 -15
- siliconcompiler/remote/server.py +2 -2
- siliconcompiler/report/dashboard/cli/__init__.py +6 -6
- siliconcompiler/report/dashboard/cli/board.py +4 -4
- siliconcompiler/report/dashboard/web/components/__init__.py +5 -5
- siliconcompiler/report/dashboard/web/components/flowgraph.py +4 -4
- siliconcompiler/report/dashboard/web/components/graph.py +2 -2
- siliconcompiler/report/dashboard/web/state.py +1 -1
- siliconcompiler/report/dashboard/web/utils/__init__.py +5 -5
- siliconcompiler/report/html_report.py +1 -1
- siliconcompiler/report/report.py +4 -4
- siliconcompiler/report/summary_table.py +2 -2
- siliconcompiler/report/utils.py +5 -5
- siliconcompiler/scheduler/__init__.py +3 -1382
- siliconcompiler/scheduler/docker.py +263 -0
- siliconcompiler/scheduler/run_node.py +10 -21
- siliconcompiler/scheduler/scheduler.py +311 -0
- siliconcompiler/scheduler/schedulernode.py +944 -0
- siliconcompiler/scheduler/send_messages.py +3 -3
- siliconcompiler/scheduler/slurm.py +149 -163
- siliconcompiler/scheduler/taskscheduler.py +45 -57
- siliconcompiler/schema/__init__.py +3 -3
- siliconcompiler/schema/baseschema.py +234 -11
- siliconcompiler/schema/editableschema.py +4 -0
- siliconcompiler/schema/journal.py +210 -0
- siliconcompiler/schema/namedschema.py +55 -2
- siliconcompiler/schema/parameter.py +14 -1
- siliconcompiler/schema/parametervalue.py +1 -34
- siliconcompiler/schema/schema_cfg.py +210 -349
- siliconcompiler/tool.py +412 -148
- siliconcompiler/tools/__init__.py +2 -0
- siliconcompiler/tools/builtin/_common.py +5 -5
- siliconcompiler/tools/builtin/concatenate.py +7 -7
- siliconcompiler/tools/builtin/minimum.py +4 -4
- siliconcompiler/tools/builtin/mux.py +4 -4
- siliconcompiler/tools/builtin/nop.py +4 -4
- siliconcompiler/tools/builtin/verify.py +8 -9
- siliconcompiler/tools/execute/exec_input.py +1 -1
- siliconcompiler/tools/genfasm/genfasm.py +1 -6
- siliconcompiler/tools/openroad/_apr.py +5 -1
- siliconcompiler/tools/openroad/antenna_repair.py +1 -1
- siliconcompiler/tools/openroad/macro_placement.py +1 -1
- siliconcompiler/tools/openroad/power_grid.py +1 -1
- siliconcompiler/tools/openroad/scripts/common/procs.tcl +32 -25
- siliconcompiler/tools/opensta/timing.py +26 -3
- siliconcompiler/tools/slang/__init__.py +2 -2
- siliconcompiler/tools/surfer/__init__.py +0 -0
- siliconcompiler/tools/surfer/show.py +53 -0
- siliconcompiler/tools/surfer/surfer.py +30 -0
- siliconcompiler/tools/vpr/route.py +82 -0
- siliconcompiler/tools/vpr/vpr.py +23 -6
- siliconcompiler/tools/yosys/__init__.py +1 -1
- siliconcompiler/tools/yosys/scripts/procs.tcl +143 -0
- siliconcompiler/tools/yosys/{sc_synth_asic.tcl → scripts/sc_synth_asic.tcl} +4 -0
- siliconcompiler/tools/yosys/{sc_synth_fpga.tcl → scripts/sc_synth_fpga.tcl} +24 -77
- siliconcompiler/tools/yosys/syn_fpga.py +14 -0
- siliconcompiler/toolscripts/_tools.json +9 -13
- siliconcompiler/toolscripts/rhel9/install-vpr.sh +0 -2
- siliconcompiler/toolscripts/ubuntu22/install-surfer.sh +33 -0
- siliconcompiler/toolscripts/ubuntu24/install-surfer.sh +33 -0
- siliconcompiler/utils/__init__.py +4 -24
- siliconcompiler/utils/flowgraph.py +29 -28
- siliconcompiler/utils/issue.py +23 -29
- siliconcompiler/utils/logging.py +37 -7
- siliconcompiler/utils/showtools.py +6 -1
- {siliconcompiler-0.33.2.dist-info → siliconcompiler-0.34.1.dist-info}/METADATA +16 -25
- {siliconcompiler-0.33.2.dist-info → siliconcompiler-0.34.1.dist-info}/RECORD +98 -91
- siliconcompiler/scheduler/docker_runner.py +0 -254
- siliconcompiler/schema/journalingschema.py +0 -242
- siliconcompiler/tools/yosys/procs.tcl +0 -71
- siliconcompiler/toolscripts/rhel9/install-yosys-parmys.sh +0 -68
- siliconcompiler/toolscripts/ubuntu22/install-yosys-parmys.sh +0 -68
- siliconcompiler/toolscripts/ubuntu24/install-yosys-parmys.sh +0 -68
- /siliconcompiler/tools/yosys/{sc_lec.tcl → scripts/sc_lec.tcl} +0 -0
- /siliconcompiler/tools/yosys/{sc_screenshot.tcl → scripts/sc_screenshot.tcl} +0 -0
- /siliconcompiler/tools/yosys/{syn_strategies.tcl → scripts/syn_strategies.tcl} +0 -0
- {siliconcompiler-0.33.2.dist-info → siliconcompiler-0.34.1.dist-info}/WHEEL +0 -0
- {siliconcompiler-0.33.2.dist-info → siliconcompiler-0.34.1.dist-info}/entry_points.txt +0 -0
- {siliconcompiler-0.33.2.dist-info → siliconcompiler-0.34.1.dist-info}/licenses/LICENSE +0 -0
- {siliconcompiler-0.33.2.dist-info → siliconcompiler-0.34.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
import os.path
|
|
4
|
+
|
|
5
|
+
from siliconcompiler.schema import BaseSchema
|
|
6
|
+
from siliconcompiler.schema import EditableSchema, Parameter, Scope
|
|
7
|
+
from siliconcompiler.schema.utils import trim
|
|
8
|
+
from siliconcompiler.package import Resolver
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class PackageSchema(BaseSchema):
|
|
12
|
+
def __init__(self):
|
|
13
|
+
super().__init__()
|
|
14
|
+
|
|
15
|
+
schema_package(self)
|
|
16
|
+
|
|
17
|
+
self.__cache = {}
|
|
18
|
+
|
|
19
|
+
def register(self, name, path, ref=None, clobber=True):
|
|
20
|
+
"""
|
|
21
|
+
Registers a package by its name with the source path and reference
|
|
22
|
+
|
|
23
|
+
Registered package sources are stored in the package section of the schema.
|
|
24
|
+
|
|
25
|
+
Args:
|
|
26
|
+
name (str): Package name
|
|
27
|
+
path (str): Path to the sources, can be file, git url, archive url
|
|
28
|
+
ref (str): Reference of the sources, can be commitid, branch name, tag
|
|
29
|
+
clobber (bool): Overwrite existing
|
|
30
|
+
|
|
31
|
+
Examples:
|
|
32
|
+
>>> schema.register('siliconcompiler_data',
|
|
33
|
+
'git+https://github.com/siliconcompiler/siliconcompiler',
|
|
34
|
+
'cd328131bafd361787f9137a6ffed999d64c8c30')
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
# If this is a file, get the directory for this
|
|
38
|
+
if os.path.isfile(path):
|
|
39
|
+
path = os.path.dirname(os.path.abspath(path))
|
|
40
|
+
elif os.path.isdir(path):
|
|
41
|
+
path = os.path.abspath(path)
|
|
42
|
+
|
|
43
|
+
success = False
|
|
44
|
+
if self.set('source', name, 'path', path, clobber=clobber):
|
|
45
|
+
success = True
|
|
46
|
+
if success and ref:
|
|
47
|
+
success = False
|
|
48
|
+
if self.set('source', name, 'ref', ref, clobber=clobber):
|
|
49
|
+
success = True
|
|
50
|
+
return success
|
|
51
|
+
|
|
52
|
+
def get_resolver(self, package):
|
|
53
|
+
'''
|
|
54
|
+
Returns a specific resolver
|
|
55
|
+
|
|
56
|
+
Args:
|
|
57
|
+
package (str): name of package
|
|
58
|
+
'''
|
|
59
|
+
resolver_cls = Resolver.find_resolver(self.get("source", package, "path"))
|
|
60
|
+
resolver = resolver_cls(package, self._parent(root=True),
|
|
61
|
+
self.get("source", package, "path"),
|
|
62
|
+
self.get("source", package, "ref"))
|
|
63
|
+
resolver.set_cache(self.__cache)
|
|
64
|
+
return resolver
|
|
65
|
+
|
|
66
|
+
def get_resolvers(self):
|
|
67
|
+
'''
|
|
68
|
+
Returns a dictionary of packages with their resolver method.
|
|
69
|
+
'''
|
|
70
|
+
resolvers = {}
|
|
71
|
+
for package in self.getkeys("source"):
|
|
72
|
+
resolvers[package] = self.get_resolver(package).get_path
|
|
73
|
+
|
|
74
|
+
return resolvers
|
|
75
|
+
|
|
76
|
+
def _set_cache(self, package, path):
|
|
77
|
+
self.__cache[package] = path
|
|
78
|
+
|
|
79
|
+
def get_path_cache(self):
|
|
80
|
+
return self.__cache.copy()
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
############################################
|
|
84
|
+
# Package information
|
|
85
|
+
############################################
|
|
86
|
+
def schema_package(schema):
|
|
87
|
+
schema = EditableSchema(schema)
|
|
88
|
+
|
|
89
|
+
schema.insert(
|
|
90
|
+
'version',
|
|
91
|
+
Parameter(
|
|
92
|
+
'str',
|
|
93
|
+
scope=Scope.GLOBAL,
|
|
94
|
+
shorthelp="Package: version",
|
|
95
|
+
switch="-package_version <str>",
|
|
96
|
+
example=[
|
|
97
|
+
"cli: -package_version 1.0",
|
|
98
|
+
"api: chip.set('package', 'version', '1.0')"],
|
|
99
|
+
help=trim("""Package version. Can be a branch, tag, commit hash,
|
|
100
|
+
or a semver compatible version.""")))
|
|
101
|
+
|
|
102
|
+
schema.insert(
|
|
103
|
+
'description',
|
|
104
|
+
Parameter(
|
|
105
|
+
'str',
|
|
106
|
+
scope=Scope.GLOBAL,
|
|
107
|
+
shorthelp="Package: description",
|
|
108
|
+
switch="-package_description <str>",
|
|
109
|
+
example=[
|
|
110
|
+
"cli: -package_description 'Yet another cpu'",
|
|
111
|
+
"api: chip.set('package', 'description', 'Yet another cpu')"],
|
|
112
|
+
help=trim("""Package short one line description for package
|
|
113
|
+
managers and summary reports.""")))
|
|
114
|
+
|
|
115
|
+
schema.insert(
|
|
116
|
+
'keyword',
|
|
117
|
+
Parameter(
|
|
118
|
+
'str',
|
|
119
|
+
scope=Scope.GLOBAL,
|
|
120
|
+
shorthelp="Package: keyword",
|
|
121
|
+
switch="-package_keyword <str>",
|
|
122
|
+
example=[
|
|
123
|
+
"cli: -package_keyword cpu",
|
|
124
|
+
"api: chip.set('package', 'keyword', 'cpu')"],
|
|
125
|
+
help=trim("""Package keyword(s) used to characterize package.""")))
|
|
126
|
+
schema.insert(
|
|
127
|
+
'doc', 'homepage',
|
|
128
|
+
Parameter(
|
|
129
|
+
'str',
|
|
130
|
+
scope=Scope.GLOBAL,
|
|
131
|
+
shorthelp="Package: documentation homepage",
|
|
132
|
+
switch="-package_doc_homepage <str>",
|
|
133
|
+
example=[
|
|
134
|
+
"cli: -package_doc_homepage index.html",
|
|
135
|
+
"api: chip.set('package', 'doc', 'homepage', 'index.html')"],
|
|
136
|
+
help=trim("""
|
|
137
|
+
Package documentation homepage. Filepath to design docs homepage.
|
|
138
|
+
Complex designs can can include a long non standard list of
|
|
139
|
+
documents dependent. A single html entry point can be used to
|
|
140
|
+
present an organized documentation dashboard to the designer.""")))
|
|
141
|
+
|
|
142
|
+
doctypes = ['datasheet',
|
|
143
|
+
'reference',
|
|
144
|
+
'userguide',
|
|
145
|
+
'quickstart',
|
|
146
|
+
'releasenotes',
|
|
147
|
+
'testplan',
|
|
148
|
+
'signoff',
|
|
149
|
+
'tutorial']
|
|
150
|
+
|
|
151
|
+
for item in doctypes:
|
|
152
|
+
schema.insert(
|
|
153
|
+
'doc', item,
|
|
154
|
+
Parameter(
|
|
155
|
+
'[file]',
|
|
156
|
+
scope=Scope.GLOBAL,
|
|
157
|
+
shorthelp=f"Package: {item} document",
|
|
158
|
+
switch=f"-package_doc_{item} <file>",
|
|
159
|
+
example=[
|
|
160
|
+
f"cli: -package_doc_{item} {item}.pdf",
|
|
161
|
+
f"api: chip.set('package', 'doc', '{item}', '{item}.pdf')"],
|
|
162
|
+
help=trim(f"""Package list of {item} documents.""")))
|
|
163
|
+
|
|
164
|
+
schema.insert(
|
|
165
|
+
'license',
|
|
166
|
+
Parameter(
|
|
167
|
+
'[str]',
|
|
168
|
+
scope=Scope.GLOBAL,
|
|
169
|
+
shorthelp="Package: license identifiers",
|
|
170
|
+
switch="-package_license <str>",
|
|
171
|
+
example=[
|
|
172
|
+
"cli: -package_license 'Apache-2.0'",
|
|
173
|
+
"api: chip.set('package', 'license', 'Apache-2.0')"],
|
|
174
|
+
help=trim("""Package list of SPDX license identifiers.""")))
|
|
175
|
+
|
|
176
|
+
schema.insert(
|
|
177
|
+
'licensefile',
|
|
178
|
+
Parameter(
|
|
179
|
+
'[file]',
|
|
180
|
+
scope=Scope.GLOBAL,
|
|
181
|
+
shorthelp="Package: license files",
|
|
182
|
+
switch="-package_licensefile <file>",
|
|
183
|
+
example=[
|
|
184
|
+
"cli: -package_licensefile './LICENSE'",
|
|
185
|
+
"api: chip.set('package', 'licensefile', './LICENSE')"],
|
|
186
|
+
help=trim("""Package list of license files for to be
|
|
187
|
+
applied in cases when a SPDX identifier is not available.
|
|
188
|
+
(eg. proprietary licenses).""")))
|
|
189
|
+
|
|
190
|
+
schema.insert(
|
|
191
|
+
'organization',
|
|
192
|
+
Parameter(
|
|
193
|
+
'[str]',
|
|
194
|
+
scope=Scope.GLOBAL,
|
|
195
|
+
shorthelp="Package: sponsoring organization",
|
|
196
|
+
switch="-package_organization <str>",
|
|
197
|
+
example=[
|
|
198
|
+
"cli: -package_organization 'humanity'",
|
|
199
|
+
"api: chip.set('package', 'organization', 'humanity')"],
|
|
200
|
+
help=trim("""Package sponsoring organization. The field can be left
|
|
201
|
+
blank if not applicable.""")))
|
|
202
|
+
|
|
203
|
+
record = ['name',
|
|
204
|
+
'email',
|
|
205
|
+
'username',
|
|
206
|
+
'location',
|
|
207
|
+
'organization',
|
|
208
|
+
'publickey']
|
|
209
|
+
|
|
210
|
+
for item in record:
|
|
211
|
+
schema.insert(
|
|
212
|
+
'author', 'default', item,
|
|
213
|
+
Parameter(
|
|
214
|
+
'str',
|
|
215
|
+
scope=Scope.GLOBAL,
|
|
216
|
+
shorthelp=f"Package: author {item}",
|
|
217
|
+
switch=f"-package_author_{item} 'userid <str>'",
|
|
218
|
+
example=[
|
|
219
|
+
f"cli: -package_author_{item} 'wiley wiley@acme.com'",
|
|
220
|
+
f"api: chip.set('package', 'author', 'wiley', '{item}', 'wiley@acme.com')"],
|
|
221
|
+
help=trim(f"""Package author {item} provided with full name as key and
|
|
222
|
+
{item} as value.""")))
|
|
223
|
+
|
|
224
|
+
schema.insert(
|
|
225
|
+
'source', 'default', 'path',
|
|
226
|
+
Parameter(
|
|
227
|
+
'str',
|
|
228
|
+
scope=Scope.GLOBAL,
|
|
229
|
+
shorthelp="Package: data source path",
|
|
230
|
+
switch="-package_source_path 'source <str>'",
|
|
231
|
+
example=[
|
|
232
|
+
"cli: -package_source_path "
|
|
233
|
+
"'freepdk45_data ssh://git@github.com/siliconcompiler/freepdk45/'",
|
|
234
|
+
"api: chip.set('package', 'source', "
|
|
235
|
+
"'freepdk45_data', 'path', 'ssh://git@github.com/siliconcompiler/freepdk45/')"],
|
|
236
|
+
help=trim("""
|
|
237
|
+
Package data source path, allowed paths:
|
|
238
|
+
|
|
239
|
+
* /path/on/network/drive
|
|
240
|
+
* file:///path/on/network/drive
|
|
241
|
+
* git+https://github.com/xyz/xyz
|
|
242
|
+
* git://github.com/xyz/xyz
|
|
243
|
+
* git+ssh://github.com/xyz/xyz
|
|
244
|
+
* ssh://github.com/xyz/xyz
|
|
245
|
+
* https://github.com/xyz/xyz/archive
|
|
246
|
+
* https://zeroasic.com/xyz.tar.gz
|
|
247
|
+
* python://siliconcompiler
|
|
248
|
+
""")))
|
|
249
|
+
|
|
250
|
+
schema.insert(
|
|
251
|
+
'source', 'default', 'ref',
|
|
252
|
+
Parameter(
|
|
253
|
+
'str',
|
|
254
|
+
scope=Scope.GLOBAL,
|
|
255
|
+
shorthelp="Package: data source reference",
|
|
256
|
+
switch="-package_source_ref 'source <str>'",
|
|
257
|
+
example=[
|
|
258
|
+
"cli: -package_source_ref 'freepdk45_data 07ec4aa'",
|
|
259
|
+
"api: chip.set('package', 'source', 'freepdk45_data', 'ref', '07ec4aa')"],
|
|
260
|
+
help=trim("""Package data source reference""")))
|
siliconcompiler/pdk.py
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
from siliconcompiler.schema import NamedSchema
|
|
1
|
+
from siliconcompiler.schema import NamedSchema
|
|
2
2
|
from siliconcompiler.schema import EditableSchema, Parameter, Scope
|
|
3
3
|
from siliconcompiler.schema.utils import trim
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class PDKSchema(NamedSchema
|
|
7
|
-
def __init__(self, name=None
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
class PDKSchema(NamedSchema):
|
|
7
|
+
def __init__(self, name=None):
|
|
8
|
+
super().__init__()
|
|
9
|
+
self.set_name(name)
|
|
10
10
|
|
|
11
11
|
schema_pdk(self)
|
|
12
12
|
|
siliconcompiler/remote/client.py
CHANGED
|
@@ -18,12 +18,25 @@ from siliconcompiler._metadata import default_server
|
|
|
18
18
|
from siliconcompiler.remote import JobStatus, NodeStatus
|
|
19
19
|
from siliconcompiler.report.dashboard import DashboardType
|
|
20
20
|
from siliconcompiler.flowgraph import RuntimeFlowgraph
|
|
21
|
-
from siliconcompiler.
|
|
21
|
+
from siliconcompiler.scheduler.scheduler import Scheduler
|
|
22
|
+
from siliconcompiler.schema import Journal
|
|
23
|
+
from siliconcompiler.utils.logging import get_console_formatter
|
|
22
24
|
|
|
23
25
|
# Step name to use while logging
|
|
24
26
|
remote_step_name = 'remote'
|
|
25
27
|
|
|
26
28
|
|
|
29
|
+
class ClientScheduler(Scheduler):
|
|
30
|
+
def run_core(self):
|
|
31
|
+
Client(self._Scheduler__chip).run()
|
|
32
|
+
|
|
33
|
+
def configure_nodes(self):
|
|
34
|
+
return
|
|
35
|
+
|
|
36
|
+
def check_manifest(self):
|
|
37
|
+
return True
|
|
38
|
+
|
|
39
|
+
|
|
27
40
|
class Client():
|
|
28
41
|
# Step name to use while logging
|
|
29
42
|
STEP_NAME = "remote"
|
|
@@ -286,14 +299,15 @@ service, provided by SiliconCompiler, is not intended to process proprietary IP.
|
|
|
286
299
|
nodes_log = f' {status.title()} ({num_nodes}): '
|
|
287
300
|
log_nodes = []
|
|
288
301
|
for node, _ in nodes:
|
|
289
|
-
|
|
302
|
+
node_name = self.__node_information[node]['print']
|
|
303
|
+
node_len = len(node_name)
|
|
290
304
|
|
|
291
305
|
if node_len + line_len + 2 < self.__maxlinelength:
|
|
292
|
-
log_nodes.append(
|
|
306
|
+
log_nodes.append(node_name)
|
|
293
307
|
line_len += node_len + 2
|
|
294
308
|
else:
|
|
295
309
|
if len(log_nodes) == num_nodes - 1:
|
|
296
|
-
log_nodes.append(
|
|
310
|
+
log_nodes.append(node_name)
|
|
297
311
|
else:
|
|
298
312
|
log_nodes.append('...')
|
|
299
313
|
break
|
|
@@ -363,7 +377,7 @@ service, provided by SiliconCompiler, is not intended to process proprietary IP.
|
|
|
363
377
|
if SCNodeStatus.is_running(stat):
|
|
364
378
|
self.__logger.info(f' {stat.title()} ({len(nodes)}):')
|
|
365
379
|
for node, node_info in nodes:
|
|
366
|
-
running_log = f" {node}"
|
|
380
|
+
running_log = f" {self.__node_information[node]['print']}"
|
|
367
381
|
if 'elapsed_time' in node_info:
|
|
368
382
|
running_log += f" ({node_info['elapsed_time']})"
|
|
369
383
|
self.__logger.info(running_log)
|
|
@@ -471,7 +485,8 @@ service, provided by SiliconCompiler, is not intended to process proprietary IP.
|
|
|
471
485
|
|
|
472
486
|
# Run the job on the remote server, and wait for it to finish.
|
|
473
487
|
# Set logger to indicate remote run
|
|
474
|
-
self.__chip.
|
|
488
|
+
self.__chip._logger_console.setFormatter(
|
|
489
|
+
get_console_formatter(self.__chip, True, self.STEP_NAME, None))
|
|
475
490
|
|
|
476
491
|
# Ask the remote server to start processing the requested step.
|
|
477
492
|
self.__request_run()
|
|
@@ -482,7 +497,8 @@ service, provided by SiliconCompiler, is not intended to process proprietary IP.
|
|
|
482
497
|
finally:
|
|
483
498
|
# Restore logger
|
|
484
499
|
self.__chip._dash.end_of_run()
|
|
485
|
-
self.__chip.
|
|
500
|
+
self.__chip._logger_console.setFormatter(
|
|
501
|
+
get_console_formatter(self.__chip, False, None, None))
|
|
486
502
|
|
|
487
503
|
def __request_run(self):
|
|
488
504
|
'''
|
|
@@ -517,7 +533,7 @@ service, provided by SiliconCompiler, is not intended to process proprietary IP.
|
|
|
517
533
|
# Redirected POST requests are translated to GETs. This is actually
|
|
518
534
|
# part of the HTTP spec, so we need to manually follow the trail.
|
|
519
535
|
post_params = {
|
|
520
|
-
'chip_cfg': self.__chip.
|
|
536
|
+
'chip_cfg': self.__chip.getdict(),
|
|
521
537
|
'params': self.__get_post_params(include_job_id=True)
|
|
522
538
|
}
|
|
523
539
|
|
|
@@ -559,7 +575,7 @@ service, provided by SiliconCompiler, is not intended to process proprietary IP.
|
|
|
559
575
|
key_type = self.__chip.get(*key, field='type')
|
|
560
576
|
|
|
561
577
|
if 'dir' in key_type or 'file' in key_type:
|
|
562
|
-
for _, step, index in self.__chip.
|
|
578
|
+
for _, step, index in self.__chip.get(*key, field=None).getvalues(
|
|
563
579
|
return_defvalue=False):
|
|
564
580
|
packages = self.__chip.get(*key, field='package', step=step, index=index)
|
|
565
581
|
if not isinstance(packages, list):
|
|
@@ -597,7 +613,7 @@ service, provided by SiliconCompiler, is not intended to process proprietary IP.
|
|
|
597
613
|
manifest = os.path.join(self.__chip.getworkdir(), f'{self.__chip.design}.pkg.json')
|
|
598
614
|
if os.path.exists(manifest):
|
|
599
615
|
try:
|
|
600
|
-
|
|
616
|
+
Journal.replay_file(self.__chip.schema, manifest)
|
|
601
617
|
self.__setup_information_loaded = True
|
|
602
618
|
changed = True
|
|
603
619
|
except: # noqa E722
|
|
@@ -619,7 +635,7 @@ service, provided by SiliconCompiler, is not intended to process proprietary IP.
|
|
|
619
635
|
f'{self.__chip.design}.pkg.json')
|
|
620
636
|
if os.path.exists(manifest):
|
|
621
637
|
try:
|
|
622
|
-
|
|
638
|
+
Journal.replay_file(self.__chip.schema, manifest)
|
|
623
639
|
node_info["imported"] = True
|
|
624
640
|
changed = True
|
|
625
641
|
except: # noqa E722
|
|
@@ -638,7 +654,8 @@ service, provided by SiliconCompiler, is not intended to process proprietary IP.
|
|
|
638
654
|
return changed
|
|
639
655
|
|
|
640
656
|
def __ensure_run_loop_information(self):
|
|
641
|
-
self.__chip.
|
|
657
|
+
self.__chip._logger_console.setFormatter(
|
|
658
|
+
get_console_formatter(self.__chip, True, self.STEP_NAME, None))
|
|
642
659
|
if not self.__download_pool:
|
|
643
660
|
self.__download_pool = multiprocessing.Pool()
|
|
644
661
|
|
|
@@ -651,7 +668,7 @@ service, provided by SiliconCompiler, is not intended to process proprietary IP.
|
|
|
651
668
|
|
|
652
669
|
self.__node_information = {}
|
|
653
670
|
runtime = RuntimeFlowgraph(
|
|
654
|
-
self.__chip.
|
|
671
|
+
self.__chip.get("flowgraph", self.__chip.get('option', 'flow'), field='schema'),
|
|
655
672
|
from_steps=self.__chip.get('option', 'from'),
|
|
656
673
|
to_steps=self.__chip.get('option', 'to'),
|
|
657
674
|
prune_nodes=self.__chip.get('option', 'prune'))
|
|
@@ -662,7 +679,8 @@ service, provided by SiliconCompiler, is not intended to process proprietary IP.
|
|
|
662
679
|
"step": step,
|
|
663
680
|
"index": index,
|
|
664
681
|
"imported": done,
|
|
665
|
-
"fetched": done
|
|
682
|
+
"fetched": done,
|
|
683
|
+
"print": f"{step}/{index}"
|
|
666
684
|
}
|
|
667
685
|
self.__node_information[f'{step}{index}'] = node_info
|
|
668
686
|
|
|
@@ -737,7 +755,7 @@ service, provided by SiliconCompiler, is not intended to process proprietary IP.
|
|
|
737
755
|
def __schedule_fetch_result(self, node):
|
|
738
756
|
if node:
|
|
739
757
|
self.__node_information[node]["fetched"] = True
|
|
740
|
-
self.__logger.info(f' {node}')
|
|
758
|
+
self.__logger.info(f' {self.__node_information[node]["print"]}')
|
|
741
759
|
else:
|
|
742
760
|
self.__setup_information_fetched = True
|
|
743
761
|
self.__download_pool.apply_async(Client._fetch_result, (self, node))
|
siliconcompiler/remote/server.py
CHANGED
|
@@ -96,7 +96,7 @@ class Server:
|
|
|
96
96
|
|
|
97
97
|
def __run_start(self, chip):
|
|
98
98
|
flow = chip.get("option", "flow")
|
|
99
|
-
nodes = chip.
|
|
99
|
+
nodes = chip.get("flowgraph", flow, field="schema").get_nodes()
|
|
100
100
|
|
|
101
101
|
with self.sc_jobs_lock:
|
|
102
102
|
job_hash = self.sc_chip_lookup[chip]["jobhash"]
|
|
@@ -442,7 +442,7 @@ class Server:
|
|
|
442
442
|
job_hash = chip.get('record', 'remoteid')
|
|
443
443
|
|
|
444
444
|
runtime = RuntimeFlowgraph(
|
|
445
|
-
chip.
|
|
445
|
+
chip.get("flowgraph", chip.get('option', 'flow'), field='schema'),
|
|
446
446
|
from_steps=chip.get('option', 'from'),
|
|
447
447
|
to_steps=chip.get('option', 'to'),
|
|
448
448
|
prune_nodes=chip.get('option', 'prune'))
|
|
@@ -23,11 +23,11 @@ class CliDashboard(AbstractDashboard):
|
|
|
23
23
|
self._logger = logger
|
|
24
24
|
if self._logger and self._dashboard._active:
|
|
25
25
|
# Hijack the console
|
|
26
|
-
self._logger.removeHandler(self._chip.
|
|
27
|
-
self.__logger_console = self._chip.
|
|
28
|
-
self._chip.
|
|
26
|
+
self._logger.removeHandler(self._chip._logger_console)
|
|
27
|
+
self.__logger_console = self._chip._logger_console
|
|
28
|
+
self._chip._logger_console = self._dashboard._log_handler
|
|
29
29
|
self._logger.addHandler(self._dashboard._log_handler)
|
|
30
|
-
self.
|
|
30
|
+
self._dashboard._log_handler.setFormatter(self.__logger_console.formatter)
|
|
31
31
|
|
|
32
32
|
def open_dashboard(self):
|
|
33
33
|
"""Starts the dashboard rendering thread if it is not already running."""
|
|
@@ -71,9 +71,9 @@ class CliDashboard(AbstractDashboard):
|
|
|
71
71
|
# Restore logger
|
|
72
72
|
if self.__logger_console:
|
|
73
73
|
self._logger.removeHandler(self._dashboard._log_handler)
|
|
74
|
-
self._chip.
|
|
74
|
+
self._chip._logger_console = self.__logger_console
|
|
75
75
|
self._logger.addHandler(self.__logger_console)
|
|
76
|
-
self.
|
|
76
|
+
self.__logger_console.setFormatter(self._dashboard._log_handler.formatter)
|
|
77
77
|
self.__logger_console = None
|
|
78
78
|
|
|
79
79
|
def wait(self):
|
|
@@ -414,7 +414,7 @@ class Board(metaclass=BoardSingleton):
|
|
|
414
414
|
table.show_footer = False
|
|
415
415
|
table.show_header = False
|
|
416
416
|
for line in self._log_handler.get_lines(layout.log_height):
|
|
417
|
-
table.add_row(f"[
|
|
417
|
+
table.add_row(f"[white]{line}[/]")
|
|
418
418
|
while table.row_count < layout.log_height:
|
|
419
419
|
table.add_row("")
|
|
420
420
|
|
|
@@ -750,10 +750,10 @@ class Board(metaclass=BoardSingleton):
|
|
|
750
750
|
raise SiliconCompilerError("dummy error")
|
|
751
751
|
|
|
752
752
|
runtime_flow = RuntimeFlowgraph(
|
|
753
|
-
chip.
|
|
753
|
+
chip.get("flowgraph", flow, field='schema'),
|
|
754
754
|
to_steps=chip.get('option', 'to'),
|
|
755
755
|
prune_nodes=chip.get('option', 'prune'))
|
|
756
|
-
record = chip.
|
|
756
|
+
record = chip.get("record", field='schema')
|
|
757
757
|
|
|
758
758
|
execnodes = runtime_flow.get_nodes()
|
|
759
759
|
lowest_priority = 3 * len(execnodes) # 2x + 1 is lowest computed, so 3x will be lower
|
|
@@ -776,7 +776,7 @@ class Board(metaclass=BoardSingleton):
|
|
|
776
776
|
node_outputs.setdefault(in_node, set()).add(node)
|
|
777
777
|
|
|
778
778
|
flow_entry_nodes = set(
|
|
779
|
-
chip.
|
|
779
|
+
chip.get("flowgraph", flow, field="schema").get_entry_nodes())
|
|
780
780
|
|
|
781
781
|
running_nodes = set([node for node in nodes if NodeStatus.is_running(nodestatus[node])])
|
|
782
782
|
done_nodes = set([node for node in nodes if NodeStatus.is_done(nodestatus[node])])
|
|
@@ -301,7 +301,7 @@ def manifest_viewer(
|
|
|
301
301
|
if streamlit.checkbox(
|
|
302
302
|
'Raw manifest',
|
|
303
303
|
help='Click here to see the manifest before it was made more readable'):
|
|
304
|
-
manifest_to_show = chip.
|
|
304
|
+
manifest_to_show = chip.getdict()
|
|
305
305
|
else:
|
|
306
306
|
manifest_to_show = report.make_manifest(chip)
|
|
307
307
|
|
|
@@ -326,7 +326,7 @@ def manifest_viewer(
|
|
|
326
326
|
streamlit.download_button(
|
|
327
327
|
label='Download',
|
|
328
328
|
file_name='manifest.json',
|
|
329
|
-
data=json.dumps(chip.
|
|
329
|
+
data=json.dumps(chip.getdict(), indent=2),
|
|
330
330
|
mime="application/json",
|
|
331
331
|
use_container_width=True)
|
|
332
332
|
|
|
@@ -494,7 +494,7 @@ def node_viewer(chip, step, index, metric_dataframe, height=None):
|
|
|
494
494
|
|
|
495
495
|
metrics_col, records_col, logs_and_reports_col = streamlit.columns(3, gap='small')
|
|
496
496
|
|
|
497
|
-
node_name = f'{step}{index}'
|
|
497
|
+
node_name = f'{step}/{index}'
|
|
498
498
|
|
|
499
499
|
with metrics_col:
|
|
500
500
|
streamlit.subheader(f'{node_name} metrics')
|
|
@@ -504,7 +504,7 @@ def node_viewer(chip, step, index, metric_dataframe, height=None):
|
|
|
504
504
|
use_container_width=True,
|
|
505
505
|
height=height)
|
|
506
506
|
with records_col:
|
|
507
|
-
streamlit.subheader(f'{step}{index} details')
|
|
507
|
+
streamlit.subheader(f'{step}/{index} details')
|
|
508
508
|
nodes = {}
|
|
509
509
|
nodes[step + index] = report.get_flowgraph_nodes(chip, step, index)
|
|
510
510
|
streamlit.dataframe(
|
|
@@ -512,7 +512,7 @@ def node_viewer(chip, step, index, metric_dataframe, height=None):
|
|
|
512
512
|
use_container_width=True,
|
|
513
513
|
height=height)
|
|
514
514
|
with logs_and_reports_col:
|
|
515
|
-
streamlit.subheader(f'{step}{index} files')
|
|
515
|
+
streamlit.subheader(f'{step}/{index} files')
|
|
516
516
|
node_file_tree_viewer(chip, step, index)
|
|
517
517
|
|
|
518
518
|
|
|
@@ -45,8 +45,8 @@ def get_nodes_and_edges(chip):
|
|
|
45
45
|
successful_path = report.get_flowgraph_path(chip)
|
|
46
46
|
|
|
47
47
|
flow = chip.get('option', 'flow')
|
|
48
|
-
entry_exit_nodes = chip.
|
|
49
|
-
chip.
|
|
48
|
+
entry_exit_nodes = chip.get("flowgraph", flow, field="schema").get_entry_nodes() + \
|
|
49
|
+
chip.get("flowgraph", flow, field="schema").get_exit_nodes()
|
|
50
50
|
|
|
51
51
|
for step, index in node_dependencies:
|
|
52
52
|
# Build node
|
|
@@ -60,7 +60,7 @@ def get_nodes_and_edges(chip):
|
|
|
60
60
|
node_color = NODE_COLORS[node_status]
|
|
61
61
|
|
|
62
62
|
tool, task = get_tool_task(chip, step, index)
|
|
63
|
-
node_name = f'{step}{index}'
|
|
63
|
+
node_name = f'{step}/{index}'
|
|
64
64
|
label = node_name + "\n" + tool + "/" + task
|
|
65
65
|
if tool == 'builtin':
|
|
66
66
|
label = node_name + "\n" + tool
|
|
@@ -95,7 +95,7 @@ def get_nodes_and_edges(chip):
|
|
|
95
95
|
dashes = True
|
|
96
96
|
|
|
97
97
|
edges.append(Edge(
|
|
98
|
-
source=f'{source_step}{source_index}',
|
|
98
|
+
source=f'{source_step}/{source_index}',
|
|
99
99
|
target=node_name,
|
|
100
100
|
dir='up',
|
|
101
101
|
width=edge_width,
|
|
@@ -67,7 +67,7 @@ def settings(metrics, nodes, graph_number):
|
|
|
67
67
|
|
|
68
68
|
Args:
|
|
69
69
|
metrics (list) : A list of metrics that are set for all chips given in chips.
|
|
70
|
-
nodes (list) : A list of nodes given in the form f'{step}{index}'
|
|
70
|
+
nodes (list) : A list of nodes given in the form f'{step}/{index}'
|
|
71
71
|
graph_number (int) : The number of graphs there are. Used to create
|
|
72
72
|
keys to distinguish selectboxes from each other.
|
|
73
73
|
"""
|
|
@@ -147,7 +147,7 @@ def graph(metrics, nodes, node_to_step_index_map, graph_number):
|
|
|
147
147
|
|
|
148
148
|
labels = {
|
|
149
149
|
"runs": state.get_key(state.GRAPH_JOBS),
|
|
150
|
-
"nodes": [f'{step}{index}' for step, index in data]
|
|
150
|
+
"nodes": [f'{step}/{index}' for step, index in data]
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
if nodes:
|
|
@@ -125,7 +125,7 @@ def init():
|
|
|
125
125
|
chip_index = chip.get('arg', 'index')
|
|
126
126
|
|
|
127
127
|
if chip_step and chip_index:
|
|
128
|
-
set_key(SELECTED_NODE, f'{chip_step}{chip_index}')
|
|
128
|
+
set_key(SELECTED_NODE, f'{chip_step}/{chip_index}')
|
|
129
129
|
|
|
130
130
|
chip = get_chip("default")
|
|
131
131
|
chip.unset('arg', 'step')
|
|
@@ -24,9 +24,9 @@ def make_node_to_step_index_map(chip, metric_dataframe):
|
|
|
24
24
|
'''
|
|
25
25
|
node_to_step_index_map = {}
|
|
26
26
|
if chip.get('option', 'flow'):
|
|
27
|
-
for step, index in chip.
|
|
28
|
-
|
|
29
|
-
node_to_step_index_map[f'{step}{index}'] = (step, index)
|
|
27
|
+
for step, index in chip.get("flowgraph", chip.get('option', 'flow'),
|
|
28
|
+
field="schema").get_nodes():
|
|
29
|
+
node_to_step_index_map[f'{step}/{index}'] = (step, index)
|
|
30
30
|
|
|
31
31
|
# concatenate step and index
|
|
32
32
|
metric_dataframe.columns = metric_dataframe.columns.map(lambda x: f'{x[0]}{x[1]}')
|
|
@@ -57,8 +57,8 @@ def make_metric_to_metric_unit_map(metric_dataframe):
|
|
|
57
57
|
def is_running(chip):
|
|
58
58
|
if not chip.get('option', 'flow'):
|
|
59
59
|
return False
|
|
60
|
-
for step, index in chip.
|
|
61
|
-
|
|
60
|
+
for step, index in chip.get("flowgraph", chip.get('option', 'flow'),
|
|
61
|
+
field="schema").get_nodes():
|
|
62
62
|
state = chip.get('record', 'status', step=step, index=index)
|
|
63
63
|
if not NodeStatus.is_done(state):
|
|
64
64
|
return True
|
|
@@ -50,7 +50,7 @@ def _generate_html_report(chip, flow, flowgraph_nodes, results_html):
|
|
|
50
50
|
metrics=metrics,
|
|
51
51
|
metrics_unit=metrics_unit,
|
|
52
52
|
reports=reports,
|
|
53
|
-
manifest=chip.
|
|
53
|
+
manifest=chip.getdict(),
|
|
54
54
|
pruned_cfg=pruned_cfg,
|
|
55
55
|
metric_keys=metrics_to_show,
|
|
56
56
|
img_data=img_data,
|