🐛 [Bug] Differing behavior for fully-supported models with collection outputs, when toggling require_full_compilation
#1598
Labels
bug
Something isn't working
Bug Description
For model types which are fully-supported in Torch-TRT, but which use complex collections of outputs, for example
Tuple[Tensor, Tensor]
, orTuple[Tensor, Tuple[Tensor, Tensor]]
, the compilation behavior of Torch-TRT is different when the flagrequire_full_compilation
is enabled versus not.When
require_full_compilation=False
, the model compiles successfully, and the only operations executed in Torch are collections-processing operations. Whenrequire_full_compilation=True
, however, the model fails with:To Reproduce
Steps to reproduce the behavior:
require_full_compilation=True
, then compile the scripted model:Expected behavior
Model should compile with
require_full_compilation=True
, when containing nested Tuple collection.Environment
python setup.py develop
Additional context
This bug is related to, but not the same as #1595, as this bug relates to nested collection outputs and not inputs. The resolution to both of these bugs should resolve the overall issue of having fully-compiled models with complex collections of inputs and outputs.
This particular bug also appears when compiling the HuggingFace BERT uncased model with
require_full_compilation=True
.The text was updated successfully, but these errors were encountered: