Traceback (most recent call last):
File "/home/shahe/.local/lib/python3.12/site-packages/sympy/core/expr.py", line 4035, in _mag
mag_first_dig = int(ceil(log10(xpos)))
^^^^^^^^^^^^^^^^^
OverflowError: cannot convert float infinity to integer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/shahe/scratch/torch-trt-models/ZoomASR/single_decode.py", line 650, in <module>
main()
File "/home/shahe/scratch/torch-trt-models/ZoomASR/single_decode.py", line 566, in main
compile_decoder_with_trt(model, decoder_ep, args.export_dir)
File "/home/shahe/scratch/torch-trt-models/ZoomASR/single_decode.py", line 378, in compile_decoder_with_trt
model.decoder = torch_tensorrt.dynamo.compile(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/shahe/.local/lib/python3.12/site-packages/torch_tensorrt/dynamo/_compiler.py", line 788, in compile
trt_gm = compile_module(
^^^^^^^^^^^^^^^
File "/home/shahe/.local/lib/python3.12/site-packages/torch_tensorrt/dynamo/_compiler.py", line 1006, in compile_module
submodule_inputs = partitioning.construct_submodule_inputs(submodule)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/shahe/.local/lib/python3.12/site-packages/torch_tensorrt/dynamo/partitioning/common.py", line 93, in construct_submodule_inputs
get_input(input_shape, input_meta.dtype, name=input.name)
File "/home/shahe/.local/lib/python3.12/site-packages/torch_tensorrt/dynamo/partitioning/common.py", line 63, in get_input
return construct_dynamic_input(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/shahe/.local/lib/python3.12/site-packages/torch_tensorrt/dynamo/partitioning/common.py", line 31, in construct_dynamic_input
min_max_opt = extract_var_range_info(dim)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/shahe/.local/lib/python3.12/site-packages/torch_tensorrt/dynamo/utils.py", line 427, in extract_var_range_info
min_val, max_val = int(var_range.lower), int(var_range.upper)
^^^^^^^^^^^^^^^^^^^^
File "/home/shahe/.local/lib/python3.12/site-packages/sympy/core/expr.py", line 308, in __int__
r = self.round(2)
^^^^^^^^^^^^^
File "/home/shahe/.local/lib/python3.12/site-packages/sympy/core/expr.py", line 3856, in round
digits_to_decimal = _mag(x) # _mag(12) = 2, _mag(.012) = -1
^^^^^^^
File "/home/shahe/.local/lib/python3.12/site-packages/sympy/core/expr.py", line 4037, in _mag
mag_first_dig = int(ceil(Float(mpf_log(xpos._mpf_, 53))/log(10)))
^^^^^^^^^^
AttributeError: 'Infinity' object has no attribute '_mpf_'
The last command will fail with the above error message.
The command should run without error.
Bug Description
When running ZoomASR model with Torch-TensorRT, I encountered this issue:
To Reproduce
Steps to reproduce the behavior:
The last command will fail with the above error message.
Expected behavior
The command should run without error.
Note that there is no issue when running with this Torch-TensorRT code:
https://github.com/wenbingl/TensorRT/tree/dev
Environment
conda,pip,libtorch, source): pipAdditional context