cpetig / tflite_micro_compiler

generate tflite micro code which bypasses the interpreter (directly calls into kernels)
Apache License 2.0
77 stars 26 forks source link

Add comments to help debugging/understanding the generated code (was: Annotations missing in devel) #5

Open cpetig opened 4 years ago

cpetig commented 4 years ago

in devel the comments are gone (which inputs and outputs are used for each invoke call), also it is no longer visible which operation is called (fix by defining and using an enum into g_registration)

rafzi commented 4 years ago

Wouldn't these changes conflict with the vision of having loops instead of linear code?

cpetig commented 4 years ago

Good point. I will probably need to put them into a different place (e.g. annotations on the arrays instead of on the code (which will probably be gone soon))

cpetig commented 4 years ago

Related to #13

cpetig commented 4 years ago

After implementing the reworked code I can only envision a comment with pseudo-code describing the network in human readable form: E.g. / Inputs 10 (1,1) 0: 1 = QUANTIZE(10) 1: 4 = FULLY_CONNECTED(1,2,3) 2: 7 = FULLY_CONNECTED(4,5,6) 3: 0 = FULLY_CONNECTED(7,8,9) 4: 11 = DEQUANTIZE(0) Outputs 11 (1.1) / Do you think that this adds value to the generated file?

rafzi commented 4 years ago

Since the comment would be generated, I don't see any downside. It can only help with debugging!