Commit ae83f562 authored by Christian Fuß's avatar Christian Fuß

added support for unroll

parent 706aacc8
Pipeline #164101 failed with stages
in 3 minutes and 23 seconds
......@@ -15,7 +15,7 @@
<properties>
<!-- .. SE-Libraries .................................................. -->
<CNNArch.version>0.3.1-SNAPSHOT</CNNArch.version>
<CNNArch.version>0.3.2-SNAPSHOT</CNNArch.version>
<CNNTrain.version>0.3.4-SNAPSHOT</CNNTrain.version>
<embedded-montiarc-math-opt-generator>0.1.4</embedded-montiarc-math-opt-generator>
......
......@@ -50,8 +50,10 @@ public class LayerNameCreator {
protected int name(ArchitectureElementSymbol architectureElement, int stage, List<Integer> streamIndices){
if (architectureElement instanceof SerialCompositeElementSymbol) {
return nameSerialComposite((SerialCompositeElementSymbol) architectureElement, stage, streamIndices);
} else if (architectureElement instanceof ParallelCompositeElementSymbol){
} else if (architectureElement instanceof ParallelCompositeElementSymbol) {
return nameParallelComposite((ParallelCompositeElementSymbol) architectureElement, stage, streamIndices);
}else if (architectureElement instanceof UnrollSymbol) {
return nameUnroll((UnrollSymbol) architectureElement, stage, streamIndices);
} else{
if (architectureElement.isAtomic()){
if (architectureElement.getMaxSerialLength().get() > 0){
......@@ -89,6 +91,14 @@ public class LayerNameCreator {
return Collections.max(endStages) + 1;
}
protected int nameUnroll(UnrollSymbol unrollElement, int stage, List<Integer> streamIndices){
int endStage = stage;
for (ArchitectureElementSymbol subElement : unrollElement.getDeclaration().getBody().getElements()){
endStage = name(subElement, endStage, streamIndices);
}
return endStage;
}
protected int add(ArchitectureElementSymbol architectureElement, int stage, List<Integer> streamIndices){
int endStage = stage;
if (!elementToName.containsKey(architectureElement)) {
......
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