Commit b8063fa5 authored by harry1080ti's avatar harry1080ti
Browse files

added 1.square dataset 2.R generated report

parent 9799fe30
......@@ -46,7 +46,7 @@ class cma_approach(object):
self.trial = 1
self.seeding_type = seeding_type
self.max_res_available = 1920*9
self.max_res_available = max_res_unit
def parse_topology_file(self):
layers = []
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
ArraySize,Layer,DRAM_cycle,SRAM_cycle,Cycles,% Utilization,DRAM_IFMAP_start,DRAM_IFMAP_stop,DRAM_IFMAP_bytes,DRAM_Filter_start,DRAM_Filter_stop,DRAM_Filter_bytes,DRAM_OFMAP_start,DRAM_OFMAP_stop,DRAM_OFMAP_bytes,SRAM_read_start,SRAM_read_stop,SRAM_read_bytes,SRAM_write_start,SRAM_write_stop,SRAM_write_bytes
ArraySize,Layer,DRAM_cycle,SRAM_cycle,Cycles,Utilization,DRAM_IFMAP_start,DRAM_IFMAP_stop,DRAM_IFMAP_bytes,DRAM_Filter_start,DRAM_Filter_stop,DRAM_Filter_bytes,DRAM_OFMAP_start,DRAM_OFMAP_stop,DRAM_OFMAP_bytes,SRAM_read_start,SRAM_read_stop,SRAM_read_bytes,SRAM_write_start,SRAM_write_stop,SRAM_write_bytes
1,Conv1,13141851.0,13054508.0,13054528,96.08027702469715,-11390.0,-1.0,113895,-941.0,-1.0,9408,13054423.0,13130461.0,760384,19.0,13054422.0,12926528,0.0,13054527.0,125865856
2,Conv1,6614588.0,6527243.0,6527264,96.08027702469722,-11390.0,-1.0,113895,-941.0,-1.0,9408,6527160.0,6603198.0,760384,20.0,6527159.0,12926528,0.0,6527263.0,62937632
3,Conv1,4574817.0,4487472.0,4487494,93.16875347849421,-11390.0,-1.0,113895,-941.0,-1.0,9408,4487389.0,4563427.0,760384,21.0,4487388.0,12926528,0.0,4487493.0,43272562
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -5,7 +5,7 @@ ps=7
ats=25
ts=25
data <- read.csv("cma.csv", header=TRUE, sep=",")
data <- read.csv("../resulting_csv/cma.csv", header=TRUE, sep=",")
pdf(file="bestgain-partition.pdf", height=4, width=6)
f_data <- subset(data, feasable == 1 & target=="DRAM_cycle" & seeding_type=="optimised")
......
library(ggplot2)
library(scales)
ps=6
ls=2
ats=25
ts=25
# plot_1 > tp_gain v partition
# plot_2 > latency_penalty v partition
pdf("Square Performance.pdf", height=9, width=15)
sq_data <- read.csv("../resulting_csv/cma_logmore_sq.csv", header=TRUE, sep=",")
sq_data_subset <- subset(sq_data, feasable == 1 & target=="DRAM_cycle" & seeding_type=="allzeros")
topo_unique<-unique(sq_data_subset$topology)
partition_unique<-unique(sq_data_subset$partitions)
res_unique<-unique(sq_data_subset$res_unit)
column_data <- data.frame(matrix(ncol=7,nrow=0))
col_headings <- c("topology", "partitions", "sq_tp_gain", "sq_latency_penalty", "tp_gain_latency_metrics","res", "tp_partition")
names(column_data) <- col_headings
for (topo in topo_unique) {
for (part in partition_unique) {
for (res in res_unique) {
sq_data_uni = subset(sq_data_subset, topology==topo & partitions==part & res_unit==res)
if (dim(sq_data_uni)[1]!=0) {
sq_max_evo = max(sq_data_uni$evo_counter)
sq_row = which(sq_data_uni$evo_counter==sq_max_evo)
column_data <- rbind(column_data, data.frame(
"topology"=topo,
"partitions"=part,
"sq_tp_gain"=sq_data_uni$tp_gain[sq_row],
"sq_latency_penalty"=sq_data_uni$latency_penalty[sq_row],
"tp_gain_latency_metrics"=sq_data_uni$tp_gain[sq_row]/sq_data_uni$latency_penalty[sq_row],
"res"=toString(sq_data_uni$res_unit[sq_row]),
"tp_partition"=sq_data_uni$tp_partition[sq_row]))
}
}
}
}
d <- ggplot(column_data,aes(y=as.numeric(tp_partition), x=as.numeric(partitions), group=res))
d <- d + geom_point(size=ps, aes(color=res, shape=res))
d <- d + geom_line(size=ls, aes(color=res))
d <- d + labs(x="No of Partitions", y="Throughput")
d <- d + ggtitle("Square size array Throughtput by size tier")
d <- d + theme_bw()
d <- d + theme(axis.text=element_text(size=ats))
d <- d + theme(text=element_text(size=ts))
d <- d + theme(legend.position="bottom")
p <- ggplot(column_data,aes(y=as.numeric(sq_tp_gain), x=as.numeric(partitions), group=res))
p <- p + geom_point(size=ps, aes(color=res, shape=res))
p <- p + geom_line(size=ls, aes(color=res))
p <- p + geom_hline(yintercept=1)
p <- p + labs(x="No of Partitions", y="Throughput Gain")
p <- p + ggtitle("Square size array Throughtput Gain by size tier")
p <- p + theme_bw()
p <- p + theme(axis.text=element_text(size=ats))
p <- p + theme(text=element_text(size=ts))
p <- p + theme(legend.position="bottom")
q <- ggplot(column_data,aes(y=as.numeric(sq_latency_penalty), x=as.numeric(partitions), group=res))
q <- q + geom_point(size=ps, aes(color=res, shape=res))
q <- q + geom_line(size=ls, aes(color=res))
q <- q + geom_hline(yintercept=1)
q <- q + labs(x="No of Partitions", y="Latency Penalty")
q <- q + ggtitle("Square size array Latency Penalty by size tier")
q <- q + theme_bw()
q <- q + theme(axis.text=element_text(size=ats))
q <- q + theme(text=element_text(size=ts))
q <- q + theme(legend.position="bottom")
z <- ggplot(column_data,aes(y=as.numeric(tp_gain_latency_metrics), x=as.numeric(partitions), group=res))
z <- z + geom_point(size=ps, aes(color=res, shape=res))
z <- z + geom_line(size=ls, aes(color=res))
z <- z + geom_hline(yintercept=1)
z <- z + labs(x="No of Partitions", y="Metrics(tp/latency)")
z <- z + ggtitle("Square size array Metrics by size tier")
z <- z + theme_bw()
z <- z + theme(axis.text=element_text(size=ats))
z <- z + theme(text=element_text(size=ts))
z <- z + theme(legend.position="bottom")
print(d)
print(p)
print(q)
print(z)
dev.off()
library(ggplot2)
library(scales)
ps=6
ls=2
ats=25
ts=25
pdf(file="square_vs_rect_utili.pdf", height=9, width=15)
googlenet_sq_data_set <- read.csv("../data_source/googlenet_square_mem_bound.csv", header=TRUE, sep=",")
googlenet_data <- read.csv("../data_source/googlenet_mem_bound.csv", header=TRUE, sep=",")
layer_unique<-unique(googlenet_sq_data_set$Layer)
arraysize_sq_unique<-unique(googlenet_sq_data_set$ArraySize)
column_data <- data.frame(matrix(ncol=5, nrow=0))
col_headings <- c("layer", "sq_array_size", "array_size", "sq_utilization", "utilization")
names(column_data) <- col_headings
for (layer in layer_unique) {
for (square_array_size in arraysize_sq_unique) {
corresponding_size = (square_array_size*square_array_size /9)
sq_data_uni = subset(googlenet_sq_data_set, Layer==layer & ArraySize==square_array_size)
data_uni = subset(googlenet_data, Layer==layer & ArraySize==corresponding_size)
if (dim(data_uni)[1]!=0 && dim(sq_data_uni)[1]!=0 && corresponding_size <= 1920) {
column_data <- rbind(column_data, data.frame(
"layer"=layer,
"sq_array_size"=square_array_size,
"array_size"=corresponding_size,
"sq_utilization"=sq_data_uni$Utilization[1],
"utilization"=data_uni$Utilization[1]))
}
}
}
for (l in layer_unique) {
column_data_2 = subset(column_data, column_data$layer==l)
p <- ggplot(column_data_2)
p <- p + geom_point(aes(y=as.numeric(sq_utilization), x=sq_array_size, color='Square Array'))
p <- p + geom_line(aes(y=as.numeric(sq_utilization), x=sq_array_size, color='Square Array'))
p <- p + geom_point(aes(y=as.numeric(utilization), x=sq_array_size, color='Thin Rectangular'))
p <- p + geom_line(aes(y=as.numeric(utilization), x=sq_array_size, color='Thin Rectangular'))
p <- p + labs(x="Square Array Size", y="Utilization%")
p <- p + ggtitle(paste("Square Utilization vs Layer (", l, ")"))
p <- p + theme_bw()
p <- p + theme(axis.text=element_text(size=ats))
p <- p + theme(text=element_text(size=ts))
p <- p + theme(legend.position="bottom")
print(p)
}
dev.off()
\ No newline at end of file
library(ggplot2)
library(scales)
ps=6
ls=2
ats=25
ts=25
# plot_1 > tp_gain v partition
# plot_2 > latency_penalty v partition
pdf(file="square_vs_rect.pdf", height=9, width=15)
sq_data <- read.csv("../resulting_csv/cma_logmore_sq_2.csv", header=TRUE, sep=",")
sq_data_subset <- subset(sq_data, feasable == 1 & target=="DRAM_cycle" & seeding_type=="optimised")
data <- read.csv("../resulting_csv/cma.csv", header=TRUE, sep=",")
data_subset <- subset(data, feasable == 1 & target=="DRAM_cycle" & seeding_type=="optimised")
topo_unique<-unique(sq_data_subset$topology)
partition_unique<-unique(sq_data_subset$partitions)
column_data <- data.frame(matrix(ncol=8,nrow=0))
col_headings <- c("topology", "partitions", "sq_tp_gain", "sq_latency_penalty", "tp_gain", "latency_penalty", "tp_gain_sq_v_fm", "tp_gain_sq_v_normal")
names(column_data) <- col_headings
for (topo in topo_unique) {
for (part in partition_unique) {
sq_data_uni = subset(sq_data_subset, topology==topo & partitions==part & res_unit==17280)
data_uni = subset(data_subset, topology==topo & partitions==part)
if (dim(data_uni)[1]!=0 && dim(sq_data_uni)[1]!=0) {
sq_max_evo = max(sq_data_uni$evo_counter)
sq_row = which(sq_data_uni$evo_counter==sq_max_evo)
max_evo = max(data_uni$evo_counter)
row = which(data_uni$evo_counter==max_evo)
column_data <- rbind(column_data, data.frame(
"topology"=topo,
"partitions"=part,
"sq_tp_gain"=sq_data_uni$tp_gain[sq_row],
"sq_latency_penalty"=sq_data_uni$latency_penalty[sq_row],
"tp_gain"=data_uni$tp_gain[row],
"latency_penalty"=data_uni$latency_penalty[row],
"tp_gain_sq_v_fm"=sq_data_uni$tp_partition[sq_row]/data_uni$tp_fullmap[row],
"tp_gain_sq_v_normal"=sq_data_uni$tp_partition[sq_row]/data_uni$tp_partition[row]))
}
}
}
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_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)")
p <- p + theme_bw()
p <- p + theme(axis.text=element_text(size=ats))
p <- p + theme(text=element_text(size=ts))
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_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)")
q <- q + theme_bw()
q <- q + theme(axis.text=element_text(size=ats))
q <- q + theme(text=element_text(size=ts))
q <- q + theme(legend.position="bottom")
print(p)
print(q)
dev.off()
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment