Skip to content

Commit b941449

Browse files
Replace tensorflow::Status::OK() with tensorflow::OkStatus(). (#2765)
1 parent 443a47d commit b941449

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

tensorflow_addons/custom_ops/image/cc/ops/resampler_ops.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ REGISTER_OP("Addons>Resampler")
4242
c->Concatenate(output, c->Vector(c->Dim(data, -1)), &output));
4343

4444
c->set_output(0, output);
45-
return Status::OK();
45+
return Status();
4646
})
4747
.Doc(R"doc(Resampler op.)doc");
4848

@@ -57,7 +57,7 @@ REGISTER_OP("Addons>ResamplerGrad")
5757
.SetShapeFn([](InferenceContext* c) {
5858
c->set_output(0, c->input(0));
5959
c->set_output(1, c->input(1));
60-
return Status::OK();
60+
return Status();
6161
})
6262
.Doc(R"doc(Resampler Grad op.)doc");
6363

tensorflow_addons/custom_ops/layers/cc/kernels/correlation_cost_op.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ struct CorrelationCostFunctor<CPUDevice, Dtype> {
114114
auto thread_pool =
115115
context->device()->tensorflow_cpu_worker_threads()->workers;
116116
thread_pool->ParallelFor(oN * oH * oW, cost_per_pixel, work);
117-
return Status::OK();
117+
return Status();
118118
}
119119
};
120120

@@ -211,7 +211,7 @@ struct CorrelationCostGradFunctor<CPUDevice, Dtype> {
211211
context->device()->tensorflow_cpu_worker_threads()->workers;
212212
thread_pool->ParallelFor(iN * oH * oW, cost_per_pixel, work);
213213

214-
return Status::OK();
214+
return Status();
215215
}
216216
};
217217

tensorflow_addons/custom_ops/layers/cc/kernels/correlation_cost_op_gpu.cu.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ struct CorrelationCostFunctor<GPUDevice, Dtype> {
366366
padded_b_t.flat<Dtype>().data(), pad, kernel_size, max_displacement,
367367
stride_1, stride_2);
368368

369-
return Status::OK();
369+
return Status();
370370
}
371371
};
372372

@@ -452,7 +452,7 @@ struct CorrelationCostGradFunctor<GPUDevice, Dtype> {
452452
max_displacement, stride_1, stride_2, is_NCHW);
453453
}
454454

455-
return Status::OK();
455+
return Status();
456456
}
457457
};
458458

tensorflow_addons/custom_ops/layers/cc/ops/correlation_cost_op.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ REGISTER_OP("Addons>CorrelationCost")
8585

8686
// Note, the output is always NCHW (even when input is NHWC)
8787
c->set_output(0, c->MakeShape({B, Cout, Hout, Wout}));
88-
return Status::OK();
88+
return Status();
8989
})
9090
.Doc(R"Doc(
9191
Compute Correlation costs.
@@ -127,7 +127,7 @@ REGISTER_OP("Addons>CorrelationCostGrad")
127127
TF_RETURN_IF_ERROR(c->Merge(c->input(0), c->input(1), &shp_hnd));
128128
c->set_output(0, shp_hnd);
129129
c->set_output(1, shp_hnd);
130-
return Status::OK();
130+
return Status();
131131
})
132132
.Doc(R"doc(CorrelationCostGrad op.)doc");
133133

tensorflow_addons/custom_ops/layers/cc/ops/embedding_bag_ops.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ REGISTER_OP("Addons>EmbeddingBag")
4141
c->ReplaceDim(indices, c->Rank(indices) - 1, output_dim, &output));
4242
TF_RETURN_IF_ERROR(c->Merge(indices, weights, &unused));
4343
c->set_output(0, output);
44-
return Status::OK();
44+
return Status();
4545
});
4646

4747
REGISTER_OP("Addons>EmbeddingBagGrad")
@@ -63,7 +63,7 @@ REGISTER_OP("Addons>EmbeddingBagGrad")
6363
TF_RETURN_IF_ERROR(c->Merge(indices, weights, &unused));
6464
c->set_output(0, c->input(1));
6565
c->set_output(1, c->input(2));
66-
return Status::OK();
66+
return Status();
6767
});
6868

6969
} // namespace addons

tensorflow_addons/custom_ops/seq2seq/cc/ops/beam_search_ops.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ REGISTER_OP("Addons>GatherTree")
4949
&step_ids_prefix));
5050

5151
c->set_output(0, step_ids);
52-
return tensorflow::Status::OK();
52+
return tensorflow::Status();
5353
})
5454
.Doc(R"doc(
5555
Calculates the full beams from the per-step ids and parent beam ids.

tensorflow_addons/custom_ops/text/cc/ops/skip_gram_ops.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ REGISTER_OP("Addons>SkipGramGenerateCandidates")
4646
// outputs will be of rank-1, but not their sizes.
4747
c->set_output(0, c->Vector(c->UnknownDim()));
4848
c->set_output(1, c->Vector(c->UnknownDim()));
49-
return Status::OK();
49+
return Status();
5050
})
5151
.Doc(R"doc(
5252
Generates skip-gram token and label paired Tensors from the input tensor.

0 commit comments

Comments
 (0)