Skip to content

Commit

Permalink
delete bump_inplace_version
Browse files Browse the repository at this point in the history
  • Loading branch information
pangyoki committed Mar 24, 2022
1 parent bbc2390 commit 23251d9
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions paddle/fluid/pybind/eager_method.cc
Original file line number Diff line number Diff line change
Expand Up @@ -673,13 +673,6 @@ static PyObject* tensor_method__setitem_eager_tensor(TensorObject* self,
}
});

// Increase the version of Tensor self because __setitem__ is an
// inplace operator for the Tensor self.
// auto &inplace_version_counter = self_tensor->InplaceVersionCounter();
// inplace_version_counter.Bump();

self->tensor.bump_inplace_version();

// 1. Check argumnets
bool parse_index = true;

Expand Down Expand Up @@ -827,6 +820,7 @@ static PyObject* tensor_method__setitem_eager_tensor(TensorObject* self,
{
// Release gil and do tracing
py::gil_scoped_release release;
// use inplace set_value_ operator
self->tensor = set_value__dygraph_function(self->tensor, value_tensor, {},
{}, {}, attrs);
}
Expand Down

0 comments on commit 23251d9

Please sign in to comment.