Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
fd894614
Commit
fd894614
authored
May 12, 2021
by
Hejing Li
Browse files
add no_simbricks attribute to exp class
parent
8b66ece4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
experiments/run.py
experiments/run.py
+8
-3
experiments/simbricks/experiments.py
experiments/simbricks/experiments.py
+1
-0
experiments/simbricks/simulators.py
experiments/simbricks/simulators.py
+5
-0
No files found.
experiments/run.py
View file @
fd894614
...
...
@@ -94,7 +94,7 @@ elif args.runtime == 'slurm':
else
:
rt
=
runtime
.
LocalSimpleRuntime
(
verbose
=
args
.
verbose
)
def
add_exp
(
e
,
run
,
prereq
,
create_cp
,
restore_cp
):
def
add_exp
(
e
,
run
,
prereq
,
create_cp
,
restore_cp
,
no_simbricks
):
outpath
=
'%s/%s-%d.json'
%
(
args
.
outdir
,
e
.
name
,
run
)
if
os
.
path
.
exists
(
outpath
)
and
not
args
.
force
:
print
(
'skip %s run %d'
%
(
e
.
name
,
run
))
...
...
@@ -106,6 +106,7 @@ def add_exp(e, run, prereq, create_cp, restore_cp):
env
=
exp
.
ExpEnv
(
args
.
repo
,
workdir
,
cpdir
)
env
.
create_cp
=
create_cp
env
.
restore_cp
=
restore_cp
env
.
no_simbricks
=
no_simbricks
env
.
pcap_file
=
''
if
args
.
pcap
:
env
.
pcap_file
=
workdir
+
'/pcap'
...
...
@@ -138,13 +139,17 @@ if not args.pickled:
continue
# if this is an experiment with a checkpoint we might have to create it
if
e
.
no_simbricks
:
no_simbricks
=
True
else
:
no_simbricks
=
False
if
e
.
checkpoint
:
prereq
=
add_exp
(
e
,
0
,
None
,
True
,
False
)
prereq
=
add_exp
(
e
,
0
,
None
,
True
,
False
,
no_simbricks
)
else
:
prereq
=
None
for
run
in
range
(
args
.
firstrun
,
args
.
firstrun
+
args
.
runs
):
add_exp
(
e
,
run
,
prereq
,
False
,
e
.
checkpoint
)
add_exp
(
e
,
run
,
prereq
,
False
,
e
.
checkpoint
,
no_simbricks
)
else
:
# otherwise load pickled run object
for
path
in
args
.
experiments
:
...
...
experiments/simbricks/experiments.py
View file @
fd894614
...
...
@@ -32,6 +32,7 @@ class Experiment(object):
name
=
None
timeout
=
None
checkpoint
=
False
no_simbricks
=
False
def
__init__
(
self
,
name
):
self
.
name
=
name
...
...
experiments/simbricks/simulators.py
View file @
fd894614
...
...
@@ -197,6 +197,11 @@ class Gem5Host(HostSim):
f
'--num-cpus=
{
self
.
node_config
.
cores
}
'
'--ddio-enabled --ddio-way-part=8 --mem-type=DDR4_2400_16x4 '
)
if
(
env
.
no_simbricks
):
cmd
+=
'--no-simbricks '
if
env
.
restore_cp
:
cmd
+=
'-r 0 '
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment