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
I was following the documentation on compiling a model with dynamic input shape. When saving the compiled graph module (following this), the new torch_tensorrt.save(module, path, inputs) API requires inputs to be all tensors. How do I pass dynamic shapes to torch_tensorrt.save? Error:
You should pass torch tensor inputs to the save API. These inputs should be in the range (min_shape, opt_shape, max_shape). eg: torch_tensorrt.save(trt_gm, "trt_gm.ep", inputs=[torch.randn(4, 3, 224, 224).cuda()]). We shall update the documentation to make this more clear. Thanks !!
❓ Question
I was following the documentation on compiling a model with dynamic input shape. When saving the compiled graph module (following this), the new
torch_tensorrt.save(module, path, inputs)
API requiresinputs
to be all tensors. How do I pass dynamic shapes totorch_tensorrt.save
? Error:TensorRT/py/torch_tensorrt/_compile.py
Line 420 in 77278fe
What you have already tried
Environment
conda
,pip
,libtorch
, source):Additional context
The text was updated successfully, but these errors were encountered: