EMADL2CPP issueshttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues2018-08-02T14:12:40+02:00https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/2Generator Factory2018-08-02T14:12:40+02:00Evgeny KusmenkoGenerator FactoryWe need a factory to create a train generator and an architecture generator,
see Abstract Factory Pattern
The Factories should be defined in their respective projects, i.e. CNNArch2Caffe2 should contain a Caffe2GeneratorFactory; the CN...We need a factory to create a train generator and an architecture generator,
see Abstract Factory Pattern
The Factories should be defined in their respective projects, i.e. CNNArch2Caffe2 should contain a Caffe2GeneratorFactory; the CNNArch2MXNet Generator project should contain the MXNetFactory.Carlos Alfredo Yeverino RodriguezCarlos Alfredo Yeverino Rodriguezhttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/4Windows runner fails because of a newline issue2018-10-28T10:23:07+01:00Svetlana PavlitskayaWindows runner fails because of a newline issueTrace log excerpt:
`extraneous input '\r\n' expecting {'component', 'port', 'ports', 'instance', 'connect', 'autoconnect', 'autoinstantiate', 'implementation', '}'}`Trace log excerpt:
`extraneous input '\r\n' expecting {'component', 'port', 'ports', 'instance', 'connect', 'autoconnect', 'autoinstantiate', 'implementation', '}'}`Svetlana PavlitskayaSvetlana Pavlitskayahttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/3Using EMAMOpt2CPP2018-10-28T23:42:33+01:00Evgeny KusmenkoUsing EMAMOpt2CPPIm Moment delegiert EMADL2CPP die Generierung an EMAM2CPP. @christoph.richter hat aber eine Erweiterung für EMAM2CPP in seiner MA geschrieben. Könntest du den EMADL2CPP so anpassen, dass er nicht mehr an EMAM2CPP sondern an EMAMOpt2CPP d...Im Moment delegiert EMADL2CPP die Generierung an EMAM2CPP. @christoph.richter hat aber eine Erweiterung für EMAM2CPP in seiner MA geschrieben. Könntest du den EMADL2CPP so anpassen, dass er nicht mehr an EMAM2CPP sondern an EMAMOpt2CPP delegiert?
@svetlana.pavlitskaya @LowhuhnCarlos Alfredo Yeverino RodriguezCarlos Alfredo Yeverino Rodriguezhttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/6Fully automated compilation procedure2018-12-17T14:41:09+01:00Evgeny KusmenkoFully automated compilation proceduretraining should be done automatically. the user should need just one call to get the whole system compiled. Very important: if neither the network nor the data have the training should be skipped, i.e. the generator should detect whether...training should be done automatically. the user should need just one call to get the whole system compiled. Very important: if neither the network nor the data have the training should be skipped, i.e. the generator should detect whether training is required or not.
training data is to be fetched from a default location. Unless specified otherwise.
I don't like the idea of putting the path into the training file (as it would require to change this file whenever the location is changed). on the other hand, using a CLI parameter is not very user friendly. What do you think?Carlos Alfredo Yeverino RodriguezCarlos Alfredo Yeverino Rodriguezhttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/1Missing variable reassignment in generated cpp code2018-12-27T13:40:32+01:00Svetlana PavlitskayaMissing variable reassignment in generated cpp code**Expected**: different values assigned to the variable ```c``` two times.
**Actual**: ```c``` gets value assigned only first time.
Model:
```
component Add{
ports
in Q(0 : 10) a,
out Q(0 : 20) c;
implementatio...**Expected**: different values assigned to the variable ```c``` two times.
**Actual**: ```c``` gets value assigned only first time.
Model:
```
component Add{
ports
in Q(0 : 10) a,
out Q(0 : 20) c;
implementation Math{
Q b = 42 + a;
c = 1 + b;
b = 43;
c = 1 + b;
}
}
```
Generated code:
```
#ifndef ADD
#define ADD
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#include "armadillo"
using namespace arma;
class add{
public:
double a;
double c;
void init()
{
}
void execute()
{
double b = 2+a;
c = 1+b;
b = 3;
}
};
#endif
```
Missing ```c = 1 + b;``` as the last statement in the ```execute()``` block.
Problem occurs only when ```c``` has two identical assignments.Evgeny KusmenkoAlexander David HellwigEvgeny Kusmenkohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/7Lab: DL Toolchain Automation2019-03-08T17:25:36+01:00Evgeny KusmenkoLab: DL Toolchain AutomationThe aim of this ticket is to make the EMADL2CPP compilation toolchain as user friendly and intuitive as possible.
**Current state:** EMADL2CPP is a code generator / compiler written to enable the compilation and training of EmbeddedMon...The aim of this ticket is to make the EMADL2CPP compilation toolchain as user friendly and intuitive as possible.
**Current state:** EMADL2CPP is a code generator / compiler written to enable the compilation and training of EmbeddedMontiArc models featuring Deep Learning based components, i.e. those having a CNNArch implementation. However, instead of doing the actual code generation itself, EMADL2CPP delegates the actual generation to the respective sub-generators: EMAM2CPP for architecture generation as well as MontiMath code generation and CNNArch2X for deep learning components (thereby X=MXNet or Caffe2). Thereby, the code is generated and the user has to make sure that the database containing the training and test data is put into the right location in the target directory structure, then train the network and compile the result to an executable file "manually".
**Goal:** Rework the EMADL2CPP compiler such that based on a given *configuration* it generates code , trains *all* the networks present in the EmbeddedMontiArc model, compiles the result to an executable in one shot (only one call allowed!).
Therefore, an additional configuration file is needed to set up the data paths for training for each DL component as well as some meta data concerning the database. A line of the configuration file might look like this (and we need a line per DL component):
`de.some.package.MyParentComponent.dlComponentToTrainInstanceName /path/to/data LMDB`
Thereby, the first argument is a fully qualified descriptor of the instance to be trained. The name of the instance is `dlComponentToTrainInstanceName`, it is instantiated in the component `MyParentComponent` residing in the package `de.some.package`.
The semantics of the line is to look up an LMDB database containing training and test data respectively in `/path/to/data`. Hence, EMADL2CPP should ask the backend compiler if it currently supports this kind of data base. If an unsopprted database type is required, an error needs to be thrown.
On the other hand, you do not want to retrain all the networks inside your model each time you change and regenerate a MontiMath component. Hence, you need to check whether training is necessary. Therfore, you might want to store an additional file containing the hash value of the data used for training in the target directory of each DL component. If neither the hash value of the training database nor the CNNArch component implementation has changed, a re-training can be omitted.
Of course, there might be scenarios where you want to force re-training and there are also scenario's where you want to omit checking the hash value as it might take a while for big databases. Therefore, please introduce two new CLI parameters for EMADL2CPP: `no-training` and `force-training`.
There is one more pitfall: sometimes you want to have several instances of the very same component, i.e. you want to allow for *weight sharing*. It should, hence, be possible to have several instances of the same DL component to share weights. On epossible solution would be to check, whether several instances mentionned in the configuration file have the same component type AND the same training data. Then the weights should be shared. As an additional alternative it makes sense to allow one to configure a component type with a database instead of a concrete instance. Then all instances of this type should share the same weight (with exceptions of concretely mentionned instances)
Feel free to ask questions, suggest improvements, and discuss new ideas.Christopher Jan-Steffen BrixChristopher Jan-Steffen Brix2019-01-31https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/5add translateToICube method2019-07-09T16:52:43+02:00Evgeny Kusmenkoadd translateToICube method- to generate ICubes for Z- to generate ICubes for ZSebastian NickelsSebastian Nickelshttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/15Weights as Dependencies2020-10-29T16:20:54+01:00Evgeny KusmenkoWeights as DependenciesThe goal is to be able to publish trained weights as archives (e.g. JARs)
and to use them as maven dependencies in order to skip training.
First step: define archive structure for Gluon ArchivesThe goal is to be able to publish trained weights as archives (e.g. JARs)
and to use them as maven dependencies in order to skip training.
First step: define archive structure for Gluon ArchivesYuyuan LiuYuyuan Liu2020-01-15https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/12Checksum calculation for larger files fails2020-10-29T16:21:26+01:00Ghost UserChecksum calculation for larger files failsThe method `getChecksumForFile(...)` in file EMADLGenerator.java fails for larger files. It was executed on our training set (~2.0 GB) and failed.The method `getChecksumForFile(...)` in file EMADLGenerator.java fails for larger files. It was executed on our training set (~2.0 GB) and failed.https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/8Lab: Image based Calculator2020-10-29T16:21:37+01:00Evgeny KusmenkoLab: Image based CalculatorTo evaluate #7 the goal is to design a small EMADL model featuring several DL components as well as some math components. The input of this model are 3 MNIST pictures and 2 CIFAR10 pictures.
Each input picture is translated to its respe...To evaluate #7 the goal is to design a small EMADL model featuring several DL components as well as some math components. The input of this model are 3 MNIST pictures and 2 CIFAR10 pictures.
Each input picture is translated to its respective class number. These numbers are then fed forward to a math component which would compute a polynomial of the form y=a1*x1+a_21*x2^2 + a3, where the a's are coefficients given by the MNIST images and the x's are the variables provide by the cifar10 classes.
Please evaluate the individual test error for each component as well as the whole systems test error. Which loss function is suitable for this problem?Christopher Jan-Steffen BrixChristopher Jan-Steffen Brix2019-01-23https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/11Dependency Issue2020-10-29T16:21:54+01:00Evgeny KusmenkoDependency Issuemvn clean install -s settings.xml can't get monticar commons dependencymvn clean install -s settings.xml can't get monticar commons dependencyhttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/13Move to EMADL2020-10-29T16:22:18+01:00Evgeny KusmenkoMove to EMADLCan this clas be moved to EMADL language project?
https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/blob/develop/src/main/java/de/monticore/lang/monticar/emadl/generator/EMADLAbstractSymtab.javaCan this clas be moved to EMADL language project?
https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/blob/develop/src/main/java/de/monticore/lang/monticar/emadl/generator/EMADLAbstractSymtab.javaNicola GattoEyüp HarputluNicola Gattohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/16Generator cannot resolve port2020-11-11T13:13:04+01:00Mattis HoppeGenerator cannot resolve portI have 3 emadl files containing:
```
component Add{
ports
in Q num1,
in Q num2,
out Q erg;
implementation Math{
erg = num1 + num2;
}
}
```
```
component Add1{
ports
in Q testin,
out Q testout;
instance Add add;
connect te...I have 3 emadl files containing:
```
component Add{
ports
in Q num1,
in Q num2,
out Q erg;
implementation Math{
erg = num1 + num2;
}
}
```
```
component Add1{
ports
in Q testin,
out Q testout;
instance Add add;
connect testin -> add.num1;
connect testin -> add.num2;
connect add.erg -> testout;
}
```
```
component Add2{
ports
in Q test1,
out Q test2;
instance Add1 adder;
connect test1 -> adder.testin;
connect adder.testout -> test2;
}
```
Building Add and Add1 works just fine, but as soon as I try to build Add2 I get following Error-message:
```
[WARN] name of connector's source/target does has two parts: instance.port, cannot resolve port
Exception in thread "main" java.lang.NullPointerException
at de.monticore.lang.monticar.generator.cpp.converter.PortConverter.convertPortSymbolToVariable(PortConverter.java:59)
at de.monticore.lang.monticar.generator.cpp.converter.PortConverter.convertPortSymbolToVariable(PortConverter.java:48)
at de.monticore.lang.monticar.generator.cpp.converter.PortConverter.getVariableForPortSymbol(PortConverter.java:33)
at de.monticore.lang.monticar.generator.cpp.converter.ComponentConverterMethodGeneration.generateConnectors(ComponentConverterMethodGeneration.java:85)
at de.monticore.lang.monticar.generator.cpp.converter.ComponentConverterMethodGeneration.generateExecuteMethodInner(ComponentConverterMethodGeneration.java:70)
at de.monticore.lang.monticar.generator.cpp.converter.ComponentConverterMethodGeneration.generateExecuteMethod(ComponentConverterMethodGeneration.java:61)
at de.monticore.lang.monticar.generator.cpp.converter.ComponentConverter.convertComponentSymbolToBluePrint(ComponentConverter.java:99)
at de.monticore.lang.monticar.generator.cpp.converter.ComponentConverter.convertComponentSymbolToBluePrint(ComponentConverter.java:368)
at de.monticore.lang.monticar.generator.cpp.LanguageUnitCPP.generateBluePrints(LanguageUnitCPP.java:64)
at de.monticore.lang.monticar.generator.cpp.GeneratorCPP.generateString(GeneratorCPP.java:159)
at de.monticore.lang.monticar.emadl.generator.EMADLGenerator.generateSubComponents(EMADLGenerator.java:636)
at de.monticore.lang.monticar.emadl.generator.EMADLGenerator.generateComponent(EMADLGenerator.java:549)
at de.monticore.lang.monticar.emadl.generator.EMADLGenerator.generateSubComponents(EMADLGenerator.java:648)
at de.monticore.lang.monticar.emadl.generator.EMADLGenerator.generateComponent(EMADLGenerator.java:549)
at de.monticore.lang.monticar.emadl.generator.EMADLGenerator.generateStrings(EMADLGenerator.java:395)
at de.monticore.lang.monticar.emadl.generator.EMADLGenerator.generateFiles(EMADLGenerator.java:219)
at de.monticore.lang.monticar.emadl.generator.EMADLGenerator.generate(EMADLGenerator.java:125)
at de.monticore.lang.monticar.emadl.generator.EMADLGeneratorCli.runGenerator(EMADLGeneratorCli.java:148)
at de.monticore.lang.monticar.emadl.generator.EMADLGeneratorCli.main(EMADLGeneratorCli.java:72)
```
Changing variablenames etc. does not work either. For building I am using version 0.4.3 of the generatorEvgeny KusmenkoEvgeny Kusmenkohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/28link to docker files not working2021-11-10T11:05:51+01:00Jonas Ritzlink to docker files not workingThe link to the docker files in the first line of subsection Prerequisites in readme.md does not seem to work properly. (404)The link to the docker files in the first line of subsection Prerequisites in readme.md does not seem to work properly. (404)https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/27Data loader Target code updaten2021-11-19T14:58:24+01:00Evgeny KusmenkoData loader Target code updatenPaul SchlackPaul Schlackhttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/35Generation Test fails2022-07-08T15:51:43+02:00Evgeny KusmenkoGeneration Test fails@nils_baumann the generation test fails in master, please fix the expected target code@nils_baumann the generation test fails in master, please fix the expected target codeNils BaumannNils Baumannhttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/34MXNet Docker Build fails2022-07-08T15:52:15+02:00Evgeny KusmenkoMXNet Docker Build failsEvgeny KusmenkoEvgeny Kusmenkohttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/44Custom Layers2022-08-31T14:53:38+02:00Evgeny KusmenkoCustom LayersPlease implement custom layers for the PyTorch backendPlease implement custom layers for the PyTorch backendSonam Raju ChughSonam Raju Chugh2022-08-24https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/41Implement LoadNetwork layer for PyTorch backend2022-10-11T11:19:12+02:00Evgeny KusmenkoImplement LoadNetwork layer for PyTorch backendSonam Raju ChughSonam Raju Chugh2022-09-22https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/40Execution Order2022-10-11T11:24:01+02:00Evgeny KusmenkoExecution OrderUse Execution Semantics to determine the correct order of the component executionUse Execution Semantics to determine the correct order of the component executionFeras MulhemFeras Mulhem2022-10-05