Skip to content

Commit

Permalink
fix gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
2742195759 committed Nov 24, 2021
1 parent 81e018e commit 1889e07
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions paddle/fluid/operators/sum_op.cu
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ void SumToLoDTensor(const framework::ExecutionContext &context) {

if (!in_place) {
auto *out_ptr = out->mutable_data<T>(context.GetPlace());
if (in_num >= 1 && in_vars[0]->IsType<framework::LoDTensor>() &&
in_vars[0]->Get<framework::LoDTensor>().IsInitialized()) {
if (in_num >= 1 && in_vars[0]->IsType<framework::LoDTensor>()) {
auto &in_0_tensor = in_vars[0]->Get<framework::LoDTensor>();
if (in_0_tensor.numel() > 0) {
in_place = (in_0_tensor.data<T>() == out_ptr);
Expand All @@ -110,9 +109,7 @@ void SumToLoDTensor(const framework::ExecutionContext &context) {

// Sum of two tensors
if (in_num == 2 && in_vars[0]->IsType<framework::LoDTensor>() &&
in_vars[1]->IsType<framework::LoDTensor>() &&
in_vars[0]->Get<framework::LoDTensor>().IsInitialized() &&
in_vars[1]->Get<framework::LoDTensor>().IsInitialized()) {
in_vars[1]->IsType<framework::LoDTensor>()) {
auto &in_0 = in_vars[0]->Get<framework::LoDTensor>();
auto &in_1 = in_vars[1]->Get<framework::LoDTensor>();
int64_t length_0 = in_0.numel();
Expand Down

1 comment on commit 1889e07

@paddle-bot-old
Copy link

@paddle-bot-old paddle-bot-old bot commented on 1889e07 Nov 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵️ CI failures summary

🔍 PR: #37474 Commit ID: 1889e07 contains failed CI.

🔹 Failed: PR-CI-CINN

test_failed
2021-11-24 18:13:44 The following tests FAILED:
2021-11-24 18:13:44 178 - cinn_lib_test (Child aborted)
2021-11-24 18:13:44 182 - cinn_graph_symbolization_test (SEGFAULT)
2021-11-24 18:13:44 Errors while running CTest
2021-11-24 18:13:44 paddle/scripts/paddle_build.sh: line 1024: warning: run_pending_traps: bad value in trap_list[17]: 0x5646cc16cc30
2021-11-24 18:13:44 At least one test failed with exit code => 0
2021-11-24 18:13:44 paddle/scripts/paddle_build.sh: line 1023: warning: run_pending_traps: bad value in trap_list[17]: 0x5646cc16cc30
2021-11-24 18:13:44 1 card TestCases Total Time: 1s
2021-11-24 18:13:44 1 card TestCases finished!!!!
2021-11-24 18:13:44 ++ date +%s
2021-11-24 18:13:44 + ut_endTime_s=1637748824
2021-11-24 18:13:44 + echo 'CINN testCase Time: 1s'
2021-11-24 18:13:44 CINN testCase Time: 1s
2021-11-24 18:13:44 + [[ 1 != \0 ]]
2021-11-24 18:13:44 + exit 8
2021-11-24 18:13:44 + EXCODE=8
2021-11-24 18:13:44 + echo 8
2021-11-24 18:13:44 8
2021-11-24 18:13:44 + echo 'ipipe_log_param_EXCODE: 8'
2021-11-24 18:13:44 ipipe_log_param_EXCODE: 8
2021-11-24 18:13:44 + set +x

Please sign in to comment.