This feature allows you to dump and inspect data traffic at kernel ports with data types. Examine how this feature is helpful.
Open the
src/kernels/data_shuffle.cc
file in the AI Engine component, and comment out the lineif(remainder == 0)
.Build the project, open the
$(COMPONENT_NAME)/Output/x86sim/Work/options/x86sim.options
file, and update the dump feature fromno
toyes
.Select the Run option under X86SIMULATION in Flow navigator.
Once the simulation is completed, you can observe the following messages in the console.
Processing './x86simulator_output/dump/x86sim_dump.data' File Port direction Port type Data type Kernel or platform port --------------------- -------------- --------- --------- ----------------------- mygraph_in_out_0.txt out iobuffer int32 mygraph.in.out[0] mygraph_p_d_in_0.txt in iobuffer int32 mygraph.p_d.in[0] mygraph_u_s_out_0.txt out iobuffer float mygraph.u_s.out[0] mygraph_out0_in_0.txt in iobuffer float mygraph.out0.in[0] mygraph_d_s_out_0.txt out iobuffer int32 mygraph.d_s.out[0] mygraph_out1_in_0.txt in iobuffer int32 mygraph.out1.in[0] mygraph_p_d_out_2.txt out iobuffer float mygraph.p_d.out[2] mygraph_u_s_in_0.txt in iobuffer float mygraph.u_s.in[0] mygraph_u_s_in_1.txt in stream int32 mygraph.u_s.in[1] mygraph_d_s_in_1.txt in stream int32 mygraph.d_s.in[1] mygraph_p_d_out_1.txt out stream int32 mygraph.p_d.out[1] mygraph_p_d_out_0.txt out iobuffer int32 mygraph.p_d.out[0] mygraph_d_s_in_0.txt in iobuffer int32 mygraph.d_s.in[0] Wrote './x86simulator_output/dump/mygraph_in_out_0.txt' Wrote './x86simulator_output/dump/mygraph_p_d_in_0.txt' Wrote './x86simulator_output/dump/mygraph_u_s_out_0.txt' Wrote './x86simulator_output/dump/mygraph_out0_in_0.txt' Wrote './x86simulator_output/dump/mygraph_d_s_out_0.txt' Wrote './x86simulator_output/dump/mygraph_out1_in_0.txt' Wrote './x86simulator_output/dump/mygraph_p_d_out_2.txt' Wrote './x86simulator_output/dump/mygraph_u_s_in_0.txt' Wrote './x86simulator_output/dump/mygraph_u_s_in_1.txt' Wrote './x86simulator_output/dump/mygraph_d_s_in_1.txt' Wrote './x86simulator_output/dump/mygraph_p_d_out_1.txt' Wrote './x86simulator_output/dump/mygraph_p_d_out_0.txt' Wrote './x86simulator_output/dump/mygraph_d_s_in_0.txt' Simulation completed successfully returning zero
Observe that one text file per each port of each kernel is generated using the --dump
feature and the filenames are in the format of <graph-name>_<sub-graph-class-name>_<sub-graph-instance-name>_<kernel-index>_[in]/[out]_index.txt
for graph input/output files.
Open the
$(COMPONENT_NAME)/Output/x86sim/x86simulator_output/dump/mygraph_in_out_0.txt
file, and note theIteration
andsnapshot
values recorded in that file. This matches with the dimensions (buffer size) specified in the graph code per iteration.Similarly, you can open the input/output of all the kernels in a graph, and observe the intermediate outputs as well as the interface ports.