PaddlePaddle / PaddlePaddle/Paddle

保存paddle模型时infer_slots_data插入位置导致预估出core

Open
#51,143 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status/following-up type/question
Dominant language
C++
Stars
24.1k
Forks
6k
Avg merge
4d 17h
Merged PRs (30d)
60

Description

请提出你的问题 Please ask your question

将infer_slots_data 放到sequence_pool 之前,预估出core,放到sequence_pool 之后,则不出core,求问原因

for data in slots:
emb = fluid.layers.embedding(input=data, size=[self._dict_dim, self._emb_dim], is_sparse=True, is_distributed=True, param_attr=fluid.ParamAttr(name="embedding"))
self.infer_slots_data.append(emb)
bow = fluid.layers.sequence_pool(input=emb, pool_type='sum')
#self.infer_slots_data.append(emb)

core信息:
#0 0x00007f1fba52422b in paddle::operators::ConcatOp::GetExpectedKernelType(paddle::framework::ExecutionContext const&) const ()

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported Python snippet, comparing the graph when infer_slots_data is appended before versus after sequence_pool. Then inspect the ConcatOp::GetExpectedKernelType frame from the core output and reproduce the model-save or inference path. Done means identifying why the insertion order triggers the crash and documenting a confirmed fix or reproducible diagnosis.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
backend, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.