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

after load jit file, torchscript runtimeError #24

Closed
dreaming12580 opened this issue Dec 13, 2023 · 1 comment
Closed

after load jit file, torchscript runtimeError #24

dreaming12580 opened this issue Dec 13, 2023 · 1 comment

Comments

@dreaming12580
Copy link

File "Grounded-Segment-Anything/EfficientSAM/app.py", line 60, in efficient_sam_box_prompt_segment
predicted_logits, predicted_iou = model(
^^^^^^
File "/root/anaconda3/envs/ml_zb/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript (most recent call last):
RuntimeError: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript (most recent call last):
RuntimeError: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript (most recent call last):
RuntimeError: shape '[0, 3, 1, 2]' is invalid for input of size 1572864

after add env like this:
export PYTORCH_NVFUSER_DISABLE=fallback && python EfficientSAM/app.py

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/root/anaconda3/envs/ml_zb/lib/python3.11/site-packages/gradio/queueing.py", line 501, in process_events
response = await self.call_prediction(awake_events, batch)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/anaconda3/envs/ml_zb/lib/python3.11/site-packages/gradio/queueing.py", line 465, in call_prediction
raise Exception(str(error) if show_error else None) from error
Exception: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript (most recent call last):
RuntimeError: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript (most recent call last):
RuntimeError: thread_predicates_.find(tv_inp) != thread_predicates_.end() INTERNAL ASSERT FAILED at "../third_party/nvfuser/csrc/lower_thread_predicate.cpp":221, please report a bug to PyTorch. Thread predicate map was not initialized, couldn't find T6_l[ 0 ]

can anyone help me ?

@balakv504
Copy link
Collaborator

Can you use the torchscript under torchscripted_model/ and try again? It does not have this issue. To get the torchscript for vit-small, you need to run export_to_torchscript.py from your machine.

Repository owner deleted a comment from balakrishnanv Dec 14, 2023
@yformer yformer closed this as completed Dec 22, 2023
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

3 participants