未验证 提交 3a7980f2 编写于 作者: X xiongkun 提交者: GitHub

bugfix for sparse tensor reduce. (#52785)

上级 a482f6bf
...@@ -821,9 +821,9 @@ void EagerReducer::MarkVarReady(const size_t var_index, ...@@ -821,9 +821,9 @@ void EagerReducer::MarkVarReady(const size_t var_index,
auto &group = groups_[group_index]; auto &group = groups_[group_index];
auto &group_tensor = group.dense_tensors_[inside_group_index]; auto &group_tensor = group.dense_tensors_[inside_group_index];
const auto length = group.length_[inside_group_index];
if (!group.is_sparse_) { if (!group.is_sparse_) {
const auto length = group.length_[inside_group_index];
if (is_used_var) { if (is_used_var) {
auto *autograd_meta = tensors_[var_index].get_autograd_meta(); auto *autograd_meta = tensors_[var_index].get_autograd_meta();
auto &grad_tensor = auto &grad_tensor =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册