Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [Bug] Serde issues with torch-trt save #3205

Open
peri044 opened this issue Oct 2, 2024 · 0 comments
Open

🐛 [Bug] Serde issues with torch-trt save #3205

peri044 opened this issue Oct 2, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@peri044
Copy link
Collaborator

peri044 commented Oct 2, 2024

Bug Description

import torch_tensorrt as trt
inputs = [trt.Input(min_shape=(1, 1, 28, 28), 
                   opt_shape=(50, 1, 28, 28), 
                   max_shape=(64, 1, 28, 28), 
                   dtype=torch.float32)]
exp_program = trt.dynamo.trace(model_from_state, inputs)
trt_gm = trt.dynamo.compile(exp_program, inputs=inputs)

torch_inputs = torch.randn(50, 1, 28, 28).cuda()
trt.save(trt_gm, "trt_model.ep", inputs=torch_inputs)

model = torch.export.load("trt_model.ep")

Error :

torch/fx/experimental/symbolic_shapes.py:4449] s0 is not in var_ranges, defaulting to unknown range. E1002 18:36:09.951000 124112691492352 torch/fx/experimental/recording.py:281] failed while running evaluate_expr(*(s0 >= 0, True), **{'fx_node': None})

Expected behavior

Environment

Build information about Torch-TensorRT can be found by turning on debug messages

  • Torch-TensorRT Version (e.g. 1.0.0):
  • PyTorch Version (e.g. 1.0):
  • CPU Architecture:
  • OS (e.g., Linux):
  • How you installed PyTorch (conda, pip, libtorch, source):
  • Build command you used (if compiling from source):
  • Are you using local sources or building from archives:
  • Python version:
  • CUDA version:
  • GPU models and configuration:
  • Any other relevant information:

Additional context

@peri044 peri044 added the bug Something isn't working label Oct 2, 2024
@peri044 peri044 self-assigned this Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant