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

Segmentation fault (core dumped) #70

Open
lisi-github opened this issue Apr 24, 2023 · 5 comments
Open

Segmentation fault (core dumped) #70

lisi-github opened this issue Apr 24, 2023 · 5 comments

Comments

@lisi-github
Copy link


when i call export_and_get_onnx_model,some errors have occurred
my gpu is v100,softwares are fastt5(0.1.4)、python(3.8.0)、torch(2.0.0)、onnx(1.13.1)、onnxruntime(1.10.0)


the detailed error information is as follows:
In-place op on output of tensor.shape. See https://pytorch.org/docs/master/onnx.html#avoid-inplace-operations-when-using-tensor-shape-in-tracing-mode
In-place op on output of tensor.shape. See https://pytorch.org/docs/master/onnx.html#avoid-inplace-operations-when-using-tensor-shape-in-tracing-mode
============= Diagnostic Run torch.onnx.export version 2.0.0+cu117 =============
verbose: False, log level: Level.ERROR
======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================

Exporting to onnx... |########## | 1/3============= Diagnostic Run torch.onnx.export version 2.0.0+cu117 =============
verbose: False, log level: Level.ERROR
======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================

Exporting to onnx... |##################### | 2/3============= Diagnostic Run torch.onnx.export version 2.0.0+cu117 =============
verbose: False, log level: Level.ERROR
======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================

Exporting to onnx... |################################| 3/3
Quantizing... |################################| 3/3
Setting up onnx model...
Traceback (most recent call last):
File "t5_onnx.py", line 8, in
model = export_and_get_onnx_model("/root/t5_correct/t5/", "/root/t5_correct/t5_onnx/")
File "/root/.local/conda/envs/py38/lib/python3.8/site-packages/fastT5/onnx_models.py", line 223, in export_and_get_onnx_model
Segmentation fault (core dumped)

@zzzhaoguziji
Copy link

I solved the problem like this
微信截图_20230529153228

@lisi-github
Copy link
Author

thank you,but my problem is such as this:
when i run this code [model = export_and_get_onnx_model("/root/t5_correct/t5/", "/root/t5_correct/t5_onnx/")] for gettig a onnx model, the Segmentation fault occurred

============= Diagnostic Run torch.onnx.export version 2.0.0+cu117 =============
verbose: False, log level: Level.ERROR
======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================

Exporting to onnx... |########## | 1/3============= Diagnostic Run torch.onnx.export version 2.0.0+cu117 =============
verbose: False, log level: Level.ERROR
======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================

Exporting to onnx... |##################### | 2/3============= Diagnostic Run torch.onnx.export version 2.0.0+cu117 =============
verbose: False, log level: Level.ERROR
======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================

Exporting to onnx... |################################| 3/3
Quantizing... |################################| 3/3
Setting up onnx model...
Traceback (most recent call last):
File "t5_onnx.py", line 7, in
model = export_and_get_onnx_model("/root/t5_correct/t5/", "/root/t5_correct/t5_onnx/")
File "/root/.local/conda/envs/py38/lib/python3.8/site-packages/fastT5/onnx_models.py", line 223, in export_and_get_onnx_model
Segmentation fault (core dumped)

@zzzhaoguziji
Copy link

This should be the same
微信截图_20230530194516

@zzzhaoguziji
Copy link

You should change n_threads to your CPU cores

@lisi-github
Copy link
Author

I understand. Thank you very much

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

2 participants