Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
gs-olive opened this issue Jun 7, 2023 · 2 comments
Assignees
Labels
bug Something isn't working component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths No Activity

Comments

@gs-olive
Copy link
Collaborator

gs-olive commented Jun 7, 2023

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

@github-actions
Copy link

github-actions bot commented Sep 8, 2023

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

@gs-olive
Copy link
Collaborator Author

gs-olive commented Sep 8, 2023

Fixed in #2070

@gs-olive gs-olive closed this as completed Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths No Activity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant