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

PPQ量化后,不能导出engine(05_QuantizationAgain.py) #569

Open
koihoo opened this issue Jul 25, 2024 · 1 comment
Open

PPQ量化后,不能导出engine(05_QuantizationAgain.py) #569

koihoo opened this issue Jul 25, 2024 · 1 comment

Comments

@koihoo
Copy link

koihoo commented Jul 25, 2024

当我将误差较大的层送入TargetPlatform.FP32后,生成int8.onnx,但是无法生成对应的int8.engine文件,报错如下:

Traceback (most recent call last):
File "/work_dir/demo/ppq_code/int8trt.py", line 2, in
build_engine(onnx_file='/work_dir/demo/models/6-x-slimneck-best(PPQ_2).onnx',
File "/usr/local/lib/python3.10/dist-packages/ppq-0.6.6-py3.10.egg/ppq/utils/TensorRTUtil.py", line 263, in build_engine
f.write(engine.serialize())
AttributeError: 'NoneType' object has no attribute 'serialize'

image
请问怎么解决这个问题呢?

@jishenghuang
Copy link

我也遇到了,是这个build_engine(onnx_file='/work_dir/demo/models/6-x-slimneck-best(PPQ_2).onnx返回值是None,所以报了一个这个错误

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