Merge pull request #31082 from Huawei-MRC-OSI:trivial-conditions
PiperOrigin-RevId: 260560709
This commit is contained in:
commit
020f237557
@ -986,7 +986,7 @@ void PrintOneDim(int dim_index, const gtl::InlinedVector<int64, 4>& shape,
|
||||
for (int64 i = 0; i < element_count; i++) {
|
||||
if (*data_index >= limit) {
|
||||
// If not enough elements has been printed, append "...".
|
||||
if (dim_index != 0 && i < element_count) {
|
||||
if (dim_index != 0) {
|
||||
strings::StrAppend(result, "...");
|
||||
}
|
||||
return;
|
||||
|
@ -3221,7 +3221,7 @@ bool ConstantFolding::PartialConcatConstFolding(GraphDef* optimized_graph,
|
||||
// child node.
|
||||
node->set_input(interval.first, added_node->name());
|
||||
}
|
||||
if (!constant_input_runs.empty() && !inputs_to_delete.empty()) {
|
||||
if (!inputs_to_delete.empty()) {
|
||||
// Fix up the inputs to the original node.
|
||||
protobuf::RepeatedPtrField<string> tmp;
|
||||
tmp.Swap(node->mutable_input());
|
||||
|
@ -372,7 +372,9 @@ class CacheDatasetOp::FileDataset : public DatasetBase {
|
||||
*end_of_sequence = true;
|
||||
return Status::OK();
|
||||
}
|
||||
if (lockfile_created_ && !iteration_completed_) return Status::OK();
|
||||
if (lockfile_created_) {
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
// Perform rudimentary locking to help catch concurrent writes to the
|
||||
// same cache files.
|
||||
|
Loading…
Reference in New Issue
Block a user