7 #include <server/include/timelineDecoder/TimelineCaptureCommandHandler.hpp> 8 #include <server/include/timelineDecoder/TimelineDecoder.hpp> 11 #include <boost/test/test_tools.hpp> 12 #include <boost/test/unit_test_suite.hpp> 18 using namespace armnn;
19 using namespace timelinedecoder;
26 arm::pipe::ITimelineDecoder::Label name;
27 name.m_Guid = uint64_t(10420554295983197538U);
31 arm::pipe::ITimelineDecoder::Label type;
32 type.m_Guid = uint64_t(14196220359693045352U);
36 arm::pipe::ITimelineDecoder::Label index;
37 index.m_Guid = uint64_t(13922236767355949814U);
38 index.m_Name =
"index";
41 arm::pipe::ITimelineDecoder::Label backendId;
42 backendId.m_Guid = uint64_t(10874037804557439415U);
43 backendId.m_Name =
"backendId";
46 arm::pipe::ITimelineDecoder::Label layer;
47 layer.m_Guid = uint64_t(14761340794127440397U);
48 layer.m_Name =
"layer";
51 arm::pipe::ITimelineDecoder::Label workload;
52 workload.m_Guid = uint64_t(15704252740552608110U);
53 workload.m_Name =
"workload";
56 arm::pipe::ITimelineDecoder::Label network;
57 network.m_Guid = uint64_t(16862199137063532871U);
58 network.m_Name =
"network";
61 arm::pipe::ITimelineDecoder::Label connection;
62 connection.m_Guid = uint64_t(15733717748792475675U);
63 connection.m_Name =
"connection";
66 arm::pipe::ITimelineDecoder::Label inference;
67 inference.m_Guid = uint64_t(15026600058430441282U);
68 inference.m_Name =
"inference";
71 arm::pipe::ITimelineDecoder::Label workload_execution;
72 workload_execution.m_Guid = uint64_t(10172155312650606003U);
73 workload_execution.m_Name =
"workload_execution";
76 arm::pipe::ITimelineDecoder::EventClass eventClass1;
77 eventClass1.m_Guid = uint64_t(17170418158534996719U);
80 arm::pipe::ITimelineDecoder::EventClass eventClass2;
81 eventClass2.m_Guid = uint64_t(10812061579584851344U);
84 arm::pipe::ITimelineDecoder::Entity entity6;
85 entity6.m_Guid = uint64_t(6);
88 arm::pipe::ITimelineDecoder::Relationship relationship7;
89 relationship7.m_Guid = uint64_t(7);
90 relationship7.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
91 relationship7.m_HeadGuid = uint64_t(6);
92 relationship7.m_TailGuid = uint64_t(16862199137063532871U);
95 arm::pipe::ITimelineDecoder::Relationship relationship8;
96 relationship8.m_Guid = uint64_t(8);
97 relationship8.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
98 relationship8.m_HeadGuid = uint64_t(7);
99 relationship8.m_TailGuid = uint64_t(14196220359693045352U);
103 arm::pipe::ITimelineDecoder::Entity entity0;
104 entity0.m_Guid = uint64_t(0);
107 arm::pipe::ITimelineDecoder::Label input;
108 input.m_Guid = uint64_t(18179123836411086572U);
109 input.m_Name =
"input";
112 arm::pipe::ITimelineDecoder::Relationship relationship9;
113 relationship9.m_Guid = uint64_t(9);
114 relationship9.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
115 relationship9.m_HeadGuid = uint64_t(0);
116 relationship9.m_TailGuid = uint64_t(18179123836411086572U);
119 arm::pipe::ITimelineDecoder::Relationship relationship10;
120 relationship10.m_Guid = uint64_t(10);
121 relationship10.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
122 relationship10.m_HeadGuid = uint64_t(9);
123 relationship10.m_TailGuid = uint64_t(10420554295983197538U);
126 arm::pipe::ITimelineDecoder::Relationship relationship11;
127 relationship11.m_Guid = uint64_t(11);
128 relationship11.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
129 relationship11.m_HeadGuid = uint64_t(0);
130 relationship11.m_TailGuid = uint64_t(14761340794127440397U);
133 arm::pipe::ITimelineDecoder::Relationship relationship12;
134 relationship12.m_Guid = uint64_t(12);
135 relationship12.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
136 relationship12.m_HeadGuid = uint64_t(11);
137 relationship12.m_TailGuid = uint64_t(14196220359693045352U);
140 arm::pipe::ITimelineDecoder::Relationship relationship13;
141 relationship13.m_Guid = uint64_t(13);
142 relationship13.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::RetentionLink;
143 relationship13.m_HeadGuid = uint64_t(6);
144 relationship13.m_TailGuid = uint64_t(0);
149 arm::pipe::ITimelineDecoder::Entity entity1;
150 entity1.m_Guid = uint64_t(1);
153 arm::pipe::ITimelineDecoder::Label normalization;
154 normalization.m_Guid = uint64_t(15955949569988957863U);
155 normalization.m_Name =
"normalization";
158 arm::pipe::ITimelineDecoder::Relationship relationship14;
159 relationship14.m_Guid = uint64_t(14);
160 relationship14.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
161 relationship14.m_HeadGuid = uint64_t(1);
162 relationship14.m_TailGuid = uint64_t(15955949569988957863U);
165 arm::pipe::ITimelineDecoder::Relationship relationship15;
166 relationship15.m_Guid = uint64_t(15);
167 relationship15.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
168 relationship15.m_HeadGuid = uint64_t(14);
169 relationship15.m_TailGuid = uint64_t(10420554295983197538U);
172 arm::pipe::ITimelineDecoder::Relationship relationship16;
173 relationship16.m_Guid = uint64_t(16);
174 relationship16.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
175 relationship16.m_HeadGuid = uint64_t(1);
176 relationship16.m_TailGuid = uint64_t(14761340794127440397U);
179 arm::pipe::ITimelineDecoder::Relationship relationship17;
180 relationship17.m_Guid = uint64_t(17);
181 relationship17.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
182 relationship17.m_HeadGuid = uint64_t(16);
183 relationship17.m_TailGuid = uint64_t(14196220359693045352U);
186 arm::pipe::ITimelineDecoder::Relationship relationship18;
187 relationship18.m_Guid = uint64_t(18);
188 relationship18.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::RetentionLink;
189 relationship18.m_HeadGuid = uint64_t(6);
190 relationship18.m_TailGuid = uint64_t(1);
193 arm::pipe::ITimelineDecoder::Relationship relationship19;
194 relationship19.m_Guid = uint64_t(19);
195 relationship19.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::RetentionLink;
196 relationship19.m_HeadGuid = uint64_t(0);
197 relationship19.m_TailGuid = uint64_t(1);
200 arm::pipe::ITimelineDecoder::Relationship relationship20;
201 relationship20.m_Guid = uint64_t(20);
202 relationship20.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
203 relationship20.m_HeadGuid = uint64_t(19);
204 relationship20.m_TailGuid = uint64_t(15733717748792475675U);
207 arm::pipe::ITimelineDecoder::Relationship relationship21;
208 relationship21.m_Guid = uint64_t(21);
209 relationship21.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
210 relationship21.m_HeadGuid = uint64_t(20);
211 relationship21.m_TailGuid = uint64_t(14196220359693045352U);
215 arm::pipe::ITimelineDecoder::Entity entity22;
216 entity22.m_Guid = uint64_t(22);
219 arm::pipe::ITimelineDecoder::Relationship relationship23;
220 relationship23.m_Guid = uint64_t(23);
221 relationship23.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
222 relationship23.m_HeadGuid = uint64_t(22);
223 relationship23.m_TailGuid = uint64_t(15704252740552608110U);
226 arm::pipe::ITimelineDecoder::Relationship relationship24;
227 relationship24.m_Guid = uint64_t(24);
228 relationship24.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
229 relationship24.m_HeadGuid = uint64_t(23);
230 relationship24.m_TailGuid = uint64_t(14196220359693045352U);
234 arm::pipe::ITimelineDecoder::Label
CpuRef;
235 CpuRef.m_Guid = uint64_t(9690680943817437852U);
236 CpuRef.m_Name =
"CpuRef";
240 arm::pipe::ITimelineDecoder::Relationship relationship25;
241 relationship25.m_Guid = uint64_t(25);
242 relationship25.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
243 relationship25.m_HeadGuid = uint64_t(22);
244 relationship25.m_TailGuid = uint64_t(9690680943817437852U);
247 arm::pipe::ITimelineDecoder::Relationship relationship26;
248 relationship26.m_Guid = uint64_t(26);
249 relationship26.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
250 relationship26.m_HeadGuid = uint64_t(25);
251 relationship26.m_TailGuid = uint64_t(10874037804557439415U);
254 arm::pipe::ITimelineDecoder::Relationship relationship27;
255 relationship27.m_Guid = uint64_t(27);
256 relationship27.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::RetentionLink ;
257 relationship27.m_HeadGuid = uint64_t(1);
258 relationship27.m_TailGuid = uint64_t(22);
262 arm::pipe::ITimelineDecoder::Entity entity2;
263 entity2.m_Guid = uint64_t(2);
266 arm::pipe::ITimelineDecoder::Label output;
267 output.m_Guid = uint64_t(18419179028513879730U);
268 output.m_Name =
"output";
271 arm::pipe::ITimelineDecoder::Relationship relationship28;
272 relationship28.m_Guid = uint64_t(28);
273 relationship28.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
274 relationship28.m_HeadGuid = uint64_t(2);
275 relationship28.m_TailGuid = uint64_t(18419179028513879730U);
278 arm::pipe::ITimelineDecoder::Relationship relationship29;
279 relationship29.m_Guid = uint64_t(29);
280 relationship29.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
281 relationship29.m_HeadGuid = uint64_t(28);
282 relationship29.m_TailGuid = uint64_t(10420554295983197538U);
285 arm::pipe::ITimelineDecoder::Relationship relationship30;
286 relationship30.m_Guid = uint64_t(30);
287 relationship30.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
288 relationship30.m_HeadGuid = uint64_t(2);
289 relationship30.m_TailGuid = uint64_t(14761340794127440397U);
292 arm::pipe::ITimelineDecoder::Relationship relationship31;
293 relationship31.m_Guid = uint64_t(31);
294 relationship31.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
295 relationship31.m_HeadGuid = uint64_t(30);
296 relationship31.m_TailGuid = uint64_t(14196220359693045352U);
299 arm::pipe::ITimelineDecoder::Relationship relationship32;
300 relationship32.m_Guid = uint64_t(32);
301 relationship32.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::RetentionLink;
302 relationship32.m_HeadGuid = uint64_t(6);
303 relationship32.m_TailGuid = uint64_t(2);
306 arm::pipe::ITimelineDecoder::Relationship relationship33;
307 relationship33.m_Guid = uint64_t(33);
308 relationship33.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::RetentionLink;
309 relationship33.m_HeadGuid = uint64_t(1);
310 relationship33.m_TailGuid = uint64_t(2);
313 arm::pipe::ITimelineDecoder::Relationship relationship34;
314 relationship34.m_Guid = uint64_t(34);
315 relationship34.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
316 relationship34.m_HeadGuid = uint64_t(33);
317 relationship34.m_TailGuid = uint64_t(15733717748792475675U);
320 arm::pipe::ITimelineDecoder::Relationship relationship35;
321 relationship35.m_Guid = uint64_t(35);
322 relationship35.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
323 relationship35.m_HeadGuid = uint64_t(34);
324 relationship35.m_TailGuid = uint64_t(14196220359693045352U);
328 arm::pipe::ITimelineDecoder::Entity entity36;
329 entity36.m_Guid = uint64_t(36);
332 arm::pipe::ITimelineDecoder::Relationship relationship37;
333 relationship37.m_Guid = uint64_t(37);
334 relationship37.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
335 relationship37.m_HeadGuid = uint64_t(36);
336 relationship37.m_TailGuid = uint64_t(15704252740552608110U);
339 arm::pipe::ITimelineDecoder::Relationship relationship38;
340 relationship38.m_Guid = uint64_t(38);
341 relationship38.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
342 relationship38.m_HeadGuid = uint64_t(37);
343 relationship38.m_TailGuid = uint64_t(14196220359693045352U);
346 arm::pipe::ITimelineDecoder::Relationship relationship39;
347 relationship39.m_Guid = uint64_t(39);
348 relationship39.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
349 relationship39.m_HeadGuid = uint64_t(36);
350 relationship39.m_TailGuid = uint64_t(9690680943817437852U);
353 arm::pipe::ITimelineDecoder::Relationship relationship40;
354 relationship40.m_Guid = uint64_t(40);
355 relationship40.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
356 relationship40.m_HeadGuid = uint64_t(39);
357 relationship40.m_TailGuid = uint64_t(10874037804557439415U);
360 arm::pipe::ITimelineDecoder::Relationship relationship41;
361 relationship41.m_Guid = uint64_t(41);
362 relationship41.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::RetentionLink;
363 relationship41.m_HeadGuid = uint64_t(0);
364 relationship41.m_TailGuid = uint64_t(36);
368 arm::pipe::ITimelineDecoder::Entity entity42;
369 entity42.m_Guid = uint64_t(42);
372 arm::pipe::ITimelineDecoder::Relationship relationship43;
373 relationship43.m_Guid = uint64_t(43);
374 relationship43.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
375 relationship43.m_HeadGuid = uint64_t(42);
376 relationship43.m_TailGuid = uint64_t(15704252740552608110U);
379 arm::pipe::ITimelineDecoder::Relationship relationship44;
380 relationship44.m_Guid = uint64_t(44);
381 relationship44.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
382 relationship44.m_HeadGuid = uint64_t(43);
383 relationship44.m_TailGuid = uint64_t(14196220359693045352U);
386 arm::pipe::ITimelineDecoder::Relationship relationship45;
387 relationship45.m_Guid = uint64_t(45);
388 relationship45.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
389 relationship45.m_HeadGuid = uint64_t(42);
390 relationship45.m_TailGuid = uint64_t(9690680943817437852U);
393 arm::pipe::ITimelineDecoder::Relationship relationship46;
394 relationship46.m_Guid = uint64_t(46);
395 relationship46.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
396 relationship46.m_HeadGuid = uint64_t(45);
397 relationship46.m_TailGuid = uint64_t(10874037804557439415U);
400 arm::pipe::ITimelineDecoder::Relationship relationship47;
401 relationship47.m_Guid = uint64_t(47);
402 relationship47.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::RetentionLink;
403 relationship47.m_HeadGuid = uint64_t(2);
404 relationship47.m_TailGuid = uint64_t(42);
407 arm::pipe::ITimelineDecoder::Entity entity48;
408 entity48.m_Guid = uint64_t(48);
411 arm::pipe::ITimelineDecoder::Relationship relationship49;
412 relationship49.m_Guid = uint64_t(49);
413 relationship49.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
414 relationship49.m_HeadGuid = uint64_t(48);
415 relationship49.m_TailGuid = uint64_t(15026600058430441282U);
418 arm::pipe::ITimelineDecoder::Relationship relationship50;
419 relationship50.m_Guid = uint64_t(50);
420 relationship50.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
421 relationship50.m_HeadGuid = uint64_t(49);
422 relationship50.m_TailGuid = uint64_t(14196220359693045352U);
425 arm::pipe::ITimelineDecoder::Relationship relationship51;
426 relationship51.m_Guid = uint64_t(51);
427 relationship51.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::RetentionLink;
428 relationship51.m_HeadGuid = uint64_t(6);
429 relationship51.m_TailGuid = uint64_t(48);
432 arm::pipe::ITimelineDecoder::Relationship relationship53;
433 relationship53.m_Guid = uint64_t(53);
434 relationship53.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::DataLink;
435 relationship53.m_HeadGuid = uint64_t(48);
436 relationship53.m_TailGuid = uint64_t(52);
439 arm::pipe::ITimelineDecoder::Relationship relationship54;
440 relationship54.m_Guid = uint64_t(54);
441 relationship54.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::ExecutionLink;
442 relationship54.m_HeadGuid = uint64_t(52);
443 relationship54.m_TailGuid = uint64_t(17170418158534996719U);
447 arm::pipe::ITimelineDecoder::Entity entity55;
448 entity55.m_Guid = uint64_t(55);
451 arm::pipe::ITimelineDecoder::Relationship relationship56;
452 relationship56.m_Guid = uint64_t(56);
453 relationship56.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
454 relationship56.m_HeadGuid = uint64_t(55);
455 relationship56.m_TailGuid = uint64_t(10172155312650606003U);
458 arm::pipe::ITimelineDecoder::Relationship relationship57;
459 relationship57.m_Guid = uint64_t(57);
460 relationship57.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
461 relationship57.m_HeadGuid = uint64_t(56);
462 relationship57.m_TailGuid = uint64_t(14196220359693045352U);
465 arm::pipe::ITimelineDecoder::Relationship relationship58;
466 relationship58.m_Guid = uint64_t(58);
467 relationship58.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::RetentionLink;
468 relationship58.m_HeadGuid = uint64_t(48);
469 relationship58.m_TailGuid = uint64_t(55);
472 arm::pipe::ITimelineDecoder::Relationship relationship59;
473 relationship59.m_Guid = uint64_t(59);
474 relationship59.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::RetentionLink;
475 relationship59.m_HeadGuid = uint64_t(36);
476 relationship59.m_TailGuid = uint64_t(55);
479 arm::pipe::ITimelineDecoder::Event event60;
480 event60.m_Guid = uint64_t(60);
481 event60.m_TimeStamp = uint64_t(96557081111036);
482 event60.m_ThreadId = uint64_t(140522431862592);
485 arm::pipe::ITimelineDecoder::Relationship relationship61;
486 relationship61.m_Guid = uint64_t(61);
487 relationship61.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::ExecutionLink;
488 relationship61.m_HeadGuid = uint64_t(55);
489 relationship61.m_TailGuid = uint64_t(60);
492 arm::pipe::ITimelineDecoder::Relationship relationship62;
493 relationship62.m_Guid = uint64_t(62);
494 relationship62.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::DataLink;
495 relationship62.m_HeadGuid = uint64_t(60);
496 relationship62.m_TailGuid = uint64_t(17170418158534996719U);
499 arm::pipe::ITimelineDecoder::Event event63;
500 event63.m_Guid = uint64_t(63);
501 event63.m_TimeStamp = uint64_t(96557081149730);
502 event63.m_ThreadId = uint64_t(140522431862592);
505 arm::pipe::ITimelineDecoder::Relationship relationship64;
506 relationship64.m_Guid = uint64_t(61);
507 relationship64.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::ExecutionLink;
508 relationship64.m_HeadGuid = uint64_t(55);
509 relationship64.m_TailGuid = uint64_t(63);
512 arm::pipe::ITimelineDecoder::Relationship relationship65;
513 relationship65.m_Guid = uint64_t(62);
514 relationship65.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::DataLink;
515 relationship65.m_HeadGuid = uint64_t(63);
516 relationship65.m_TailGuid = uint64_t(10812061579584851344U);
520 arm::pipe::ITimelineDecoder::Entity entity66;
521 entity66.m_Guid = uint64_t(66);
524 arm::pipe::ITimelineDecoder::Relationship relationship67;
525 relationship67.m_Guid = uint64_t(67);
526 relationship67.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
527 relationship67.m_HeadGuid = uint64_t(66);
528 relationship67.m_TailGuid = uint64_t(10172155312650606003U);
531 arm::pipe::ITimelineDecoder::Relationship relationship68;
532 relationship68.m_Guid = uint64_t(68);
533 relationship68.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
534 relationship68.m_HeadGuid = uint64_t(67);
535 relationship68.m_TailGuid = uint64_t(14196220359693045352U);
538 arm::pipe::ITimelineDecoder::Relationship relationship69;
539 relationship69.m_Guid = uint64_t(69);
540 relationship69.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::RetentionLink;
541 relationship69.m_HeadGuid = uint64_t(48);
542 relationship69.m_TailGuid = uint64_t(66);
545 arm::pipe::ITimelineDecoder::Relationship relationship70;
546 relationship70.m_Guid = uint64_t(70);
547 relationship70.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::RetentionLink;
548 relationship70.m_HeadGuid = uint64_t(22);
549 relationship70.m_TailGuid = uint64_t(66);
553 arm::pipe::ITimelineDecoder::Event event71;
554 event71.m_Guid = uint64_t(71);
555 event71.m_TimeStamp = uint64_t(96557081156464);
556 event71.m_ThreadId = uint64_t(140522431862592);
559 arm::pipe::ITimelineDecoder::Relationship relationship72;
560 relationship72.m_Guid = uint64_t(72);
561 relationship72.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::ExecutionLink;
562 relationship72.m_HeadGuid = uint64_t(66);
563 relationship72.m_TailGuid = uint64_t(71);
566 arm::pipe::ITimelineDecoder::Relationship relationship73;
567 relationship73.m_Guid = uint64_t(73);
568 relationship73.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::DataLink;
569 relationship73.m_HeadGuid = uint64_t(71);
570 relationship73.m_TailGuid = uint64_t(17170418158534996719U);
573 arm::pipe::ITimelineDecoder::Event event74;
574 event74.m_Guid = uint64_t(74);
575 event74.m_TimeStamp = uint64_t(96557081220825);
576 event74.m_ThreadId = uint64_t(140522431862592);
579 arm::pipe::ITimelineDecoder::Relationship relationship75;
580 relationship75.m_Guid = uint64_t(75);
581 relationship75.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::ExecutionLink;
582 relationship75.m_HeadGuid = uint64_t(66);
583 relationship75.m_TailGuid = uint64_t(74);
586 arm::pipe::ITimelineDecoder::Relationship relationship76;
587 relationship76.m_Guid = uint64_t(76);
588 relationship76.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::DataLink;
589 relationship76.m_HeadGuid = uint64_t(74);
590 relationship76.m_TailGuid = uint64_t(10812061579584851344U);
593 arm::pipe::ITimelineDecoder::Entity entity77;
594 entity77.m_Guid = uint64_t(77);
597 arm::pipe::ITimelineDecoder::Relationship relationship78;
598 relationship78.m_Guid = uint64_t(78);
599 relationship78.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
600 relationship78.m_HeadGuid = uint64_t(77);
601 relationship78.m_TailGuid = uint64_t(10172155312650606003U);
604 arm::pipe::ITimelineDecoder::Relationship relationship79;
605 relationship79.m_Guid = uint64_t(79);
606 relationship79.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::LabelLink;
607 relationship79.m_HeadGuid = uint64_t(78);
608 relationship79.m_TailGuid = uint64_t(14196220359693045352U);
611 arm::pipe::ITimelineDecoder::Relationship relationship80;
612 relationship80.m_Guid = uint64_t(80);
613 relationship80.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::RetentionLink;
614 relationship80.m_HeadGuid = uint64_t(48);
615 relationship80.m_TailGuid = uint64_t(77);
618 arm::pipe::ITimelineDecoder::Relationship relationship81;
619 relationship81.m_Guid = uint64_t(81);
620 relationship81.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::RetentionLink;
621 relationship81.m_HeadGuid = uint64_t(42);
622 relationship81.m_TailGuid = uint64_t(77);
625 arm::pipe::ITimelineDecoder::Event event82;
626 event82.m_Guid = uint64_t(82);
627 event82.m_TimeStamp = uint64_t(96557081227643);
628 event82.m_ThreadId = uint64_t(140522431862592);
631 arm::pipe::ITimelineDecoder::Relationship relationship83;
632 relationship83.m_Guid = uint64_t(83);
633 relationship83.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::ExecutionLink;
634 relationship83.m_HeadGuid = uint64_t(77);
635 relationship83.m_TailGuid = uint64_t(82);
638 arm::pipe::ITimelineDecoder::Relationship relationship84;
639 relationship84.m_Guid = uint64_t(84);
640 relationship84.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::DataLink;
641 relationship84.m_HeadGuid = uint64_t(82);
642 relationship84.m_TailGuid = uint64_t(17170418158534996719U);
645 arm::pipe::ITimelineDecoder::Event event85;
646 event85.m_Guid = uint64_t(85);
647 event85.m_TimeStamp = uint64_t(96557081240332);
648 event85.m_ThreadId = uint64_t(140522431862592);
651 arm::pipe::ITimelineDecoder::Relationship relationship86;
652 relationship86.m_Guid = uint64_t(86);
653 relationship86.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::ExecutionLink;
654 relationship86.m_HeadGuid = uint64_t(77);
655 relationship86.m_TailGuid = uint64_t(85);
658 arm::pipe::ITimelineDecoder::Relationship relationship87;
659 relationship87.m_Guid = uint64_t(87);
660 relationship87.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::DataLink;
661 relationship87.m_HeadGuid = uint64_t(85);
662 relationship87.m_TailGuid = uint64_t(10812061579584851344U);
665 arm::pipe::ITimelineDecoder::Event event88;
666 event88.m_Guid = uint64_t(88);
667 event88.m_TimeStamp = uint64_t(96557081243146);
668 event88.m_ThreadId = uint64_t(140522431862592);
671 arm::pipe::ITimelineDecoder::Relationship relationship89;
672 relationship89.m_Guid = uint64_t(89);
673 relationship89.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::ExecutionLink;
674 relationship89.m_HeadGuid = uint64_t(48);
675 relationship89.m_TailGuid = uint64_t(88);
678 arm::pipe::ITimelineDecoder::Relationship relationship90;
679 relationship90.m_Guid = uint64_t(90);
680 relationship90.m_RelationshipType = arm::pipe::ITimelineDecoder::RelationshipType::DataLink;
681 relationship90.m_HeadGuid = uint64_t(88);
682 relationship90.m_TailGuid = uint64_t(10812061579584851344U);
694 BOOST_CHECK(rootEntity.childEntities.size() == 4);
698 BOOST_CHECK(entity0.GetName() ==
"input");
699 BOOST_CHECK(entity0.GetType() ==
"layer");
701 BOOST_CHECK(entity0.childEntities.size() == 1);
703 BOOST_CHECK(input_workload_entity.childEntities.size() == 1);
704 BOOST_CHECK(input_workload_entity.GetType() ==
"workload");
705 BOOST_CHECK(input_workload_entity.extendedData.at(
"backendId") ==
"CpuRef");
708 .at(input_workload_entity.childEntities[0]);
709 BOOST_CHECK(input_workload_execution_entity.childEntities.size() == 2);
710 BOOST_CHECK(input_workload_execution_entity.GetType() ==
"workload_execution");
713 .at(input_workload_execution_entity.childEntities[0]);
714 BOOST_CHECK(input_workload_execution_event0.GetType() ==
"Event");
715 BOOST_CHECK(input_workload_execution_event0.childEntities.size() == 0);
716 BOOST_CHECK(model.
events.at(input_workload_execution_event0.GetGuid()).m_ThreadId > uint64_t(0));
717 BOOST_CHECK(model.
events.at(input_workload_execution_event0.GetGuid()).m_TimeStamp > uint64_t(0));
720 .at(input_workload_execution_entity.childEntities[1]);
721 BOOST_CHECK(input_workload_execution_event0.GetType() ==
"Event");
722 BOOST_CHECK(input_workload_execution_event1.childEntities.size() == 0);
723 BOOST_CHECK(model.
events.at(input_workload_execution_event1.GetGuid()).m_ThreadId > uint64_t(0));
724 BOOST_CHECK(model.
events.at(input_workload_execution_event1.GetGuid()).m_TimeStamp > uint64_t(0));
728 BOOST_CHECK(entity1.GetName() ==
"normalization");
729 BOOST_CHECK(entity1.GetType() ==
"layer");
732 .at(entity1.childEntities[0]);
733 BOOST_CHECK(normalization_workload_entity.GetType() ==
"workload");
734 BOOST_CHECK(normalization_workload_entity.extendedData.at(
"backendId") ==
"CpuRef");
737 .at(normalization_workload_entity.childEntities[0]);
738 BOOST_CHECK(normalization_workload_execution_entity.GetType() ==
"workload_execution");
741 .at(normalization_workload_execution_entity.childEntities[0]);
742 BOOST_CHECK(normalization_workload_execution_event0.GetType() ==
"Event");
743 BOOST_CHECK(model.
events.at(normalization_workload_execution_event0.GetGuid()).m_ThreadId > uint64_t(0));
744 BOOST_CHECK(model.
events.at(normalization_workload_execution_event0.GetGuid()).m_TimeStamp > uint64_t(0));
747 .at(normalization_workload_execution_entity.childEntities[1]);
748 BOOST_CHECK(normalization_workload_execution_event1.GetType() ==
"Event");
749 BOOST_CHECK(model.
events.at(normalization_workload_execution_event1.GetGuid()).m_ThreadId > uint64_t(0));
750 BOOST_CHECK(model.
events.at(normalization_workload_execution_event1.GetGuid()).m_TimeStamp > uint64_t(0));
754 BOOST_CHECK(entity2.GetName() ==
"output");
755 BOOST_CHECK(entity2.GetType() ==
"layer");
758 BOOST_CHECK(output_workload_entity.GetType() ==
"workload");
759 BOOST_CHECK(output_workload_entity.extendedData.at(
"backendId") ==
"CpuRef");
762 .at(output_workload_entity.childEntities[0]);
763 BOOST_CHECK(output_workload_execution_entity.GetType() ==
"workload_execution");
766 .at(output_workload_execution_entity.childEntities[0]);
767 BOOST_CHECK(output_workload_execution_event0.GetType() ==
"Event");
768 BOOST_CHECK(model.
events.at(output_workload_execution_event0.GetGuid()).m_ThreadId > uint64_t(0));
769 BOOST_CHECK(model.
events.at(output_workload_execution_event0.GetGuid()).m_TimeStamp > uint64_t(0));
772 .at(output_workload_execution_entity.childEntities[1]);
773 BOOST_CHECK(output_workload_execution_event1.GetType() ==
"Event");
774 BOOST_CHECK(model.
events.at(output_workload_execution_event1.GetGuid()).m_ThreadId > uint64_t(0));
775 BOOST_CHECK(model.
events.at(output_workload_execution_event1.GetGuid()).m_TimeStamp > uint64_t(0));
778 BOOST_CHECK(entity48.GetName() ==
"");
779 BOOST_CHECK(entity48.GetType() ==
"inference");
790 std::string jsonString = timelineDecoder.
GetJSONString(rootEntity);
791 BOOST_CHECK(jsonString !=
"");
792 BOOST_CHECK(jsonString.find(
"input_0: {")!=std::string::npos);
793 BOOST_CHECK(jsonString.find(
"type: Measurement,\n" 794 "\t\t\tbackendId :CpuRef,")!=std::string::npos);
795 BOOST_CHECK(jsonString.find(
"normalization_2: {")!=std::string::npos);
796 BOOST_CHECK(jsonString.find(
"output_4: {")!=std::string::npos);
801 std::ofstream ofs{tempFile};
803 timelineDecoder.
PrintJSON(rootEntity, ofs);
810 inFile.open(tempFile);
812 std::stringstream strStream;
813 strStream << inFile.rdbuf();
815 std::string outfileJson = strStream.str();
817 BOOST_CHECK(outfileJson !=
"");
818 BOOST_CHECK(outfileJson.find(
"input_0: {")!=std::string::npos);
819 BOOST_CHECK(outfileJson.find(
"type: Measurement,\n" 820 "\t\t\tbackendId :CpuRef,")!=std::string::npos);
821 BOOST_CHECK(outfileJson.find(
"normalization_2: {")!=std::string::npos);
822 BOOST_CHECK(outfileJson.find(
"output_4: {")!=std::string::npos);
825 fs::remove(tempFile);
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
CPU Execution: Reference C++ kernels.
Copyright (c) 2021 ARM Limited and Contributors.
std::map< uint64_t, JSONEntity > jsonEntities
std::map< uint64_t, Event > events
virtual TimelineStatus CreateEntity(const Entity &) override
BOOST_AUTO_TEST_CASE(CheckConvolution2dLayer)
void RunSimpleModelThroughDecoder(JSONTimelineDecoder &timelineDecoder)
virtual TimelineStatus CreateEventClass(const EventClass &) override
std::string GetJSONString(JSONEntity &rootEntity)
BOOST_AUTO_TEST_SUITE_END()
fs::path NamedTempFile(const char *fileName)
Construct a temporary file name.
virtual TimelineStatus CreateLabel(const Label &) override
virtual TimelineStatus CreateEvent(const Event &) override
void PrintJSON(JSONEntity &entity, std::ostream &os)
virtual TimelineStatus CreateRelationship(const Relationship &) override