Closed
Description
Bug Description
When compiling the fasterrcnn_mobilenet_v3_large_320_fpn
with torch_tensorrt.dynamo.compile
, using the use_experimental_rt=True
argument, the following error is encountered:
Outputs: [
id: 0
name: output0
shape: [2, 960, 13, 14]
dtype: Float
id: 1
name: output1
shape: [1, 160, 1, 1]
dtype: Float
id: 2
name: output2
shape: [1, 960, 1, 1]
dtype: Float
id: 3
name: output3
shape: [2, 960, 1, 1]
dtype: Float
}
...
DEBUG: [Torch-TensorRT - Debug Build] - Output Name: output0 Shape: [2, 960, 13, 14]
DEBUG: [Torch-TensorRT - Debug Build] - Output Name: output0 Shape: [2, 960, 13, 14]
DEBUG: [Torch-TensorRT - Debug Build] - Output Name: output0 Shape: [2, 960, 13, 14]
DEBUG: [Torch-TensorRT - Debug Build] - Output Name: output3 Shape: [2, 960, 1, 1]
ERROR: [Torch-TensorRT - Debug Build] - 3: [executionContext.cpp::enqueueV3::2666] Error Code 3: API Usage Error (Parameter check failed at: runtime/api/executionContext.cpp::enqueueV3::2666, condition: mContext.profileObliviousBindings.at(profileObliviousIndex) || getPtrOrNull(mOutputAllocators, profileObliviousIndex)
Note the difference in the logged outputs and the engine-reported outputs.
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, use_experimental_rt=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