1 // clang-format off 2 // Generated file (from: greater.mod.py). Do not edit 3 // Create the model 4 Model createTestModel() { 5 const std::vector<Operand> operands = { 6 { 7 .type = OperandType::TENSOR_FLOAT32, 8 .dimensions = {3}, 9 .numberOfConsumers = 1, 10 .scale = 0.0f, 11 .zeroPoint = 0, 12 .lifetime = OperandLifeTime::MODEL_INPUT, 13 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 14 }, 15 { 16 .type = OperandType::TENSOR_FLOAT32, 17 .dimensions = {3}, 18 .numberOfConsumers = 1, 19 .scale = 0.0f, 20 .zeroPoint = 0, 21 .lifetime = OperandLifeTime::MODEL_INPUT, 22 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 23 }, 24 { 25 .type = OperandType::TENSOR_BOOL8, 26 .dimensions = {3}, 27 .numberOfConsumers = 0, 28 .scale = 0.0f, 29 .zeroPoint = 0, 30 .lifetime = OperandLifeTime::MODEL_OUTPUT, 31 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 32 } 33 }; 34 35 const std::vector<Operation> operations = { 36 { 37 .type = OperationType::GREATER, 38 .inputs = {0, 1}, 39 .outputs = {2}, 40 } 41 }; 42 43 const std::vector<uint32_t> inputIndexes = {0, 1}; 44 const std::vector<uint32_t> outputIndexes = {2}; 45 std::vector<uint8_t> operandValues = {}; 46 const std::vector<hidl_memory> pools = {}; 47 48 return { 49 .operands = operands, 50 .operations = operations, 51 .inputIndexes = inputIndexes, 52 .outputIndexes = outputIndexes, 53 .operandValues = operandValues, 54 .pools = pools, 55 }; 56 } 57 58 inline bool is_ignored(int i) { 59 static std::set<int> ignore = {}; 60 return ignore.find(i) != ignore.end(); 61 } 62 63 // Create the model 64 Model createTestModel_int32() { 65 const std::vector<Operand> operands = { 66 { 67 .type = OperandType::TENSOR_INT32, 68 .dimensions = {3}, 69 .numberOfConsumers = 1, 70 .scale = 0.0f, 71 .zeroPoint = 0, 72 .lifetime = OperandLifeTime::MODEL_INPUT, 73 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 74 }, 75 { 76 .type = OperandType::TENSOR_INT32, 77 .dimensions = {3}, 78 .numberOfConsumers = 1, 79 .scale = 0.0f, 80 .zeroPoint = 0, 81 .lifetime = OperandLifeTime::MODEL_INPUT, 82 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 83 }, 84 { 85 .type = OperandType::TENSOR_BOOL8, 86 .dimensions = {3}, 87 .numberOfConsumers = 0, 88 .scale = 0.0f, 89 .zeroPoint = 0, 90 .lifetime = OperandLifeTime::MODEL_OUTPUT, 91 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 92 } 93 }; 94 95 const std::vector<Operation> operations = { 96 { 97 .type = OperationType::GREATER, 98 .inputs = {0, 1}, 99 .outputs = {2}, 100 } 101 }; 102 103 const std::vector<uint32_t> inputIndexes = {0, 1}; 104 const std::vector<uint32_t> outputIndexes = {2}; 105 std::vector<uint8_t> operandValues = {}; 106 const std::vector<hidl_memory> pools = {}; 107 108 return { 109 .operands = operands, 110 .operations = operations, 111 .inputIndexes = inputIndexes, 112 .outputIndexes = outputIndexes, 113 .operandValues = operandValues, 114 .pools = pools, 115 }; 116 } 117 118 inline bool is_ignored_int32(int i) { 119 static std::set<int> ignore = {}; 120 return ignore.find(i) != ignore.end(); 121 } 122 123 // Create the model 124 Model createTestModel_float16() { 125 const std::vector<Operand> operands = { 126 { 127 .type = OperandType::TENSOR_FLOAT16, 128 .dimensions = {3}, 129 .numberOfConsumers = 1, 130 .scale = 0.0f, 131 .zeroPoint = 0, 132 .lifetime = OperandLifeTime::MODEL_INPUT, 133 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 134 }, 135 { 136 .type = OperandType::TENSOR_FLOAT16, 137 .dimensions = {3}, 138 .numberOfConsumers = 1, 139 .scale = 0.0f, 140 .zeroPoint = 0, 141 .lifetime = OperandLifeTime::MODEL_INPUT, 142 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 143 }, 144 { 145 .type = OperandType::TENSOR_BOOL8, 146 .dimensions = {3}, 147 .numberOfConsumers = 0, 148 .scale = 0.0f, 149 .zeroPoint = 0, 150 .lifetime = OperandLifeTime::MODEL_OUTPUT, 151 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 152 } 153 }; 154 155 const std::vector<Operation> operations = { 156 { 157 .type = OperationType::GREATER, 158 .inputs = {0, 1}, 159 .outputs = {2}, 160 } 161 }; 162 163 const std::vector<uint32_t> inputIndexes = {0, 1}; 164 const std::vector<uint32_t> outputIndexes = {2}; 165 std::vector<uint8_t> operandValues = {}; 166 const std::vector<hidl_memory> pools = {}; 167 168 return { 169 .operands = operands, 170 .operations = operations, 171 .inputIndexes = inputIndexes, 172 .outputIndexes = outputIndexes, 173 .operandValues = operandValues, 174 .pools = pools, 175 }; 176 } 177 178 inline bool is_ignored_float16(int i) { 179 static std::set<int> ignore = {}; 180 return ignore.find(i) != ignore.end(); 181 } 182 183 // Create the model 184 Model createTestModel_relaxed() { 185 const std::vector<Operand> operands = { 186 { 187 .type = OperandType::TENSOR_FLOAT32, 188 .dimensions = {3}, 189 .numberOfConsumers = 1, 190 .scale = 0.0f, 191 .zeroPoint = 0, 192 .lifetime = OperandLifeTime::MODEL_INPUT, 193 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 194 }, 195 { 196 .type = OperandType::TENSOR_FLOAT32, 197 .dimensions = {3}, 198 .numberOfConsumers = 1, 199 .scale = 0.0f, 200 .zeroPoint = 0, 201 .lifetime = OperandLifeTime::MODEL_INPUT, 202 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 203 }, 204 { 205 .type = OperandType::TENSOR_BOOL8, 206 .dimensions = {3}, 207 .numberOfConsumers = 0, 208 .scale = 0.0f, 209 .zeroPoint = 0, 210 .lifetime = OperandLifeTime::MODEL_OUTPUT, 211 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 212 } 213 }; 214 215 const std::vector<Operation> operations = { 216 { 217 .type = OperationType::GREATER, 218 .inputs = {0, 1}, 219 .outputs = {2}, 220 } 221 }; 222 223 const std::vector<uint32_t> inputIndexes = {0, 1}; 224 const std::vector<uint32_t> outputIndexes = {2}; 225 std::vector<uint8_t> operandValues = {}; 226 const std::vector<hidl_memory> pools = {}; 227 228 return { 229 .operands = operands, 230 .operations = operations, 231 .inputIndexes = inputIndexes, 232 .outputIndexes = outputIndexes, 233 .operandValues = operandValues, 234 .pools = pools, 235 .relaxComputationFloat32toFloat16 = true, 236 }; 237 } 238 239 inline bool is_ignored_relaxed(int i) { 240 static std::set<int> ignore = {}; 241 return ignore.find(i) != ignore.end(); 242 } 243 244 // Create the model 245 Model createTestModel_dynamic_output_shape() { 246 const std::vector<Operand> operands = { 247 { 248 .type = OperandType::TENSOR_FLOAT32, 249 .dimensions = {3}, 250 .numberOfConsumers = 1, 251 .scale = 0.0f, 252 .zeroPoint = 0, 253 .lifetime = OperandLifeTime::MODEL_INPUT, 254 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 255 }, 256 { 257 .type = OperandType::TENSOR_FLOAT32, 258 .dimensions = {3}, 259 .numberOfConsumers = 1, 260 .scale = 0.0f, 261 .zeroPoint = 0, 262 .lifetime = OperandLifeTime::MODEL_INPUT, 263 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 264 }, 265 { 266 .type = OperandType::TENSOR_BOOL8, 267 .dimensions = {0}, 268 .numberOfConsumers = 0, 269 .scale = 0.0f, 270 .zeroPoint = 0, 271 .lifetime = OperandLifeTime::MODEL_OUTPUT, 272 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 273 } 274 }; 275 276 const std::vector<Operation> operations = { 277 { 278 .type = OperationType::GREATER, 279 .inputs = {0, 1}, 280 .outputs = {2}, 281 } 282 }; 283 284 const std::vector<uint32_t> inputIndexes = {0, 1}; 285 const std::vector<uint32_t> outputIndexes = {2}; 286 std::vector<uint8_t> operandValues = {}; 287 const std::vector<hidl_memory> pools = {}; 288 289 return { 290 .operands = operands, 291 .operations = operations, 292 .inputIndexes = inputIndexes, 293 .outputIndexes = outputIndexes, 294 .operandValues = operandValues, 295 .pools = pools, 296 }; 297 } 298 299 inline bool is_ignored_dynamic_output_shape(int i) { 300 static std::set<int> ignore = {}; 301 return ignore.find(i) != ignore.end(); 302 } 303 304 // Create the model 305 Model createTestModel_dynamic_output_shape_int32() { 306 const std::vector<Operand> operands = { 307 { 308 .type = OperandType::TENSOR_INT32, 309 .dimensions = {3}, 310 .numberOfConsumers = 1, 311 .scale = 0.0f, 312 .zeroPoint = 0, 313 .lifetime = OperandLifeTime::MODEL_INPUT, 314 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 315 }, 316 { 317 .type = OperandType::TENSOR_INT32, 318 .dimensions = {3}, 319 .numberOfConsumers = 1, 320 .scale = 0.0f, 321 .zeroPoint = 0, 322 .lifetime = OperandLifeTime::MODEL_INPUT, 323 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 324 }, 325 { 326 .type = OperandType::TENSOR_BOOL8, 327 .dimensions = {0}, 328 .numberOfConsumers = 0, 329 .scale = 0.0f, 330 .zeroPoint = 0, 331 .lifetime = OperandLifeTime::MODEL_OUTPUT, 332 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 333 } 334 }; 335 336 const std::vector<Operation> operations = { 337 { 338 .type = OperationType::GREATER, 339 .inputs = {0, 1}, 340 .outputs = {2}, 341 } 342 }; 343 344 const std::vector<uint32_t> inputIndexes = {0, 1}; 345 const std::vector<uint32_t> outputIndexes = {2}; 346 std::vector<uint8_t> operandValues = {}; 347 const std::vector<hidl_memory> pools = {}; 348 349 return { 350 .operands = operands, 351 .operations = operations, 352 .inputIndexes = inputIndexes, 353 .outputIndexes = outputIndexes, 354 .operandValues = operandValues, 355 .pools = pools, 356 }; 357 } 358 359 inline bool is_ignored_dynamic_output_shape_int32(int i) { 360 static std::set<int> ignore = {}; 361 return ignore.find(i) != ignore.end(); 362 } 363 364 // Create the model 365 Model createTestModel_dynamic_output_shape_float16() { 366 const std::vector<Operand> operands = { 367 { 368 .type = OperandType::TENSOR_FLOAT16, 369 .dimensions = {3}, 370 .numberOfConsumers = 1, 371 .scale = 0.0f, 372 .zeroPoint = 0, 373 .lifetime = OperandLifeTime::MODEL_INPUT, 374 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 375 }, 376 { 377 .type = OperandType::TENSOR_FLOAT16, 378 .dimensions = {3}, 379 .numberOfConsumers = 1, 380 .scale = 0.0f, 381 .zeroPoint = 0, 382 .lifetime = OperandLifeTime::MODEL_INPUT, 383 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 384 }, 385 { 386 .type = OperandType::TENSOR_BOOL8, 387 .dimensions = {0}, 388 .numberOfConsumers = 0, 389 .scale = 0.0f, 390 .zeroPoint = 0, 391 .lifetime = OperandLifeTime::MODEL_OUTPUT, 392 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 393 } 394 }; 395 396 const std::vector<Operation> operations = { 397 { 398 .type = OperationType::GREATER, 399 .inputs = {0, 1}, 400 .outputs = {2}, 401 } 402 }; 403 404 const std::vector<uint32_t> inputIndexes = {0, 1}; 405 const std::vector<uint32_t> outputIndexes = {2}; 406 std::vector<uint8_t> operandValues = {}; 407 const std::vector<hidl_memory> pools = {}; 408 409 return { 410 .operands = operands, 411 .operations = operations, 412 .inputIndexes = inputIndexes, 413 .outputIndexes = outputIndexes, 414 .operandValues = operandValues, 415 .pools = pools, 416 }; 417 } 418 419 inline bool is_ignored_dynamic_output_shape_float16(int i) { 420 static std::set<int> ignore = {}; 421 return ignore.find(i) != ignore.end(); 422 } 423 424 // Create the model 425 Model createTestModel_dynamic_output_shape_relaxed() { 426 const std::vector<Operand> operands = { 427 { 428 .type = OperandType::TENSOR_FLOAT32, 429 .dimensions = {3}, 430 .numberOfConsumers = 1, 431 .scale = 0.0f, 432 .zeroPoint = 0, 433 .lifetime = OperandLifeTime::MODEL_INPUT, 434 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 435 }, 436 { 437 .type = OperandType::TENSOR_FLOAT32, 438 .dimensions = {3}, 439 .numberOfConsumers = 1, 440 .scale = 0.0f, 441 .zeroPoint = 0, 442 .lifetime = OperandLifeTime::MODEL_INPUT, 443 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 444 }, 445 { 446 .type = OperandType::TENSOR_BOOL8, 447 .dimensions = {0}, 448 .numberOfConsumers = 0, 449 .scale = 0.0f, 450 .zeroPoint = 0, 451 .lifetime = OperandLifeTime::MODEL_OUTPUT, 452 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 453 } 454 }; 455 456 const std::vector<Operation> operations = { 457 { 458 .type = OperationType::GREATER, 459 .inputs = {0, 1}, 460 .outputs = {2}, 461 } 462 }; 463 464 const std::vector<uint32_t> inputIndexes = {0, 1}; 465 const std::vector<uint32_t> outputIndexes = {2}; 466 std::vector<uint8_t> operandValues = {}; 467 const std::vector<hidl_memory> pools = {}; 468 469 return { 470 .operands = operands, 471 .operations = operations, 472 .inputIndexes = inputIndexes, 473 .outputIndexes = outputIndexes, 474 .operandValues = operandValues, 475 .pools = pools, 476 .relaxComputationFloat32toFloat16 = true, 477 }; 478 } 479 480 inline bool is_ignored_dynamic_output_shape_relaxed(int i) { 481 static std::set<int> ignore = {}; 482 return ignore.find(i) != ignore.end(); 483 } 484 485 // Create the model 486 Model createTestModel_2() { 487 const std::vector<Operand> operands = { 488 { 489 .type = OperandType::TENSOR_FLOAT32, 490 .dimensions = {2, 1}, 491 .numberOfConsumers = 1, 492 .scale = 0.0f, 493 .zeroPoint = 0, 494 .lifetime = OperandLifeTime::MODEL_INPUT, 495 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 496 }, 497 { 498 .type = OperandType::TENSOR_FLOAT32, 499 .dimensions = {2}, 500 .numberOfConsumers = 1, 501 .scale = 0.0f, 502 .zeroPoint = 0, 503 .lifetime = OperandLifeTime::MODEL_INPUT, 504 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 505 }, 506 { 507 .type = OperandType::TENSOR_BOOL8, 508 .dimensions = {2, 2}, 509 .numberOfConsumers = 0, 510 .scale = 0.0f, 511 .zeroPoint = 0, 512 .lifetime = OperandLifeTime::MODEL_OUTPUT, 513 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 514 } 515 }; 516 517 const std::vector<Operation> operations = { 518 { 519 .type = OperationType::GREATER, 520 .inputs = {0, 1}, 521 .outputs = {2}, 522 } 523 }; 524 525 const std::vector<uint32_t> inputIndexes = {0, 1}; 526 const std::vector<uint32_t> outputIndexes = {2}; 527 std::vector<uint8_t> operandValues = {}; 528 const std::vector<hidl_memory> pools = {}; 529 530 return { 531 .operands = operands, 532 .operations = operations, 533 .inputIndexes = inputIndexes, 534 .outputIndexes = outputIndexes, 535 .operandValues = operandValues, 536 .pools = pools, 537 }; 538 } 539 540 inline bool is_ignored_2(int i) { 541 static std::set<int> ignore = {}; 542 return ignore.find(i) != ignore.end(); 543 } 544 545 // Create the model 546 Model createTestModel_int32_2() { 547 const std::vector<Operand> operands = { 548 { 549 .type = OperandType::TENSOR_INT32, 550 .dimensions = {2, 1}, 551 .numberOfConsumers = 1, 552 .scale = 0.0f, 553 .zeroPoint = 0, 554 .lifetime = OperandLifeTime::MODEL_INPUT, 555 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 556 }, 557 { 558 .type = OperandType::TENSOR_INT32, 559 .dimensions = {2}, 560 .numberOfConsumers = 1, 561 .scale = 0.0f, 562 .zeroPoint = 0, 563 .lifetime = OperandLifeTime::MODEL_INPUT, 564 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 565 }, 566 { 567 .type = OperandType::TENSOR_BOOL8, 568 .dimensions = {2, 2}, 569 .numberOfConsumers = 0, 570 .scale = 0.0f, 571 .zeroPoint = 0, 572 .lifetime = OperandLifeTime::MODEL_OUTPUT, 573 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 574 } 575 }; 576 577 const std::vector<Operation> operations = { 578 { 579 .type = OperationType::GREATER, 580 .inputs = {0, 1}, 581 .outputs = {2}, 582 } 583 }; 584 585 const std::vector<uint32_t> inputIndexes = {0, 1}; 586 const std::vector<uint32_t> outputIndexes = {2}; 587 std::vector<uint8_t> operandValues = {}; 588 const std::vector<hidl_memory> pools = {}; 589 590 return { 591 .operands = operands, 592 .operations = operations, 593 .inputIndexes = inputIndexes, 594 .outputIndexes = outputIndexes, 595 .operandValues = operandValues, 596 .pools = pools, 597 }; 598 } 599 600 inline bool is_ignored_int32_2(int i) { 601 static std::set<int> ignore = {}; 602 return ignore.find(i) != ignore.end(); 603 } 604 605 // Create the model 606 Model createTestModel_float16_2() { 607 const std::vector<Operand> operands = { 608 { 609 .type = OperandType::TENSOR_FLOAT16, 610 .dimensions = {2, 1}, 611 .numberOfConsumers = 1, 612 .scale = 0.0f, 613 .zeroPoint = 0, 614 .lifetime = OperandLifeTime::MODEL_INPUT, 615 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 616 }, 617 { 618 .type = OperandType::TENSOR_FLOAT16, 619 .dimensions = {2}, 620 .numberOfConsumers = 1, 621 .scale = 0.0f, 622 .zeroPoint = 0, 623 .lifetime = OperandLifeTime::MODEL_INPUT, 624 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 625 }, 626 { 627 .type = OperandType::TENSOR_BOOL8, 628 .dimensions = {2, 2}, 629 .numberOfConsumers = 0, 630 .scale = 0.0f, 631 .zeroPoint = 0, 632 .lifetime = OperandLifeTime::MODEL_OUTPUT, 633 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 634 } 635 }; 636 637 const std::vector<Operation> operations = { 638 { 639 .type = OperationType::GREATER, 640 .inputs = {0, 1}, 641 .outputs = {2}, 642 } 643 }; 644 645 const std::vector<uint32_t> inputIndexes = {0, 1}; 646 const std::vector<uint32_t> outputIndexes = {2}; 647 std::vector<uint8_t> operandValues = {}; 648 const std::vector<hidl_memory> pools = {}; 649 650 return { 651 .operands = operands, 652 .operations = operations, 653 .inputIndexes = inputIndexes, 654 .outputIndexes = outputIndexes, 655 .operandValues = operandValues, 656 .pools = pools, 657 }; 658 } 659 660 inline bool is_ignored_float16_2(int i) { 661 static std::set<int> ignore = {}; 662 return ignore.find(i) != ignore.end(); 663 } 664 665 // Create the model 666 Model createTestModel_relaxed_2() { 667 const std::vector<Operand> operands = { 668 { 669 .type = OperandType::TENSOR_FLOAT32, 670 .dimensions = {2, 1}, 671 .numberOfConsumers = 1, 672 .scale = 0.0f, 673 .zeroPoint = 0, 674 .lifetime = OperandLifeTime::MODEL_INPUT, 675 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 676 }, 677 { 678 .type = OperandType::TENSOR_FLOAT32, 679 .dimensions = {2}, 680 .numberOfConsumers = 1, 681 .scale = 0.0f, 682 .zeroPoint = 0, 683 .lifetime = OperandLifeTime::MODEL_INPUT, 684 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 685 }, 686 { 687 .type = OperandType::TENSOR_BOOL8, 688 .dimensions = {2, 2}, 689 .numberOfConsumers = 0, 690 .scale = 0.0f, 691 .zeroPoint = 0, 692 .lifetime = OperandLifeTime::MODEL_OUTPUT, 693 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 694 } 695 }; 696 697 const std::vector<Operation> operations = { 698 { 699 .type = OperationType::GREATER, 700 .inputs = {0, 1}, 701 .outputs = {2}, 702 } 703 }; 704 705 const std::vector<uint32_t> inputIndexes = {0, 1}; 706 const std::vector<uint32_t> outputIndexes = {2}; 707 std::vector<uint8_t> operandValues = {}; 708 const std::vector<hidl_memory> pools = {}; 709 710 return { 711 .operands = operands, 712 .operations = operations, 713 .inputIndexes = inputIndexes, 714 .outputIndexes = outputIndexes, 715 .operandValues = operandValues, 716 .pools = pools, 717 .relaxComputationFloat32toFloat16 = true, 718 }; 719 } 720 721 inline bool is_ignored_relaxed_2(int i) { 722 static std::set<int> ignore = {}; 723 return ignore.find(i) != ignore.end(); 724 } 725 726 // Create the model 727 Model createTestModel_dynamic_output_shape_2() { 728 const std::vector<Operand> operands = { 729 { 730 .type = OperandType::TENSOR_FLOAT32, 731 .dimensions = {2, 1}, 732 .numberOfConsumers = 1, 733 .scale = 0.0f, 734 .zeroPoint = 0, 735 .lifetime = OperandLifeTime::MODEL_INPUT, 736 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 737 }, 738 { 739 .type = OperandType::TENSOR_FLOAT32, 740 .dimensions = {2}, 741 .numberOfConsumers = 1, 742 .scale = 0.0f, 743 .zeroPoint = 0, 744 .lifetime = OperandLifeTime::MODEL_INPUT, 745 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 746 }, 747 { 748 .type = OperandType::TENSOR_BOOL8, 749 .dimensions = {0, 0}, 750 .numberOfConsumers = 0, 751 .scale = 0.0f, 752 .zeroPoint = 0, 753 .lifetime = OperandLifeTime::MODEL_OUTPUT, 754 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 755 } 756 }; 757 758 const std::vector<Operation> operations = { 759 { 760 .type = OperationType::GREATER, 761 .inputs = {0, 1}, 762 .outputs = {2}, 763 } 764 }; 765 766 const std::vector<uint32_t> inputIndexes = {0, 1}; 767 const std::vector<uint32_t> outputIndexes = {2}; 768 std::vector<uint8_t> operandValues = {}; 769 const std::vector<hidl_memory> pools = {}; 770 771 return { 772 .operands = operands, 773 .operations = operations, 774 .inputIndexes = inputIndexes, 775 .outputIndexes = outputIndexes, 776 .operandValues = operandValues, 777 .pools = pools, 778 }; 779 } 780 781 inline bool is_ignored_dynamic_output_shape_2(int i) { 782 static std::set<int> ignore = {}; 783 return ignore.find(i) != ignore.end(); 784 } 785 786 // Create the model 787 Model createTestModel_dynamic_output_shape_int32_2() { 788 const std::vector<Operand> operands = { 789 { 790 .type = OperandType::TENSOR_INT32, 791 .dimensions = {2, 1}, 792 .numberOfConsumers = 1, 793 .scale = 0.0f, 794 .zeroPoint = 0, 795 .lifetime = OperandLifeTime::MODEL_INPUT, 796 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 797 }, 798 { 799 .type = OperandType::TENSOR_INT32, 800 .dimensions = {2}, 801 .numberOfConsumers = 1, 802 .scale = 0.0f, 803 .zeroPoint = 0, 804 .lifetime = OperandLifeTime::MODEL_INPUT, 805 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 806 }, 807 { 808 .type = OperandType::TENSOR_BOOL8, 809 .dimensions = {0, 0}, 810 .numberOfConsumers = 0, 811 .scale = 0.0f, 812 .zeroPoint = 0, 813 .lifetime = OperandLifeTime::MODEL_OUTPUT, 814 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 815 } 816 }; 817 818 const std::vector<Operation> operations = { 819 { 820 .type = OperationType::GREATER, 821 .inputs = {0, 1}, 822 .outputs = {2}, 823 } 824 }; 825 826 const std::vector<uint32_t> inputIndexes = {0, 1}; 827 const std::vector<uint32_t> outputIndexes = {2}; 828 std::vector<uint8_t> operandValues = {}; 829 const std::vector<hidl_memory> pools = {}; 830 831 return { 832 .operands = operands, 833 .operations = operations, 834 .inputIndexes = inputIndexes, 835 .outputIndexes = outputIndexes, 836 .operandValues = operandValues, 837 .pools = pools, 838 }; 839 } 840 841 inline bool is_ignored_dynamic_output_shape_int32_2(int i) { 842 static std::set<int> ignore = {}; 843 return ignore.find(i) != ignore.end(); 844 } 845 846 // Create the model 847 Model createTestModel_dynamic_output_shape_float16_2() { 848 const std::vector<Operand> operands = { 849 { 850 .type = OperandType::TENSOR_FLOAT16, 851 .dimensions = {2, 1}, 852 .numberOfConsumers = 1, 853 .scale = 0.0f, 854 .zeroPoint = 0, 855 .lifetime = OperandLifeTime::MODEL_INPUT, 856 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 857 }, 858 { 859 .type = OperandType::TENSOR_FLOAT16, 860 .dimensions = {2}, 861 .numberOfConsumers = 1, 862 .scale = 0.0f, 863 .zeroPoint = 0, 864 .lifetime = OperandLifeTime::MODEL_INPUT, 865 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 866 }, 867 { 868 .type = OperandType::TENSOR_BOOL8, 869 .dimensions = {0, 0}, 870 .numberOfConsumers = 0, 871 .scale = 0.0f, 872 .zeroPoint = 0, 873 .lifetime = OperandLifeTime::MODEL_OUTPUT, 874 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 875 } 876 }; 877 878 const std::vector<Operation> operations = { 879 { 880 .type = OperationType::GREATER, 881 .inputs = {0, 1}, 882 .outputs = {2}, 883 } 884 }; 885 886 const std::vector<uint32_t> inputIndexes = {0, 1}; 887 const std::vector<uint32_t> outputIndexes = {2}; 888 std::vector<uint8_t> operandValues = {}; 889 const std::vector<hidl_memory> pools = {}; 890 891 return { 892 .operands = operands, 893 .operations = operations, 894 .inputIndexes = inputIndexes, 895 .outputIndexes = outputIndexes, 896 .operandValues = operandValues, 897 .pools = pools, 898 }; 899 } 900 901 inline bool is_ignored_dynamic_output_shape_float16_2(int i) { 902 static std::set<int> ignore = {}; 903 return ignore.find(i) != ignore.end(); 904 } 905 906 // Create the model 907 Model createTestModel_dynamic_output_shape_relaxed_2() { 908 const std::vector<Operand> operands = { 909 { 910 .type = OperandType::TENSOR_FLOAT32, 911 .dimensions = {2, 1}, 912 .numberOfConsumers = 1, 913 .scale = 0.0f, 914 .zeroPoint = 0, 915 .lifetime = OperandLifeTime::MODEL_INPUT, 916 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 917 }, 918 { 919 .type = OperandType::TENSOR_FLOAT32, 920 .dimensions = {2}, 921 .numberOfConsumers = 1, 922 .scale = 0.0f, 923 .zeroPoint = 0, 924 .lifetime = OperandLifeTime::MODEL_INPUT, 925 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 926 }, 927 { 928 .type = OperandType::TENSOR_BOOL8, 929 .dimensions = {0, 0}, 930 .numberOfConsumers = 0, 931 .scale = 0.0f, 932 .zeroPoint = 0, 933 .lifetime = OperandLifeTime::MODEL_OUTPUT, 934 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 935 } 936 }; 937 938 const std::vector<Operation> operations = { 939 { 940 .type = OperationType::GREATER, 941 .inputs = {0, 1}, 942 .outputs = {2}, 943 } 944 }; 945 946 const std::vector<uint32_t> inputIndexes = {0, 1}; 947 const std::vector<uint32_t> outputIndexes = {2}; 948 std::vector<uint8_t> operandValues = {}; 949 const std::vector<hidl_memory> pools = {}; 950 951 return { 952 .operands = operands, 953 .operations = operations, 954 .inputIndexes = inputIndexes, 955 .outputIndexes = outputIndexes, 956 .operandValues = operandValues, 957 .pools = pools, 958 .relaxComputationFloat32toFloat16 = true, 959 }; 960 } 961 962 inline bool is_ignored_dynamic_output_shape_relaxed_2(int i) { 963 static std::set<int> ignore = {}; 964 return ignore.find(i) != ignore.end(); 965 } 966 967 // Create the model 968 Model createTestModel_3() { 969 const std::vector<Operand> operands = { 970 { 971 .type = OperandType::TENSOR_QUANT8_ASYMM, 972 .dimensions = {3}, 973 .numberOfConsumers = 1, 974 .scale = 1.0f, 975 .zeroPoint = 128, 976 .lifetime = OperandLifeTime::MODEL_INPUT, 977 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 978 }, 979 { 980 .type = OperandType::TENSOR_QUANT8_ASYMM, 981 .dimensions = {1}, 982 .numberOfConsumers = 1, 983 .scale = 2.0f, 984 .zeroPoint = 128, 985 .lifetime = OperandLifeTime::MODEL_INPUT, 986 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 987 }, 988 { 989 .type = OperandType::TENSOR_BOOL8, 990 .dimensions = {3}, 991 .numberOfConsumers = 0, 992 .scale = 0.0f, 993 .zeroPoint = 0, 994 .lifetime = OperandLifeTime::MODEL_OUTPUT, 995 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 996 } 997 }; 998 999 const std::vector<Operation> operations = { 1000 { 1001 .type = OperationType::GREATER, 1002 .inputs = {0, 1}, 1003 .outputs = {2}, 1004 } 1005 }; 1006 1007 const std::vector<uint32_t> inputIndexes = {0, 1}; 1008 const std::vector<uint32_t> outputIndexes = {2}; 1009 std::vector<uint8_t> operandValues = {}; 1010 const std::vector<hidl_memory> pools = {}; 1011 1012 return { 1013 .operands = operands, 1014 .operations = operations, 1015 .inputIndexes = inputIndexes, 1016 .outputIndexes = outputIndexes, 1017 .operandValues = operandValues, 1018 .pools = pools, 1019 }; 1020 } 1021 1022 inline bool is_ignored_3(int i) { 1023 static std::set<int> ignore = {}; 1024 return ignore.find(i) != ignore.end(); 1025 } 1026 1027 // Create the model 1028 Model createTestModel_dynamic_output_shape_3() { 1029 const std::vector<Operand> operands = { 1030 { 1031 .type = OperandType::TENSOR_QUANT8_ASYMM, 1032 .dimensions = {3}, 1033 .numberOfConsumers = 1, 1034 .scale = 1.0f, 1035 .zeroPoint = 128, 1036 .lifetime = OperandLifeTime::MODEL_INPUT, 1037 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1038 }, 1039 { 1040 .type = OperandType::TENSOR_QUANT8_ASYMM, 1041 .dimensions = {1}, 1042 .numberOfConsumers = 1, 1043 .scale = 2.0f, 1044 .zeroPoint = 128, 1045 .lifetime = OperandLifeTime::MODEL_INPUT, 1046 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1047 }, 1048 { 1049 .type = OperandType::TENSOR_BOOL8, 1050 .dimensions = {0}, 1051 .numberOfConsumers = 0, 1052 .scale = 0.0f, 1053 .zeroPoint = 0, 1054 .lifetime = OperandLifeTime::MODEL_OUTPUT, 1055 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1056 } 1057 }; 1058 1059 const std::vector<Operation> operations = { 1060 { 1061 .type = OperationType::GREATER, 1062 .inputs = {0, 1}, 1063 .outputs = {2}, 1064 } 1065 }; 1066 1067 const std::vector<uint32_t> inputIndexes = {0, 1}; 1068 const std::vector<uint32_t> outputIndexes = {2}; 1069 std::vector<uint8_t> operandValues = {}; 1070 const std::vector<hidl_memory> pools = {}; 1071 1072 return { 1073 .operands = operands, 1074 .operations = operations, 1075 .inputIndexes = inputIndexes, 1076 .outputIndexes = outputIndexes, 1077 .operandValues = operandValues, 1078 .pools = pools, 1079 }; 1080 } 1081 1082 inline bool is_ignored_dynamic_output_shape_3(int i) { 1083 static std::set<int> ignore = {}; 1084 return ignore.find(i) != ignore.end(); 1085 } 1086 1087 // Create the model 1088 Model createTestModel_4() { 1089 const std::vector<Operand> operands = { 1090 { 1091 .type = OperandType::TENSOR_QUANT8_ASYMM, 1092 .dimensions = {3}, 1093 .numberOfConsumers = 1, 1094 .scale = 1.0f, 1095 .zeroPoint = 128, 1096 .lifetime = OperandLifeTime::MODEL_INPUT, 1097 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1098 }, 1099 { 1100 .type = OperandType::TENSOR_QUANT8_ASYMM, 1101 .dimensions = {1}, 1102 .numberOfConsumers = 1, 1103 .scale = 1.0f, 1104 .zeroPoint = 129, 1105 .lifetime = OperandLifeTime::MODEL_INPUT, 1106 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1107 }, 1108 { 1109 .type = OperandType::TENSOR_BOOL8, 1110 .dimensions = {3}, 1111 .numberOfConsumers = 0, 1112 .scale = 0.0f, 1113 .zeroPoint = 0, 1114 .lifetime = OperandLifeTime::MODEL_OUTPUT, 1115 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1116 } 1117 }; 1118 1119 const std::vector<Operation> operations = { 1120 { 1121 .type = OperationType::GREATER, 1122 .inputs = {0, 1}, 1123 .outputs = {2}, 1124 } 1125 }; 1126 1127 const std::vector<uint32_t> inputIndexes = {0, 1}; 1128 const std::vector<uint32_t> outputIndexes = {2}; 1129 std::vector<uint8_t> operandValues = {}; 1130 const std::vector<hidl_memory> pools = {}; 1131 1132 return { 1133 .operands = operands, 1134 .operations = operations, 1135 .inputIndexes = inputIndexes, 1136 .outputIndexes = outputIndexes, 1137 .operandValues = operandValues, 1138 .pools = pools, 1139 }; 1140 } 1141 1142 inline bool is_ignored_4(int i) { 1143 static std::set<int> ignore = {}; 1144 return ignore.find(i) != ignore.end(); 1145 } 1146 1147 // Create the model 1148 Model createTestModel_dynamic_output_shape_4() { 1149 const std::vector<Operand> operands = { 1150 { 1151 .type = OperandType::TENSOR_QUANT8_ASYMM, 1152 .dimensions = {3}, 1153 .numberOfConsumers = 1, 1154 .scale = 1.0f, 1155 .zeroPoint = 128, 1156 .lifetime = OperandLifeTime::MODEL_INPUT, 1157 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1158 }, 1159 { 1160 .type = OperandType::TENSOR_QUANT8_ASYMM, 1161 .dimensions = {1}, 1162 .numberOfConsumers = 1, 1163 .scale = 1.0f, 1164 .zeroPoint = 129, 1165 .lifetime = OperandLifeTime::MODEL_INPUT, 1166 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1167 }, 1168 { 1169 .type = OperandType::TENSOR_BOOL8, 1170 .dimensions = {0}, 1171 .numberOfConsumers = 0, 1172 .scale = 0.0f, 1173 .zeroPoint = 0, 1174 .lifetime = OperandLifeTime::MODEL_OUTPUT, 1175 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1176 } 1177 }; 1178 1179 const std::vector<Operation> operations = { 1180 { 1181 .type = OperationType::GREATER, 1182 .inputs = {0, 1}, 1183 .outputs = {2}, 1184 } 1185 }; 1186 1187 const std::vector<uint32_t> inputIndexes = {0, 1}; 1188 const std::vector<uint32_t> outputIndexes = {2}; 1189 std::vector<uint8_t> operandValues = {}; 1190 const std::vector<hidl_memory> pools = {}; 1191 1192 return { 1193 .operands = operands, 1194 .operations = operations, 1195 .inputIndexes = inputIndexes, 1196 .outputIndexes = outputIndexes, 1197 .operandValues = operandValues, 1198 .pools = pools, 1199 }; 1200 } 1201 1202 inline bool is_ignored_dynamic_output_shape_4(int i) { 1203 static std::set<int> ignore = {}; 1204 return ignore.find(i) != ignore.end(); 1205 } 1206 1207 // Create the model 1208 Model createTestModel_5() { 1209 const std::vector<Operand> operands = { 1210 { 1211 .type = OperandType::TENSOR_QUANT8_ASYMM, 1212 .dimensions = {1}, 1213 .numberOfConsumers = 1, 1214 .scale = 1.64771f, 1215 .zeroPoint = 31, 1216 .lifetime = OperandLifeTime::MODEL_INPUT, 1217 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1218 }, 1219 { 1220 .type = OperandType::TENSOR_QUANT8_ASYMM, 1221 .dimensions = {1}, 1222 .numberOfConsumers = 1, 1223 .scale = 1.49725f, 1224 .zeroPoint = 240, 1225 .lifetime = OperandLifeTime::MODEL_INPUT, 1226 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1227 }, 1228 { 1229 .type = OperandType::TENSOR_BOOL8, 1230 .dimensions = {1}, 1231 .numberOfConsumers = 0, 1232 .scale = 0.0f, 1233 .zeroPoint = 0, 1234 .lifetime = OperandLifeTime::MODEL_OUTPUT, 1235 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1236 } 1237 }; 1238 1239 const std::vector<Operation> operations = { 1240 { 1241 .type = OperationType::GREATER, 1242 .inputs = {0, 1}, 1243 .outputs = {2}, 1244 } 1245 }; 1246 1247 const std::vector<uint32_t> inputIndexes = {0, 1}; 1248 const std::vector<uint32_t> outputIndexes = {2}; 1249 std::vector<uint8_t> operandValues = {}; 1250 const std::vector<hidl_memory> pools = {}; 1251 1252 return { 1253 .operands = operands, 1254 .operations = operations, 1255 .inputIndexes = inputIndexes, 1256 .outputIndexes = outputIndexes, 1257 .operandValues = operandValues, 1258 .pools = pools, 1259 }; 1260 } 1261 1262 inline bool is_ignored_5(int i) { 1263 static std::set<int> ignore = {}; 1264 return ignore.find(i) != ignore.end(); 1265 } 1266 1267 // Create the model 1268 Model createTestModel_dynamic_output_shape_5() { 1269 const std::vector<Operand> operands = { 1270 { 1271 .type = OperandType::TENSOR_QUANT8_ASYMM, 1272 .dimensions = {1}, 1273 .numberOfConsumers = 1, 1274 .scale = 1.64771f, 1275 .zeroPoint = 31, 1276 .lifetime = OperandLifeTime::MODEL_INPUT, 1277 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1278 }, 1279 { 1280 .type = OperandType::TENSOR_QUANT8_ASYMM, 1281 .dimensions = {1}, 1282 .numberOfConsumers = 1, 1283 .scale = 1.49725f, 1284 .zeroPoint = 240, 1285 .lifetime = OperandLifeTime::MODEL_INPUT, 1286 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1287 }, 1288 { 1289 .type = OperandType::TENSOR_BOOL8, 1290 .dimensions = {0}, 1291 .numberOfConsumers = 0, 1292 .scale = 0.0f, 1293 .zeroPoint = 0, 1294 .lifetime = OperandLifeTime::MODEL_OUTPUT, 1295 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1296 } 1297 }; 1298 1299 const std::vector<Operation> operations = { 1300 { 1301 .type = OperationType::GREATER, 1302 .inputs = {0, 1}, 1303 .outputs = {2}, 1304 } 1305 }; 1306 1307 const std::vector<uint32_t> inputIndexes = {0, 1}; 1308 const std::vector<uint32_t> outputIndexes = {2}; 1309 std::vector<uint8_t> operandValues = {}; 1310 const std::vector<hidl_memory> pools = {}; 1311 1312 return { 1313 .operands = operands, 1314 .operations = operations, 1315 .inputIndexes = inputIndexes, 1316 .outputIndexes = outputIndexes, 1317 .operandValues = operandValues, 1318 .pools = pools, 1319 }; 1320 } 1321 1322 inline bool is_ignored_dynamic_output_shape_5(int i) { 1323 static std::set<int> ignore = {}; 1324 return ignore.find(i) != ignore.end(); 1325 } 1326 1327 // Create the model 1328 Model createTestModel_6() { 1329 const std::vector<Operand> operands = { 1330 { 1331 .type = OperandType::TENSOR_QUANT8_ASYMM, 1332 .dimensions = {1}, 1333 .numberOfConsumers = 1, 1334 .scale = 1.49725f, 1335 .zeroPoint = 240, 1336 .lifetime = OperandLifeTime::MODEL_INPUT, 1337 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1338 }, 1339 { 1340 .type = OperandType::TENSOR_QUANT8_ASYMM, 1341 .dimensions = {1}, 1342 .numberOfConsumers = 1, 1343 .scale = 1.64771f, 1344 .zeroPoint = 31, 1345 .lifetime = OperandLifeTime::MODEL_INPUT, 1346 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1347 }, 1348 { 1349 .type = OperandType::TENSOR_BOOL8, 1350 .dimensions = {1}, 1351 .numberOfConsumers = 0, 1352 .scale = 0.0f, 1353 .zeroPoint = 0, 1354 .lifetime = OperandLifeTime::MODEL_OUTPUT, 1355 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1356 } 1357 }; 1358 1359 const std::vector<Operation> operations = { 1360 { 1361 .type = OperationType::GREATER, 1362 .inputs = {0, 1}, 1363 .outputs = {2}, 1364 } 1365 }; 1366 1367 const std::vector<uint32_t> inputIndexes = {0, 1}; 1368 const std::vector<uint32_t> outputIndexes = {2}; 1369 std::vector<uint8_t> operandValues = {}; 1370 const std::vector<hidl_memory> pools = {}; 1371 1372 return { 1373 .operands = operands, 1374 .operations = operations, 1375 .inputIndexes = inputIndexes, 1376 .outputIndexes = outputIndexes, 1377 .operandValues = operandValues, 1378 .pools = pools, 1379 }; 1380 } 1381 1382 inline bool is_ignored_6(int i) { 1383 static std::set<int> ignore = {}; 1384 return ignore.find(i) != ignore.end(); 1385 } 1386 1387 // Create the model 1388 Model createTestModel_dynamic_output_shape_6() { 1389 const std::vector<Operand> operands = { 1390 { 1391 .type = OperandType::TENSOR_QUANT8_ASYMM, 1392 .dimensions = {1}, 1393 .numberOfConsumers = 1, 1394 .scale = 1.49725f, 1395 .zeroPoint = 240, 1396 .lifetime = OperandLifeTime::MODEL_INPUT, 1397 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1398 }, 1399 { 1400 .type = OperandType::TENSOR_QUANT8_ASYMM, 1401 .dimensions = {1}, 1402 .numberOfConsumers = 1, 1403 .scale = 1.64771f, 1404 .zeroPoint = 31, 1405 .lifetime = OperandLifeTime::MODEL_INPUT, 1406 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1407 }, 1408 { 1409 .type = OperandType::TENSOR_BOOL8, 1410 .dimensions = {0}, 1411 .numberOfConsumers = 0, 1412 .scale = 0.0f, 1413 .zeroPoint = 0, 1414 .lifetime = OperandLifeTime::MODEL_OUTPUT, 1415 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1416 } 1417 }; 1418 1419 const std::vector<Operation> operations = { 1420 { 1421 .type = OperationType::GREATER, 1422 .inputs = {0, 1}, 1423 .outputs = {2}, 1424 } 1425 }; 1426 1427 const std::vector<uint32_t> inputIndexes = {0, 1}; 1428 const std::vector<uint32_t> outputIndexes = {2}; 1429 std::vector<uint8_t> operandValues = {}; 1430 const std::vector<hidl_memory> pools = {}; 1431 1432 return { 1433 .operands = operands, 1434 .operations = operations, 1435 .inputIndexes = inputIndexes, 1436 .outputIndexes = outputIndexes, 1437 .operandValues = operandValues, 1438 .pools = pools, 1439 }; 1440 } 1441 1442 inline bool is_ignored_dynamic_output_shape_6(int i) { 1443 static std::set<int> ignore = {}; 1444 return ignore.find(i) != ignore.end(); 1445 } 1446 1447 // Create the model 1448 Model createTestModel_7() { 1449 const std::vector<Operand> operands = { 1450 { 1451 .type = OperandType::TENSOR_BOOL8, 1452 .dimensions = {4}, 1453 .numberOfConsumers = 1, 1454 .scale = 0.0f, 1455 .zeroPoint = 0, 1456 .lifetime = OperandLifeTime::MODEL_INPUT, 1457 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1458 }, 1459 { 1460 .type = OperandType::TENSOR_BOOL8, 1461 .dimensions = {4}, 1462 .numberOfConsumers = 1, 1463 .scale = 0.0f, 1464 .zeroPoint = 0, 1465 .lifetime = OperandLifeTime::MODEL_INPUT, 1466 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1467 }, 1468 { 1469 .type = OperandType::TENSOR_BOOL8, 1470 .dimensions = {4}, 1471 .numberOfConsumers = 0, 1472 .scale = 0.0f, 1473 .zeroPoint = 0, 1474 .lifetime = OperandLifeTime::MODEL_OUTPUT, 1475 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1476 } 1477 }; 1478 1479 const std::vector<Operation> operations = { 1480 { 1481 .type = OperationType::GREATER, 1482 .inputs = {0, 1}, 1483 .outputs = {2}, 1484 } 1485 }; 1486 1487 const std::vector<uint32_t> inputIndexes = {0, 1}; 1488 const std::vector<uint32_t> outputIndexes = {2}; 1489 std::vector<uint8_t> operandValues = {}; 1490 const std::vector<hidl_memory> pools = {}; 1491 1492 return { 1493 .operands = operands, 1494 .operations = operations, 1495 .inputIndexes = inputIndexes, 1496 .outputIndexes = outputIndexes, 1497 .operandValues = operandValues, 1498 .pools = pools, 1499 }; 1500 } 1501 1502 inline bool is_ignored_7(int i) { 1503 static std::set<int> ignore = {}; 1504 return ignore.find(i) != ignore.end(); 1505 } 1506 1507 // Create the model 1508 Model createTestModel_dynamic_output_shape_7() { 1509 const std::vector<Operand> operands = { 1510 { 1511 .type = OperandType::TENSOR_BOOL8, 1512 .dimensions = {4}, 1513 .numberOfConsumers = 1, 1514 .scale = 0.0f, 1515 .zeroPoint = 0, 1516 .lifetime = OperandLifeTime::MODEL_INPUT, 1517 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1518 }, 1519 { 1520 .type = OperandType::TENSOR_BOOL8, 1521 .dimensions = {4}, 1522 .numberOfConsumers = 1, 1523 .scale = 0.0f, 1524 .zeroPoint = 0, 1525 .lifetime = OperandLifeTime::MODEL_INPUT, 1526 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1527 }, 1528 { 1529 .type = OperandType::TENSOR_BOOL8, 1530 .dimensions = {0}, 1531 .numberOfConsumers = 0, 1532 .scale = 0.0f, 1533 .zeroPoint = 0, 1534 .lifetime = OperandLifeTime::MODEL_OUTPUT, 1535 .location = {.poolIndex = 0, .offset = 0, .length = 0}, 1536 } 1537 }; 1538 1539 const std::vector<Operation> operations = { 1540 { 1541 .type = OperationType::GREATER, 1542 .inputs = {0, 1}, 1543 .outputs = {2}, 1544 } 1545 }; 1546 1547 const std::vector<uint32_t> inputIndexes = {0, 1}; 1548 const std::vector<uint32_t> outputIndexes = {2}; 1549 std::vector<uint8_t> operandValues = {}; 1550 const std::vector<hidl_memory> pools = {}; 1551 1552 return { 1553 .operands = operands, 1554 .operations = operations, 1555 .inputIndexes = inputIndexes, 1556 .outputIndexes = outputIndexes, 1557 .operandValues = operandValues, 1558 .pools = pools, 1559 }; 1560 } 1561 1562 inline bool is_ignored_dynamic_output_shape_7(int i) { 1563 static std::set<int> ignore = {}; 1564 return ignore.find(i) != ignore.end(); 1565 } 1566 1567