pytorch / TensorRT

PyTorch/TorchScript/FX compiler for NVIDIA GPUs using TensorRT
https://pytorch.org/TensorRT
BSD 3-Clause "New" or "Revised" License
2.61k stars 351 forks source link

fix: attribute error caused by `trt.BuilderFlag.STRICT_TYPES` #3300

Open jiwoong-choi opened 1 week ago

jiwoong-choi commented 1 week ago

Description

When strict_type_constraints is True, accessing trt.BuilderFlag.STRICT_TYPES causes AttributeError: type object 'tensorrt.tensorrt.BuilderFlag' has no attribute 'STRICT_TYPES'. Indeed, there is no such builder flag in TensorRT, and it should be replaced by trt.BuilderFlag.OBEY_PRECISION_CONSTRAINTS.

Type of change

Bug fix (non-breaking change which fixes an issue)

Checklist: