Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
watcag-public
fpga-syspart
Commits
ca06925a
Commit
ca06925a
authored
Mar 12, 2021
by
harry1080ti
Browse files
Merge branch 'DSP_varying' of git.uwaterloo.ca:watcag-public/fpga-syspart into DSP_varying
parents
43e1b652
c224f5ec
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
6 deletions
+8
-6
optimization_algo/rScripts/square-vs-rect.r
optimization_algo/rScripts/square-vs-rect.r
+2
-2
optimization_algo/rScripts/square_vs_rect.pdf
optimization_algo/rScripts/square_vs_rect.pdf
+0
-0
scaleSim/generate_square_data_set.sh
scaleSim/generate_square_data_set.sh
+2
-2
scaleSim/scale.py
scaleSim/scale.py
+4
-2
No files found.
optimization_algo/rScripts/square-vs-rect.r
View file @
ca06925a
...
...
@@ -50,7 +50,7 @@ for (topo in topo_unique) {
p
<-
ggplot
(
column_data
,
aes
(
y
=
as.numeric
(
tp_gain_sq_v_fm
),
x
=
as.numeric
(
partitions
),
group
=
topology
))
p
<-
p
+
geom_point
(
aes
(
color
=
topology
,
shape
=
topology
))
p
<-
p
+
geom_line
(
size
=
ls
,
aes
(
color
=
topology
))
#
p <- p + geom_line(size=ls, aes(color=topology))
p
<-
p
+
geom_hline
(
yintercept
=
1
)
p
<-
p
+
labs
(
x
=
"No of Partitions"
,
y
=
"Throughput Gain"
)
p
<-
p
+
ggtitle
(
"Square size array Throughtput Gain (vs Fully Mapped 9*1920)"
)
...
...
@@ -61,7 +61,7 @@ p <- p + theme(legend.position="bottom")
q
<-
ggplot
(
column_data
,
aes
(
y
=
as.numeric
(
tp_gain_sq_v_normal
),
x
=
as.numeric
(
partitions
),
group
=
topology
))
q
<-
q
+
geom_point
(
aes
(
color
=
topology
,
shape
=
topology
))
q
<-
q
+
geom_line
(
size
=
ls
,
aes
(
color
=
topology
))
#
q <- q + geom_line(size=ls, aes(color=topology))
q
<-
q
+
geom_hline
(
yintercept
=
1
)
q
<-
q
+
labs
(
x
=
"No of Partitions"
,
y
=
"Throughput Gain"
)
q
<-
q
+
ggtitle
(
"Square size array Throughtput Gain (vs Partitioned 9*1920)"
)
...
...
optimization_algo/rScripts/square_vs_rect.pdf
View file @
ca06925a
No preview for this file type
scaleSim/generate_square_data_set.sh
View file @
ca06925a
#!/bin/bash
# ./generate_square_data_set.sh configs/US_sim.cfg ../topologies/mlperf/AlphaGoZero.csv 51840
# ./generate_square_data_set.sh configs/US_sim.cfg ../topologies/mlperf/AlphaGoZero.csv 51840
2
if
[
"
$1
"
!=
""
]
;
then
python3 scale.py
-arch_config
=
$1
-network
=
$2
-ultraScale
=
False
-enable_mp
=
True
-custom_mem_size
=
True
-res_unit_limit
=
$3
python3 scale.py
-arch_config
=
$1
-network
=
$2
-ultraScale
=
False
-enable_mp
=
True
-custom_mem_size
=
True
-res_unit_limit
=
$3
-increment_step
=
$4
else
echo
"Positional parameter 1 is empty"
fi
scaleSim/scale.py
View file @
ca06925a
...
...
@@ -17,6 +17,7 @@ flags.DEFINE_boolean("rmtrace",True,"whether to remove trace or not")
flags
.
DEFINE_boolean
(
"enable_mp"
,
False
,
"whether to enable multi-processing or not"
)
flags
.
DEFINE_boolean
(
"custom_mem_size"
,
False
,
"whether to enable customize memory size or not"
)
flags
.
DEFINE_integer
(
"res_unit_limit"
,
0
,
"res unit limit used by square array (0 for non-square)"
)
flags
.
DEFINE_integer
(
"increment_step"
,
2
,
"increment step default at 2 unless specified"
)
class
scale
:
def
__init__
(
self
,
sweep
=
False
,
save
=
False
):
...
...
@@ -95,6 +96,7 @@ class scale:
self
.
topology_file
=
FLAGS
.
network
self
.
square_res_limit
=
FLAGS
.
res_unit_limit
self
.
increment_step
=
FLAGS
.
increment_step
def
run_scale
(
self
):
...
...
@@ -269,8 +271,8 @@ class scale:
for
k
in
range
(
1
,
3009
):
for
i
in
range
(
1
,
1920
):
# for i in range(1, int(3008 / (k * 3))):
if
self
.
res_enough
((
k
*
3
,
i
)):
all_arr_dim_list
.
append
((
k
*
3
,
i
))
if
self
.
res_enough
((
k
*
self
.
increment_step
,
i
)):
all_arr_dim_list
.
append
((
k
*
self
.
increment_step
,
i
))
else
:
for
i
in
range
(
1920
):
all_arr_dim_list
.
append
((
9
,
i
+
1
))
...
...
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