lookup_table_v2_op_xpu report errors;test=kunlun#28064
Merged
fuyinno4 merged 2 commits intoPaddlePaddle:developfrom Oct 19, 2020
Merged
lookup_table_v2_op_xpu report errors;test=kunlun#28064fuyinno4 merged 2 commits intoPaddlePaddle:developfrom
fuyinno4 merged 2 commits intoPaddlePaddle:developfrom
Conversation
|
Thanks for your contribution! |
chenwhql
reviewed
Oct 19, 2020
| PADDLE_ENFORCE_EQ( | ||
| (std::is_same<DeviceContext, platform::XPUDeviceContext>::value), true, | ||
| platform::errors::InvalidArgument("Unsupported place!")); | ||
| platform::errors::PreconditionNotMet( |
| PADDLE_ENFORCE_EQ(table_var->IsType<LoDTensor>(), true, | ||
| platform::errors::InvalidArgument( | ||
| "idx in LookupTableV2XPUKernel should be LoDTensor")); | ||
| "Tensor holds the wrong type,idx in " |
| "idx_numel in LookupTableV2XPUKernel should not " | ||
| "greater than int32_t::max.")); | ||
| platform::errors::OutOfRange( | ||
| "idx_numel greater than int32_t::max. please check " |
Contributor
There was a problem hiding this comment.
idx还是ids?idx_numel是用户输入的变量吗?如果不是的话,就是我们内部C++变量,建议改成用户更容易接受的描述,比如把变量缩写拆开,比如 number of element
Contributor
Author
There was a problem hiding this comment.
已修改,拆成了number of ids
| "idx in LookupTableV2GradXPUKernel should be LoDTensor")); | ||
| PADDLE_ENFORCE_EQ(table_var->IsType<LoDTensor>(), true, | ||
| platform::errors::InvalidArgument( | ||
| "Tensor holds the wrong type,idx in " |
Contributor
There was a problem hiding this comment.
这里可能不太好改,但是需要斟酌一下,Tensor holds the wrong type,但正确type确实LoDTensor?这不是同级概念,令人困惑
| "idx_numel in LookupTableV2GradXPUKernel should not " | ||
| "greater than int32_t::max.")); | ||
| platform::errors::OutOfRange( | ||
| "idx_numel greater than int32_t::max. please check " |
fuyinno4
approved these changes
Oct 19, 2020
yinhaofeng
added a commit
to yinhaofeng/Paddle
that referenced
this pull request
Oct 20, 2020
* lookup_table_v2_op_xpu report errors;test=kunlun * lookup_table_v2_op_xpu report errors;test=kunlun
fuyinno4
pushed a commit
that referenced
this pull request
Oct 20, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR types
Bug fixes
PR changes
OPs
Describe
Fixed error message