Repository navigation
Commit 90c5a67
Vulkan: handle a single tensor output arriving as a list
num_tensors_in_node() counts the tensors associated with a node rather
than the nesting of meta["val"], so it returns 1 both for a bare
FakeTensor and for a one-element list. OpRepSets treats that count as
proof of the former and passes meta["val"] straight to
filter_invalid_reprs(), which then does tensor_val.shape on a list:
File "backends/vulkan/utils.py", line 1203, in filter_invalid_reprs
extents = required_image_extents(tensor_val.shape, memory_layout)
AttributeError: 'list' object has no attribute 'shape'
Any op declared to return Tensor[] hits this whenever it happens to
produce exactly one tensor. aten.split_with_sizes_copy.default is the
case seen in the wild (RF-DETR); it aborts partitioning for the whole
model instead of the node being reported unsupported.
Unwrap the single element before filtering, matching what the
multiple-output branch below already does per element.1 parent 1e937f2 commit 90c5a67
2 files changed
Lines changed: 31 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
608 | 631 | | |
609 | 632 | | |
610 | 633 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1442 | 1442 | | |
1443 | 1443 | | |
1444 | 1444 | | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
1445 | 1452 | | |
1446 | | - | |
| 1453 | + | |
1447 | 1454 | | |
1448 | 1455 | | |
1449 | 1456 | | |
| |||
0 commit comments