You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/07/07 03:53:42 UTC

[GitHub] [tvm] shingjan commented on pull request #12027: [PyTorch] Add aten::embedding_bag

shingjan commented on PR #12027:
URL: https://github.com/apache/tvm/pull/12027#issuecomment-1177031938

   @masahi This implementation still failed the test case with 1D input as the offsets are parsed into:
   ```
   free_var %input2: Tensor[(2), int64];
   %input2
   ```
   which cannot be folded to constant at compile time even this 1D case is actually identical to 2D case:
   ```
       # 1D case
       input = torch.tensor([2, 2, 2, 2, 4, 3, 2, 9])
       offsets = torch.tensor([0, 4])
       # which is equivalent to  
       input = torch.tensor([[2, 2, 2, 2], [4, 3, 2, 9]])
   ```
   My take is that we can support 2D case here and see if there could be any workaround for the 2D cases like above. Note that `sparse` and `per_sample_weights` are also taken care of.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org