Closed HolyWu closed 5 months ago
Hi @HolyWu can you run the above with
optimized_model = torch_tensorrt.compile(
model,
ir="torch_compile",
inputs=inputs,
enabled_precisions={torch.half},
debug=True,
truncate_double=True,
min_block_size=1,
device=device,
)
It should pass then. The value 2 is taken as float64 which is not supported by TRT.
Hi @apbose. Adding truncate_double=True
does resolve it. Just wodering why an integer value (2) would be taken as float64 (2.0) in the first place and then requires the user to specify truncate_double=True
. Couldn't the converter force the argument to be an integer?
We generally do not keep the default as True since we would not want the model to be modified by itself by torchTRT when the user does not explicitly specify so.
Bug Description
To Reproduce
Environment
conda
,pip
,libtorch
, source): pip