Skip to content

Commit

Permalink
Automated Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 605567449
  • Loading branch information
tensorflower-gardener committed Feb 9, 2024
1 parent 30051b0 commit a293c28
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion tensorflow/core/kernels/debug_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class BaseDebugOp : public OpKernel {
// Log an error if the publishing failed.
Status PublishTensor(const Tensor& tensor, int64_t step_id = -1) {
if (debug_urls_.empty()) {
return OkStatus();
return absl::OkStatus();
} else {
Status status = DebugIO::PublishDebugTensor(
*debug_watch_key_, tensor, Env::Default()->NowMicros(), debug_urls_,
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/core/kernels/decode_compressed_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class MemoryInputStream : public io::InputStreamInterface {
bytes_to_read);
}
int64_t bytes = bytes_to_read;
Status s = OkStatus();
Status s = absl::OkStatus();
if (pos_ + bytes_to_read > len_) {
bytes = len_ - pos_;
s = errors::OutOfRange("reached end of file");
Expand All @@ -58,7 +58,7 @@ class MemoryInputStream : public io::InputStreamInterface {

Status Reset() override {
pos_ = 0;
return OkStatus();
return absl::OkStatus();
}

private:
Expand Down
20 changes: 10 additions & 10 deletions tensorflow/core/kernels/decode_proto_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Status InitDefaultValue(DataType dtype, const T value, DefaultValue* result) {
"Cannot initialize default value for unsupported type: ",
DataTypeString(dtype));
}
return OkStatus();
return absl::OkStatus();
}

template <>
Expand Down Expand Up @@ -190,7 +190,7 @@ Status InitDefaultValueFromFieldDescriptor(DataType dtype,
return InitDefaultValue(dtype, "", result);
// default: intentionally omitted in order to enable static checking.
}
return OkStatus();
return absl::OkStatus();
}

// A FieldInfo holds a handful of information from the FieldDescriptor
Expand Down Expand Up @@ -263,14 +263,14 @@ class CountCollector {
if (!SkipValue(input, field)) {
return errors::DataLoss("ReadValue: Failed skipping field when counting");
}
return OkStatus();
return absl::OkStatus();
}

// Reads (in this case counts) a length-delimited list of values.
Status ReadPackedValues(CodedInputStream* input, const FieldInfo& field,
size_t buf_size) {
if (buf_size == 0) {
return OkStatus();
return absl::OkStatus();
}

const void* tmpbuf;
Expand Down Expand Up @@ -356,7 +356,7 @@ class CountCollector {
if (!field.is_repeated && *count_ptr_ > 1) {
*count_ptr_ = 1;
}
return OkStatus();
return absl::OkStatus();
}

private:
Expand Down Expand Up @@ -395,7 +395,7 @@ class CountCollector {
}

*count_ptr_ += count;
return OkStatus();
return absl::OkStatus();
}

// Counts the number of fixed-size values in a packed field. This can be done
Expand All @@ -408,7 +408,7 @@ class CountCollector {
"Illegal data length for packed fixed-size type: ", len);
}
*count_ptr_ += len / sizeof(T);
return OkStatus();
return absl::OkStatus();
}

// Skips a single value in the input stream. Dispatches to the appropriately
Expand Down Expand Up @@ -578,7 +578,7 @@ class DenseCollector {
for (int i = next_repeat_index_; i < max_repeat_count_; i++) {
reinterpret_cast<T*>(datap_)[i] = default_value;
}
return OkStatus();
return absl::OkStatus();
}

int32 next_repeat_index_ = 0;
Expand Down Expand Up @@ -1033,7 +1033,7 @@ class DecodeProtoOp : public OpKernel {
*field_info, WireFormatLite::GetTagWireType(tag), input,
&collectors[expected_field_info_iter - fields_.begin()]));
}
return OkStatus();
return absl::OkStatus();
}

// Collects values for a single field.
Expand Down Expand Up @@ -1073,7 +1073,7 @@ class DecodeProtoOp : public OpKernel {
return errors::DataLoss(
"CollectField: Failed skipping malformed field");
}
return OkStatus();
return absl::OkStatus();
}
return collector->ReadValue(input, field);
}
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/core/kernels/deserialize_sparse_string_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class DeserializeSparseOp : public OpKernel {
return errors::InvalidArgument("Could not construct tensor from proto");
}
*result = tensor;
return OkStatus();
return absl::OkStatus();
}

Status GetAndValidateSparseTensor(
Expand Down Expand Up @@ -278,7 +278,7 @@ class DeserializeSparseOp : public OpKernel {
index, "].shape but they do not: ", rank,
" vs. ", output_shape->dim_size(0));
}
return OkStatus();
return absl::OkStatus();
}

DataType dtype_;
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/core/kernels/deserialize_sparse_variant_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ class DeserializeSparseOp : public OpKernel {
(*output_shape)->shape().DebugString());
}
*output_num_non_zeros = serialized_values.get<Tensor>()->NumElements();
return OkStatus();
return absl::OkStatus();
}

Status GetAndValidateSparseTensorIndicesAndValues(
Expand Down Expand Up @@ -356,7 +356,7 @@ class DeserializeSparseOp : public OpKernel {
(*output_values)->dim_size(0));
}

return OkStatus();
return absl::OkStatus();
}

DataType dtype_;
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/kernels/edit_distance_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Status ValidateShapes(OpKernelContext* ctx, const Tensor& hypothesis_indices,
truth_shape.shape().DebugString(), " and ",
hypothesis_shape.shape().DebugString());

return OkStatus();
return absl::OkStatus();
}

} // namespace
Expand Down
6 changes: 3 additions & 3 deletions tensorflow/core/kernels/encode_proto_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ Status WriteField(const FieldDescriptor& field_desc, const Tensor& input,
Writer(value, output);
}
}
return OkStatus();
return absl::OkStatus();
}

// Writes a possibly repeated string, bytes, or message field.
Expand All @@ -293,7 +293,7 @@ Status WriteVarLenField(const FieldDescriptor& field_desc, const Tensor& input,
// small speedup.
Writer(field_desc.number(), value, output);
}
return OkStatus();
return absl::OkStatus();
}

static void WriteStringAdapter(int field_number, const tstring& value,
Expand Down Expand Up @@ -331,7 +331,7 @@ Status WriteGroup(const FieldDescriptor& field_desc, const Tensor& input,
WireFormatLite::WriteTag(field_desc.number(),
WireFormatLite::WIRETYPE_END_GROUP, output);
}
return OkStatus();
return absl::OkStatus();
}

// Writes a (possibly repeated) field into an output stream. It is the caller's
Expand Down
12 changes: 6 additions & 6 deletions tensorflow/core/kernels/example_parsing_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class ParseExampleOp : public OpKernel {
for (int i = 0; i < keys_flat.size(); ++i) {
keys->push_back(keys_flat(i));
}
return OkStatus();
return absl::OkStatus();
}

// Copies keys from OpInputList of scalar to std::vector<string>.
Expand All @@ -123,7 +123,7 @@ class ParseExampleOp : public OpKernel {
for (const auto& key : key_list) {
keys->push_back(key.scalar<tstring>()());
}
return OkStatus();
return absl::OkStatus();
}

// Validates the shapes of input tensors.
Expand Down Expand Up @@ -205,7 +205,7 @@ class ParseExampleOp : public OpKernel {
"] == ", DataTypeString(attrs_.dense_types[d]));
}
}
return OkStatus();
return absl::OkStatus();
}

// Populates the FastParseExampleConfig from keys & defaults.
Expand Down Expand Up @@ -284,7 +284,7 @@ class ParseExampleOp : public OpKernel {
ragged_splits.set(d, result.ragged_splits[d]);
}
}
return OkStatus();
return absl::OkStatus();
}

ParseExampleAttrs attrs_;
Expand Down Expand Up @@ -566,7 +566,7 @@ class ParseSequenceExampleOp : public OpKernel {
}
}
}
return OkStatus();
return absl::OkStatus();
}

example::FastParseExampleConfig MakeContextConfig(
Expand Down Expand Up @@ -765,7 +765,7 @@ class ParseSequenceExampleOp : public OpKernel {
d, feature_list_result.ragged_splits[d]);
}
}
return OkStatus();
return absl::OkStatus();
}

ParseSequenceExampleAttrs attrs_;
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/core/kernels/fifo_queue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Status FIFOQueue::GetElementComponentFromBatch(const FIFOQueue::Tuple& tuple,
ctx->allocate_temp(tuple[component].dtype(), element_shape, out_tensor));
TF_RETURN_IF_ERROR(
batch_util::CopySliceToElement(tuple[component], out_tensor, index));
return OkStatus();
return absl::OkStatus();
}

void FIFOQueue::TryEnqueueMany(const Tuple& tuple, OpKernelContext* ctx,
Expand Down Expand Up @@ -363,7 +363,7 @@ Status FIFOQueue::MatchesNodeDef(const NodeDef& node_def) {
TF_RETURN_IF_ERROR(MatchesNodeDefCapacity(node_def, capacity_));
TF_RETURN_IF_ERROR(MatchesNodeDefTypes(node_def));
TF_RETURN_IF_ERROR(MatchesNodeDefShapes(node_def));
return OkStatus();
return absl::OkStatus();
}

// Defines a FIFOQueueOp, which produces a Queue (specifically, one
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/kernels/fingerprint_op_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class FingerprintOpTest : public OpsTestBase {
method_ = Tensor(DT_STRING, TensorShape{});
method_.scalar<tstring>()() = method;
inputs_.push_back(TensorValue(&method_));
return OkStatus();
return absl::OkStatus();
}

Tensor batch_dims_;
Expand Down
10 changes: 5 additions & 5 deletions tensorflow/core/kernels/fixed_length_record_reader_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ class FixedLengthRecordReader : public ReaderBase {
// header_bytes_ is always skipped.
TF_RETURN_IF_ERROR(buffered_inputstream_->SkipNBytes(header_bytes_));

return OkStatus();
return absl::OkStatus();
}

Status OnWorkFinishedLocked() override {
buffered_inputstream_.reset(nullptr);
return OkStatus();
return absl::OkStatus();
}

Status ReadLocked(tstring* key, tstring* value, bool* produced,
Expand All @@ -98,7 +98,7 @@ class FixedLengthRecordReader : public ReaderBase {
return s;
}
*at_end = true;
return OkStatus();
return absl::OkStatus();
}
}
}
Expand All @@ -112,7 +112,7 @@ class FixedLengthRecordReader : public ReaderBase {
return s;
}
*at_end = true;
return OkStatus();
return absl::OkStatus();
}
lookahead_cache_.append(*value, 0, bytes_to_read);
value->clear();
Expand All @@ -124,7 +124,7 @@ class FixedLengthRecordReader : public ReaderBase {
*produced = true;
++record_number_;

return OkStatus();
return absl::OkStatus();
}

Status ResetLocked() override {
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/kernels/function_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void ArgOp::Compute(OpKernelContext* ctx) {

auto validate_type = [this](const Tensor& val) {
if (val.dtype() == dtype_) {
return OkStatus();
return absl::OkStatus();
} else {
return errors::InvalidArgument("Type mismatch: actual ",
DataTypeString(val.dtype()),
Expand Down
Loading

0 comments on commit a293c28

Please sign in to comment.