Skip to content

✨[Feature] Adding support for collections as part of many inputs/outputs in TRTorch programs #428

Closed
@narendasan

Description

@narendasan

Is your feature request related to a problem? Please describe.

Currently TRTorch can only return programs that can be represented as

f(Tensor[]) -> Tensor[]

So this includes cases like returning a single tuple or list of results or returning a single Tensor.

However we do not currently support cases like

f(Tensor[]) -> (Tensor, Tensor, (Tensor, Tensor)) 

or

f(Tensor, Tensor, (Tensor, Tensor)) -> (Tensor, (Tensor, Tensor)) 

since this requires the graph synthesis portion of the compiler to be more intelligent about the input and output.

Describe the solution you'd like

We should add the ability to store the input and output formats of the graph and be able to hook up the output of the generic tensorrt::execute_engine op to the right output format. This would require storing and packaging information about how Tensors in a flat list correspond to values in the source graph so we can reconstruct it.

Describe alternatives you've considered

We should be able to handle any form of I/O that can be reduced to Tensor[] -> Tensor[] internally

Additional context

See PRs: #283, #419

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions