Commit 190652e
committed
[Relax][Frontend][TFLite] Fix DENSIFY tests for CI compatibility
This commit fixes two issues in the DENSIFY test suite that caused
failures in TVM's CI environment:
1. Remove dependency on tfl.Int32VectorStartValuesVector
- This flatbuffers helper is absent in older tflite package versions
used in CI Docker images.
- _tflite_int32_table now builds the int32 vector manually using
builder.StartVector(4, len(values), 4).
2. Fix flatbuffers IsNestedError in _build_buffer
- The original implementation called _tflite_byte_vector (which
invokes builder.StartVector) after tfl.BufferStart, violating
flatbuffers' no-nesting rule.
- Fixed by creating the data vector before entering the Buffer table.
Also simplifies convert_fully_connected to use get_tensor_expr
directly, as suggested by gemini-code-assist, since the prefetched
node handling is already encapsulated there.1 parent 6155997 commit 190652e
2 files changed
Lines changed: 39 additions & 12 deletions
File tree
- python/tvm/relax/frontend/tflite
- tests/python/relax
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
341 | 340 | | |
342 | 341 | | |
343 | 342 | | |
| |||
1899 | 1898 | | |
1900 | 1899 | | |
1901 | 1900 | | |
1902 | | - | |
1903 | 1901 | | |
1904 | | - | |
1905 | | - | |
1906 | | - | |
1907 | | - | |
1908 | | - | |
1909 | | - | |
1910 | | - | |
| 1902 | + | |
1911 | 1903 | | |
1912 | 1904 | | |
1913 | 1905 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2461 | 2461 | | |
2462 | 2462 | | |
2463 | 2463 | | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
2464 | 2488 | | |
2465 | 2489 | | |
2466 | 2490 | | |
| |||
2494 | 2518 | | |
2495 | 2519 | | |
2496 | 2520 | | |
2497 | | - | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
2498 | 2528 | | |
2499 | 2529 | | |
2500 | 2530 | | |
| |||
2519 | 2549 | | |
2520 | 2550 | | |
2521 | 2551 | | |
2522 | | - | |
| 2552 | + | |
| 2553 | + | |
| 2554 | + | |
2523 | 2555 | | |
2524 | | - | |
| 2556 | + | |
| 2557 | + | |
| 2558 | + | |
| 2559 | + | |
2525 | 2560 | | |
2526 | 2561 | | |
2527 | 2562 | | |
| |||
0 commit comments