You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An error was thrown when nvidia-modelopt was not installed, albeit it was not used at all.
Traceback (most recent call last):
File "/home/holywu/test.py", line 11, in <module>
trt_model = torch_tensorrt.dynamo.compile(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/holywu/torch_2.8.dev/lib/python3.12/site-packages/torch_tensorrt/dynamo/_compiler.py", line 697, in compile
gm = post_lowering(gm, settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/holywu/torch_2.8.dev/lib/python3.12/site-packages/torch_tensorrt/dynamo/lowering/passes/_aten_lowering_pass.py", line 102, in post_lowering
gm = ATEN_POST_LOWERING_PASSES(gm, settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/holywu/torch_2.8.dev/lib/python3.12/site-packages/torch_tensorrt/dynamo/lowering/passes/pass_manager.py", line 56, in __call__
out = _pass(out, settings)
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/contextlib.py", line 81, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File "/home/holywu/torch_2.8.dev/lib/python3.12/site-packages/torch_tensorrt/dynamo/lowering/passes/constant_folding.py", line 34, in constant_fold
cf.run()
File "/home/holywu/torch_2.8.dev/lib/python3.12/site-packages/torch/_inductor/constant_folding.py", line 280, in run
return super().run(initial_env=env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/holywu/torch_2.8.dev/lib/python3.12/site-packages/torch/fx/interpreter.py", line 171, in run
self.env[node] = self.run_node(node)
^^^^^^^^^^^^^^^^^^^
File "/home/holywu/torch_2.8.dev/lib/python3.12/site-packages/torch/_inductor/constant_folding.py", line 252, in run_node
if self.is_impure(node):
^^^^^^^^^^^^^^^^^^^^
File "/home/holywu/torch_2.8.dev/lib/python3.12/site-packages/torch_tensorrt/dynamo/lowering/passes/constant_folding.py", line 104, in is_impure
if node.target in (torch.ops.tensorrt.quantize_op.default,):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/holywu/torch_2.8.dev/lib/python3.12/site-packages/torch/_ops.py", line 1317, in __getattr__
raise AttributeError(
AttributeError: '_OpNamespace' 'tensorrt' object has no attribute 'quantize_op'
Bug Description
An error was thrown when
nvidia-modelopt
was not installed, albeit it was not used at all.To Reproduce
Environment
conda
,pip
,libtorch
, source): pipAdditional context
Probably introduced by #3543
The text was updated successfully, but these errors were encountered: