In this example,
connect< window<128> , window<192,32> > net0 ( kernel0.out , kernel1.in );
kernel0writes 128 bytes and
kernel1expects that 192 bytes will be written to the memory, which causes an erroneous result. To prevent this, the AI Engine compiler performs an automatic multi-rate analysis. In this case, the AI Engine compiler will specify that
kernel1should run twice while
kernel0will run three times.
aiecompilercommand. In that case, you must specify the repetition count for these kernels in the graph:
repetition_count(kernel0) = 3; repetition_count(kernel1) = 2;
connect< window<128> , window<64> > net0 ( kernel0.out , kernel1.in ); connect< window<128> , window<192> > net0 ( kernel0.out , kernel2.in );
In this example, the AI Engine compiler automatically detects that
kernel2 should run twice,
kernel0 should run 3 times, and
kernel1 should run 6 times for one graph iteration,
graph.run(1). These repetition counts can also be
specified manually in the graph.