[serialize] Support torch.gather export via Circle GatherNd#790
Conversation
This commit supports torch.gather export via Circle GatherNd. TICO-DCO-1.0-Signed-off-by: seongwoo <mhs4670go@naver.com>
|
I agree with the overall lowering direction in #786: general However, I am concerned about the PR's implementation strategy of keeping the original After this pass, the node no longer has valid I think it would be cleaner and safer to materialize an explicit internal GatherNd-like representation instead: This would make the semantic boundary clear:
Because of this, I would prefer not to merge #786 in its current form. Instead, I suggest we keep the same high-level idea—lowering Could you review this PR instead? |
arkq
left a comment
There was a problem hiding this comment.
I am concerned about the PR's implementation strategy of keeping the original aten.gather node and changing its index input to a full-coordinate tensor, then relying on a metadata flag to make the serializer interpret it as GATHER_ND.
After this pass, the node no longer has valid aten.gather semantics.
Yes, I totally agree with you. I did not know how to implement torch.gather to circle.gather_nd conversion while preserving torch graph validity - I was not aware that there is torch.ops.circle_custom.gather_nd. Your approach seems to be better indeed. The code looks OK.
This commit supports torch.gather export via Circle GatherNd.
TICO-DCO-1.0-Signed-off-by: seongwoo mhs4670go@naver.com