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

IRuntime::deserializeCudaEngine: Error Code 1: Internal Error #33

Open
lxhuse opened this issue Dec 11, 2024 · 0 comments
Open

IRuntime::deserializeCudaEngine: Error Code 1: Internal Error #33

lxhuse opened this issue Dec 11, 2024 · 0 comments

Comments

@lxhuse
Copy link

lxhuse commented Dec 11, 2024

Thank you for your great work! I encountered a problem when I run the basic_useage.py. It seems like a problem with version or others. Please tell me how to slove it. Thank you!

python3 examples/basic_usage.py     --image_encoder=data/resnet18_image_encoder.engine     --mask_decoder=data/mobile_sam_mask_decoder.engine

[12/11/2024-13:16:43] [TRT] [E] IRuntime::deserializeCudaEngine: Error Code 1: Internal Error (Failed due to an old deserialization call on a newer plan file. This might happen when the plan file was built from an older TensorRT version. You can use `trtexec --getPlanVersionOnly` to check the version of TensorRT that was used to create the plan file.)
test None
[12/11/2024-13:16:43] [TRT] [E] IRuntime::deserializeCudaEngine: Error Code 1: Internal Error (Failed due to an old deserialization call on a newer plan file. This might happen when the plan file was built from an older TensorRT version. You can use `trtexec --getPlanVersionOnly` to check the version of TensorRT that was used to create the plan file.)
test None
engine TRTModule()
engine TRTModule()
/home/lxh/Desktop/Python/nanosam/nanosam/nanosam/utils/predictor.py:84: UserWarning: The given NumPy array is not writable, and PyTorch does not support non-writable tensors. This means writing to this tensor will result in undefined behavior. You may want to copy the array to protect its data or make it writable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at /opt/conda/conda-bld/pytorch_1724789115405/work/torch/csrc/utils/tensor_numpy.cpp:206.)
  image_torch_resized = torch.from_numpy(image_np_resized).permute(2, 0, 1)
Traceback (most recent call last):
  File "examples/basic_usage.py", line 41, in <module>
    predictor.set_image(image)
  File "/home/lxh/Desktop/Python/nanosam/nanosam/nanosam/utils/predictor.py", line 158, in set_image
    self.features = self.image_encoder_engine(self.image_tensor)
  File "/home/lxh/miniconda3/envs/torch11.8/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/lxh/miniconda3/envs/torch11.8/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/lxh/miniconda3/envs/torch11.8/lib/python3.8/site-packages/torch2trt-0.5.0-py3.8.egg/torch2trt/trt_module.py", line 170, in forward
    return self._forward_post_10(*inputs)
  File "/home/lxh/miniconda3/envs/torch11.8/lib/python3.8/site-packages/torch2trt-0.5.0-py3.8.egg/torch2trt/trt_module.py", line 142, in _forward_post_10
    self.context.set_tensor_address(input_name, data_ptr)
  File "/home/lxh/miniconda3/envs/torch11.8/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1729, in __getattr__
    raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
AttributeError: 'TRTModule' object has no attribute 'context'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant