Skip to content

🐛 [Bug] Encountered bug when compiling fasterrcnn_mobilenet_v3_large_320_fpn in Dynamo #1995

Closed
@gs-olive

Description

@gs-olive
Collaborator

Bug Description

When compiling the fasterrcnn_mobilenet_v3_large_320_fpn with torch_tensorrt.dynamo.compile, the following error is encountered:

[06/07/2023-16:56:55] [TRT] [W] IElementWiseLayer with inputs (Unnamed Layer* 7) [Shuffle]_output and (Unnamed Layer* 6) [Shuffle]_output: first input has type Int32 but second input has type Float.
[06/07/2023-16:56:55] [TRT] [W] IElementWiseLayer with inputs (Unnamed Layer* 8) [Shuffle]_output and (Unnamed Layer* 0) [Shuffle]_output: first input has type Int32 but second input has type Float.
[06/07/2023-16:56:55] [TRT] [W] IElementWiseLayer with inputs (Unnamed Layer* 9) [Shuffle]_output and (Unnamed Layer* 4) [Shuffle]_output: first input has type Int32 but second input has type Float.
[06/07/2023-16:56:55] [TRT] [E] 4: [elementWiseLayer.cpp::validate::36] Error Code 4: Internal Error ([ELEMENTWISE]-[unknown_ir_ops.add.Tensor]-[add]: operation SUM has incompatible input types Int32 and Float)
[06/07/2023-16:56:55] [TRT] [E] 4: [elementWiseLayer.cpp::validate::36] Error Code 4: Internal Error ([ELEMENTWISE]-[unknown_ir_ops.add.Tensor]-[add_2]: operation SUM has incompatible input types Int32 and Float)
INFO:torch_tensorrt.fx.fx2trt:TRT INetwork construction elapsed time: 0:00:00.099711
[06/07/2023-16:56:55] [TRT] [E] 4: [graphShapeAnalyzer.cpp::needTypeAndDimensions::2212] Error Code 4: Internal Error ([ELEMENTWISE]-[unknown_ir_ops.add.Tensor]-[add]: output shape can not be computed)
[06/07/2023-16:56:55] [TRT] [E] 4: [elementWiseLayer.cpp::validate::36] Error Code 4: Internal Error ([ELEMENTWISE]-[unknown_ir_ops.add.Tensor]-[add]: operation SUM has incompatible input types Int32 and Float)

To Reproduce

Steps to reproduce the behavior:

model = torchvision.models.detection.fasterrcnn_mobilenet_v3_large_320_fpn().eval().cuda()
inp = torch.rand((3, 300, 400)).cuda()
inp2 = torch.rand((3, 500, 400)).cuda()
model_acc = torch_tensorrt.dynamo.compile(model, [inp, inp2], pass_through_build_failures=True)

Expected behavior

Model should compile without errors.

Environment

  • Torch-TensorRT Version (e.g. 1.0.0): 075a028
  • PyTorch Version (e.g. 1.0): 2.1.0.dev20230606+cu118

Additional context

Related: #1565

Activity

added
bugSomething isn't working
component: dynamoIssues relating to the `torch.compile` or `torch._dynamo.export` paths
on Jun 7, 2023
github-actions

github-actions commented on Sep 8, 2023

@github-actions

This issue has not seen activity for 90 days, Remove stale label or comment or this will be closed in 10 days

gs-olive

gs-olive commented on Sep 8, 2023

@gs-olive
CollaboratorAuthor

Fixed in #2070

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No ActivitybugSomething isn't workingcomponent: dynamoIssues relating to the `torch.compile` or `torch._dynamo.export` paths

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @gs-olive

    Issue actions

      🐛 [Bug] Encountered bug when compiling `fasterrcnn_mobilenet_v3_large_320_fpn` in Dynamo · Issue #1995 · pytorch/TensorRT