!9884 Fix bug while there are multiple embedding-lookup

From: @zpac
Reviewed-by: @limingqi107,@kisnwang
Signed-off-by: @kisnwang
pull/9884/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit 6a5cf1c711

@ -82,6 +82,9 @@ void SparseApplyAdamPSKernel::ReInit(const std::vector<AddressPtr> &inputs) {
bool SparseApplyAdamPSKernel::Execute(const std::vector<AddressPtr> &inputs, const std::vector<AddressPtr> &workspace,
const std::vector<AddressPtr> &outputs) {
ReInit(inputs);
if (indices_size_ == 0) {
return true;
}
return Launch(inputs, workspace, outputs);
}

@ -89,6 +89,9 @@ void SparseApplyFtrlPSKernel::ReInit(const std::vector<AddressPtr> &inputs) {
bool SparseApplyFtrlPSKernel::Execute(const std::vector<AddressPtr> &inputs, const std::vector<AddressPtr> &workspace,
const std::vector<AddressPtr> &outputs) {
ReInit(inputs);
if (indices_size_ == 0) {
return true;
}
return Launch(inputs, workspace, outputs);
}

@ -82,6 +82,9 @@ bool SparseApplyLazyAdamPSKernel::Execute(const std::vector<AddressPtr> &inputs,
const std::vector<AddressPtr> &workspace,
const std::vector<AddressPtr> &outputs) {
ReInit(inputs);
if (indices_size_ == 0) {
return true;
}
return Launch(inputs, workspace, outputs);
}

Loading…
Cancel
Save