Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions paddle/fluid/operators/channel_recv_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ namespace paddle {
namespace operators {

void SetReceiveStatus(const platform::Place &dev_place,
framework::Variable &status_var, bool status) {
framework::Variable *status_var, bool status) {
auto cpu = platform::CPUPlace();
auto status_tensor =
status_var.GetMutable<framework::LoDTensor>()->mutable_data<bool>({1},
cpu);
status_var->GetMutable<framework::LoDTensor>()->mutable_data<bool>({1},
cpu);
status_tensor[0] = status;
}

Expand Down Expand Up @@ -66,7 +66,7 @@ class ChannelRecvOp : public framework::OperatorBase {
bool ok = concurrency::ChannelReceive(ch, output_var);

// Set the status output of the `ChannelReceive` call.
SetReceiveStatus(dev_place, *scope.FindVar(Output(Status)), ok);
SetReceiveStatus(dev_place, scope.FindVar(Output(Status)), ok);
}
};

Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/operators/conditional_block_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ConditionalOp : public framework::OperatorBase {
if (!(ips.size() == 1UL && ips[0]->IsInitialized())) {
PADDLE_THROW("should have one initialized input as condition");
}
if (!(ips[0]->type().hash_code() == typeid(bool).hash_code() &&
if (!(ips[0]->type().hash_code() == typeid(bool).hash_code() && // NOLINT
ips[0]->numel() == 1)) {
PADDLE_THROW(
"condition input's data type should be bool, "
Expand Down
2 changes: 0 additions & 2 deletions paddle/fluid/operators/expand_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ limitations under the License. */
#include "paddle/fluid/operators/expand_op.h"
#include <vector>

#include <vector>

namespace paddle {
namespace operators {

Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/operators/go_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */

#include <thread>
#include <thread> // NOLINT
#include <vector>
#include "paddle/fluid/framework/executor.h"
#include "paddle/fluid/framework/lod_tensor.h"
Expand Down
1 change: 1 addition & 0 deletions paddle/fluid/operators/increment_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// limitations under the License.

#include "paddle/fluid/operators/increment_op.h"
#include <string>

namespace paddle {
namespace operators {
Expand Down