NVIDIA / NVIDIA/TensorRT

Global tensors with dynamic slice using python

Open
#4,229 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triaged
Dominant language
C++
Stars
13.4k
Forks
2.4k
Avg merge
5d 3h
Merged PRs (30d)
2

Description

Let say I define a global tensor t1, where shape is [1, 12, 2000, 112], and the actual input tensor t2 shape is [1, 12, 40, 112]. I have copied the actual value of t2 to t1 using _copy, and in the inner model logic, I use slice to get the actual content, like t1[:, :, :40, :].

However, I found this does not work in TensorRT, but works in ONNX. So how can I deal with this ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported reproduction: copy the [1, 12, 40, 112] tensor into the global [1, 12, 2000, 112] tensor, then apply t1[:, :, :40, :] in TensorRT and compare it with ONNX behavior. The issue does not name a source file or test; done would require identifying why the dynamic slice fails and documenting or validating a TensorRT-compatible way to handle it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.