Commit af78ed2d authored by Justin Borromeo's avatar Justin Borromeo
Browse files

Merge branch 'unify-packing-approaches' of...

Merge branch 'unify-packing-approaches' of git.uwaterloo.ca:watcag-public/fpga-syspart into unify-packing-approaches
parents f19d3383 cebda6d5
---
title: "Packabilty-Aware Partitioning Results"
author: "Justin Borromeo"
date: "16/11/2020"
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library("dplyr")
```
```{r}
linear_results = read.csv('../resulting_csv/cma.csv', header=TRUE, sep=',')
# Filter out squeezenet results
linear_results = filter(linear_results, !grepl('squeeze', topology))
# Filter out infeasible solns
linear_results = filter(linear_results, feasable==1)
```
```{r}
packing_results = read.csv('../resulting_csv/cma_logmore_sq_full_evo_packing.csv',
header=FALSE,
sep=',')
names(packing_results) = c('target',
'evo_counter',
'partitions',
'topology',
'feasible',
'tp_partition',
'latency_partition',
'tp_fullmap',
'latency_fm',
'tp_gain',
'latency_penalty',
'best_layer_partition',
'best_resource_partition',
'time_taken',
'sigma',
'seed',
'valid_sampling_percentage',
'trial',
'popsize',
'res_unit',
'seeding_type',
'packing_strategy',
'png_filename')
packing_results = filter(packing_results, feasible==1)
```
```{r}
min_latencies_linear =
linear_results %>%
group_by(partitions, topology) %>%
summarize(min_latency = min(latency_partition), max_tp=max(tp_partition),
.groups="drop")
min_latencies_packed =
packing_results %>%
group_by(partitions, topology, packing_strategy) %>%
summarize(min_latency = min(latency_partition),
max_tp=max(tp_partition),
.groups="drop")
```
```{r}
# Unconstrained infinite bin
min_latencies_packed_unconstrained = filter(min_latencies_packed, packing_strategy=='unconstrained')
# Greedy partition sizing, no penalty
min_latencies_packed_no_penalty = filter(min_latencies_packed, packing_strategy=='no_penalty')
# Greedy partition sizing, penalty
min_latencies_packed_penalty = filter(min_latencies_packed, packing_strategy=='overflow_penalty')
```
```{r}
topologies = distinct(min_latencies_linear, topology)$topology
for (topology_name in topologies) {
topology_min_latencies_linear = filter(min_latencies_linear, topology==topology_name)
topology_min_latencies_unconstrained = filter(min_latencies_packed_unconstrained, topology==topology_name)
topology_min_latencies_no_penalty = filter(min_latencies_packed_no_penalty, topology==topology_name)
topology_min_latencies_penalty = filter(min_latencies_packed_penalty, topology==topology_name)
plot(topology_min_latencies_linear$partitions,
topology_min_latencies_linear$min_latency,
type="l",
xlab="Num partitions",
ylab="Min latency_partition",
ylim=c(0, max(topology_min_latencies_linear$min_latency)),
main=paste(topology_name, "Min Partition Latency", " "))
lines(topology_min_latencies_unconstrained$partitions,
topology_min_latencies_unconstrained$min_latency,
col="red")
lines(topology_min_latencies_no_penalty$partitions,
topology_min_latencies_no_penalty$min_latency,
col="green")
lines(topology_min_latencies_penalty$partitions,
topology_min_latencies_penalty$min_latency,
col="blue")
}
```
```{r}
for (topology_name in topologies) {
topology_min_latencies_linear = filter(min_latencies_linear, topology==topology_name)
topology_min_latencies_unconstrained = filter(min_latencies_packed_unconstrained, topology==topology_name)
topology_min_latencies_no_penalty = filter(min_latencies_packed_no_penalty, topology==topology_name)
topology_min_latencies_penalty = filter(min_latencies_packed_penalty, topology==topology_name)
plot(topology_min_latencies_linear$partitions,
topology_min_latencies_linear$max_tp,
type="l",
xlab="Num partitions",
ylab="Max throughput",
ylim=c(0, max(topology_min_latencies_unconstrained$max_tp)),
main=paste(topology_name, "Max Partition Throughput", " "))
lines(topology_min_latencies_unconstrained$partitions,
topology_min_latencies_unconstrained$max_tp,
col="red")
lines(topology_min_latencies_no_penalty$partitions,
topology_min_latencies_no_penalty$max_tp,
col="green")
lines(topology_min_latencies_penalty$partitions,
topology_min_latencies_penalty$max_tp,
col="blue")
}
```
\ No newline at end of file
Supports Markdown
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