Skip to content

Commit bcd64c5

Browse files
Googlercopybara-github
authored andcommitted
No public description
PiperOrigin-RevId: 611369523 Change-Id: I47c9d9eba96f43f3133e842f688bc1241f4a8a1b
1 parent 3fbcdda commit bcd64c5

8 files changed

+27
-29
lines changed

tensorflow_compression/cc/kernels/range_coding_kernels.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Status CheckCdfShape(const TensorShape& data_shape,
144144
"The last dimension of `cdf` should be > 1: ", cdf_shape.DebugString());
145145
}
146146

147-
return tensorflow::OkStatus();
147+
return absl::OkStatus();
148148
}
149149

150150
tensorflow::Status CheckCdfValues(int precision,
@@ -169,7 +169,7 @@ tensorflow::Status CheckCdfValues(int precision,
169169
}
170170
}
171171
}
172-
return tensorflow::OkStatus();
172+
return absl::OkStatus();
173173
}
174174

175175
class RangeEncodeOp : public OpKernel {
@@ -265,7 +265,7 @@ class RangeEncodeOp : public OpKernel {
265265
}
266266

267267
encoder.Finalize(output);
268-
return tensorflow::OkStatus();
268+
return absl::OkStatus();
269269
}
270270

271271
int precision_;
@@ -369,7 +369,7 @@ class RangeDecodeOp : public OpKernel {
369369

370370
*data = decoder.Decode({cdf_slice, chip_size}, precision_);
371371
}
372-
return tensorflow::OkStatus();
372+
return absl::OkStatus();
373373
}
374374

375375
int precision_;

tensorflow_compression/cc/kernels/range_coding_kernels_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class RangeCoderOpsTest : public OpsTestBase {
130130
*output = *GetOutput(0);
131131
inputs_.clear();
132132

133-
return tensorflow::OkStatus();
133+
return absl::OkStatus();
134134
}
135135

136136
Status RunDecodeOp(int precision, absl::Span<const Tensor> input,
@@ -166,7 +166,7 @@ class RangeCoderOpsTest : public OpsTestBase {
166166
*output = *GetOutput(0);
167167
inputs_.clear();
168168

169-
return tensorflow::OkStatus();
169+
return absl::OkStatus();
170170
}
171171

172172
void TestEncodeAndDecode(int precision, const Tensor& data,

tensorflow_compression/cc/kernels/range_coding_kernels_util.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Status MergeAxes(const TensorShape& broadcast_shape,
8787
}
8888
merged_storage_shape.push_back(storage_stride);
8989

90-
return tensorflow::OkStatus();
90+
return absl::OkStatus();
9191
}
9292

9393
} // namespace tensorflow_compression

tensorflow_compression/cc/kernels/run_length_gamma_kernels_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class BitCodingOpsTest : public OpsTestBase {
7373
TF_RETURN_IF_ERROR(RunOpKernel());
7474
*output = *GetOutput(0);
7575
inputs_.clear();
76-
return tensorflow::OkStatus();
76+
return absl::OkStatus();
7777
}
7878

7979
Status RunDecodeOp(absl::Span<const Tensor> inputs, Tensor* output) {
@@ -91,7 +91,7 @@ class BitCodingOpsTest : public OpsTestBase {
9191
TF_RETURN_IF_ERROR(RunOpKernel());
9292
*output = *GetOutput(0);
9393
inputs_.clear();
94-
return tensorflow::OkStatus();
94+
return absl::OkStatus();
9595
}
9696

9797
void TestEncodeAndDecode(const Tensor& data_tensor) {

tensorflow_compression/cc/kernels/run_length_kernels_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class BitCodingOpsTest : public OpsTestBase {
7878
TF_RETURN_IF_ERROR(RunOpKernel());
7979
*output = *GetOutput(0);
8080
inputs_.clear();
81-
return tensorflow::OkStatus();
81+
return absl::OkStatus();
8282
}
8383

8484
Status RunDecodeOp(absl::Span<const Tensor> inputs, Tensor* output,
@@ -102,7 +102,7 @@ class BitCodingOpsTest : public OpsTestBase {
102102
TF_RETURN_IF_ERROR(RunOpKernel());
103103
*output = *GetOutput(0);
104104
inputs_.clear();
105-
return tensorflow::OkStatus();
105+
return absl::OkStatus();
106106
}
107107

108108
void TestEncodeAndDecode(const Tensor& data_tensor, const int run_length_code,

tensorflow_compression/cc/kernels/unbounded_index_range_coding_kernels.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ tensorflow::Status CheckIndex(int64_t upper_bound, const Tensor& index) {
5959
upper_bound, "): value=", flat(i));
6060
}
6161
}
62-
return tensorflow::OkStatus();
62+
return absl::OkStatus();
6363
}
6464

6565
tensorflow::Status CheckCdfSize(int64_t upper_bound, const Tensor& cdf_size) {
@@ -70,7 +70,7 @@ tensorflow::Status CheckCdfSize(int64_t upper_bound, const Tensor& cdf_size) {
7070
upper_bound, "]: value=", flat(i));
7171
}
7272
}
73-
return tensorflow::OkStatus();
73+
return absl::OkStatus();
7474
}
7575

7676
tensorflow::Status CheckCdf(int precision, const Tensor& cdf,
@@ -96,7 +96,7 @@ tensorflow::Status CheckCdf(int precision, const Tensor& cdf,
9696
}
9797
}
9898
}
99-
return tensorflow::OkStatus();
99+
return absl::OkStatus();
100100
}
101101

102102
// Assumes that CheckArgumentShapes().ok().
@@ -107,7 +107,7 @@ tensorflow::Status CheckArgumentValues(int precision, const Tensor& index,
107107
TF_RETURN_IF_ERROR(CheckIndex(cdf.dim_size(0), index));
108108
TF_RETURN_IF_ERROR(CheckCdfSize(cdf.dim_size(1), cdf_size));
109109
TF_RETURN_IF_ERROR(CheckCdf(precision, cdf, cdf_size));
110-
return tensorflow::OkStatus();
110+
return absl::OkStatus();
111111
}
112112

113113
tensorflow::Status CheckArgumentShapes(const Tensor& index, const Tensor& cdf,
@@ -131,7 +131,7 @@ tensorflow::Status CheckArgumentShapes(const Tensor& index, const Tensor& cdf,
131131
"should match the number of rows in 'cdf': offset.shape=",
132132
offset.shape(), ", cdf.shape=", cdf.shape());
133133
}
134-
return tensorflow::OkStatus();
134+
return absl::OkStatus();
135135
}
136136

137137
class UnboundedIndexRangeEncodeOp : public OpKernel {
@@ -365,7 +365,7 @@ class UnboundedIndexRangeDecodeOp : public OpKernel {
365365
output(i) = value;
366366
}
367367

368-
return tensorflow::OkStatus();
368+
return absl::OkStatus();
369369
}
370370

371371
int precision_;

tensorflow_compression/cc/kernels/unbounded_index_range_coding_kernels_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class UnboundedIndexRangeCoderOpsTest : public OpsTestBase {
167167
*output = *GetOutput(0);
168168
inputs_.clear();
169169

170-
return tensorflow::OkStatus();
170+
return absl::OkStatus();
171171
}
172172

173173
Status RunDecodeOpDebug(int precision, int overflow_width,
@@ -205,7 +205,7 @@ class UnboundedIndexRangeCoderOpsTest : public OpsTestBase {
205205
*output = *GetOutput(0);
206206
inputs_.clear();
207207

208-
return tensorflow::OkStatus();
208+
return absl::OkStatus();
209209
}
210210

211211
void TestEncodeAndDecode(int precision, int overflow_width,

tensorflow_compression/cc/kernels/y4m_dataset_kernels.cc

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,10 @@ class Y4MDatasetOp : public DatasetOpKernel {
9393
string DebugString() const override { return "Y4MDatasetOp::Dataset"; }
9494

9595
Status InputDatasets(vector<const DatasetBase*>* inputs) const override {
96-
return tensorflow::OkStatus();
96+
return absl::OkStatus();
9797
}
9898

99-
Status CheckExternalState() const override {
100-
return tensorflow::OkStatus();
101-
}
99+
Status CheckExternalState() const override { return absl::OkStatus(); }
102100

103101
protected:
104102
Status AsGraphDefInternal(SerializationContext* ctx,
@@ -107,7 +105,7 @@ class Y4MDatasetOp : public DatasetOpKernel {
107105
Node* filenames = nullptr;
108106
TF_RETURN_IF_ERROR(b->AddVector(filenames_, &filenames));
109107
TF_RETURN_IF_ERROR(b->AddDataset(this, {filenames}, output));
110-
return tensorflow::OkStatus();
108+
return absl::OkStatus();
111109
}
112110

113111
private:
@@ -199,7 +197,7 @@ class Y4MDatasetOp : public DatasetOpKernel {
199197
// Exit if there are no more files to process.
200198
if (file_index_ >= dataset()->filenames_.size()) {
201199
*end_of_sequence = true;
202-
return tensorflow::OkStatus();
200+
return absl::OkStatus();
203201
}
204202

205203
// Open next file.
@@ -227,7 +225,7 @@ class Y4MDatasetOp : public DatasetOpKernel {
227225
TF_RETURN_IF_ERROR(
228226
writer->WriteScalar(full_name("file_pos"), file_pos));
229227

230-
return tensorflow::OkStatus();
228+
return absl::OkStatus();
231229
}
232230

233231
Status RestoreInternal(
@@ -252,7 +250,7 @@ class Y4MDatasetOp : public DatasetOpKernel {
252250
chroma_format_));
253251
file_pos_ = file_pos;
254252
}
255-
return tensorflow::OkStatus();
253+
return absl::OkStatus();
256254
}
257255

258256
private:
@@ -280,7 +278,7 @@ class Y4MDatasetOp : public DatasetOpKernel {
280278
std::memcpy(&header[offset], chunk.data(), pos + 1);
281279
}
282280
header.resize(offset + pos + 1);
283-
return tensorflow::OkStatus();
281+
return absl::OkStatus();
284282
}
285283
// We reached the end of the file, and the header is not complete.
286284
if (!status.ok()) {
@@ -394,7 +392,7 @@ class Y4MDatasetOp : public DatasetOpKernel {
394392
"Input file '", dataset()->filenames_[file_index],
395393
"' has 4:2:0 chroma format, but odd width or height.");
396394
}
397-
return tensorflow::OkStatus();
395+
return absl::OkStatus();
398396
}
399397

400398
mutex mu_;

0 commit comments

Comments
 (0)