Skip to content

构建engine失败,返回None #585

@jishenghuang

Description

@jishenghuang

Traceback (most recent call last):
File "/workspace/ppq/ppq/samples/TensorRT/Example_Fp32.py", line 17, in
builder.create_engine(engine_path='Output/yolov8s.engine', precision="fp16")
File "/workspace/ppq/ppq/samples/TensorRT/trt_infer.py", line 259, in create_engine
log.info("Serializing engine to file: {:}".format(engine_path))
AttributeError: 'NoneType' object has no attribute 'serialize'
我发现 是这里的engine返回值为None,怎么解决呢
engine = self.builder.build_engine(self.network, self.config)
print(engine)
if not engine:
log.error("Failed to build the TensorRT engine")
with open(engine_path, "wb") as f:
log.info("Serializing engine to file: {:}".format(engine_path))
f.write(engine.serialize())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions