Paddle [IRPass]gpt-cpm-small-cn-distill 模型在Inference下图优化下运行异常

mtb9vblg  于 4个月前  发布在  其他
关注(0)|答案(2)|浏览(39)

bug描述 Describe the Bug

代码是develop编译 截止06b8fbb09e1b1d9000b4af0096591f919b27c450

模型下载

链接: https://pan.baidu.com/s/1CSqbKXVlT1gwIyCkAkDBJg?pwd=twk5 提取码: twk5

来源 https://github.com/PaddlePaddle/PaddleNLP/tree/develop/model_zoo/gpt

CUDA模式下运行出现

I0612 18:55:18.816025 3434319 interpreter_util.cc:876] End run Place(gpu:0) Op(slice), inputs:{Input[shape_out.0:int[4]({})(Place(cpu))]}, outputs:{Out[slice_out.0:int[1]({})(Place(cpu))]}.
terminate called after throwing an instance of 'phi::enforce::EnforceNotMet'
  what():  (NotFound) cache_kv0 not in VariableScope.
  [Hint: Expected HasVar(name) == true, but received HasVar(name):0 != true:1.] (at /media/wjl/D2/github/fork/Paddle/paddle/fluid/framework/new_executor/new_executor_defs.cc:146)

CPU MKLDNN启用下结果错乱。

对paddle_inference config
启用 SwitchIrOptim(0)
关闭图优化,则一切恢复正常。

图优化似乎有问题。

其他补充信息 Additional Supplementary Information

No response

相关问题