PaddlePaddle / Paddle

PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署)

Home Page:http://www.paddlepaddle.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

我使用多线程启动ppstructure+ocr处理任务(具体起了两个线程),运行时报错PreconditionNotMetError: Tensor's dimension is out of bound.,单线程运行没问题

binfox1 opened this issue · comments

请提出你的问题 Please ask your question

完整报错:
PreconditionNotMetError: Tensor's dimension is out of bound.Tensor's dimension must be equal or less than the size of its memory.But received Tensor's dimension is 7741440, memory's size is 7004160.
[Hint: Expected numel() * SizeOf(dtype()) <= memory_size(), but received numel() * SizeOf(dtype()):7741440 > memory_size():7004160.] (at /paddle/paddle/phi/core/dense_tensor_impl.cc:55)
[operator < fused_conv2d > error]

您好,麻烦补充下飞桨版本号,复现代码;

另外,请教下为什么会有这种诉求,是想提升推理服务并发度吗,部署多个服务,启多个进程是不是更合适。两个线程运行同一份数据和模型,如果没做好线程间同步和互斥机制,问题会比较大,而且并没有真正高并发。