TensorRT icon indicating copy to clipboard operation
TensorRT copied to clipboard

feat: support 1d ITensor offsets for embedding_bag converter

Open zewenli98 opened this issue 1 year ago • 2 comments

Description

Support 1d ITensor offsets for embedding_bag converter. Note that this is only for 1d inputs.

There's a bug that same offsets with different types (tensor or ITensor) when include_last_offset=True will give different results. I doubt this is a bug from PyTorch, I'm still investigating it.

Fixes #2345

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • [x] My code follows the style guidelines of this project (You can use the linters)
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas and hacks
  • [ ] I have made corresponding changes to the documentation
  • [x] I have added tests to verify my fix or my feature
  • [x] New and existing unit tests pass locally with my changes
  • [x] I have added the relevant labels to my PR in so that relevant reviewers are notified

zewenli98 avatar Mar 08 '24 01:03 zewenli98

Thanks for the review! I just refactored the embedding_bag with native TRT layers.

zewenli98 avatar Apr 04 '24 01:04 zewenli98

This is currently blocked by a Myelin bug. Filed a NVBug internally.

zewenli98 avatar Apr 16 '24 20:04 zewenli98

With the latest Pytorch, TRT-10 GA, and Torch-TRT main branch, the embedding_bag converter works on DLRM now.

zewenli98 avatar May 01 '24 17:05 zewenli98