Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for use_empty (0.44 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/remove_unused_while_results.cc

    };
    
    // Prunes result defining op if possible, returns true if pruning was done.
    bool TryPruneResultDefiningOp(TF::WhileRegionOp while_op, OpResult result) {
      // Don't prune if result is used.
      if (!result.use_empty()) return false;
    
      Block& body_block = while_op.getBody().front();
      Block& cond_block = while_op.getCond().front();
      Operation* body_yield_op = body_block.getTerminator();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Nov 16 01:49:07 UTC 2022
    - 5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/xla_rewrite_util.cc

          for (mlir::Operation* user :
               llvm::make_early_inc_range(result.getUsers())) {
            if (llvm::isa<mlir::TF::TPUPartitionedOutputV2Op>(user)) {
              assert(user->use_empty());
              user->erase();
            }
          }
        }
    
        for (auto operand : cluster.getOperands()) {
          mlir::Operation* def = operand.getDefiningOp();
          if (operand.hasOneUse() &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 13 03:57:18 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/tpu_reorder_replicate_and_partitioned_inputs.cc

            assert(replicated_input->use_empty());
            replicated_input->erase();
            return WalkResult::advance();
          });
    
      if (result.wasInterrupted()) {
        signalPassFailure();
        return;
      }
    
      getOperation()->walk([](TF::TPUPartitionedInputV2Op partitioned_input) {
        if (partitioned_input->use_empty()) partitioned_input->erase();
      });
    }
    
    }  // namespace
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jan 24 23:08:55 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/modify_io_nodes.cc

            quantize_op.emitError(" Couldn't be modified to the requested type.");
            return failure();
          }
          new_input_types[i] = arg_type;
          arg.dropAllUses();
          if (quantize_op.use_empty()) {
            quantize_op.erase();
          }
        } else {
          // `arg` has multiple uses or the user isn't a quantiz op (so we couldn't
          // rewrite it to a different type. Make a copy of the `arg` and replace
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/name_anonymous_iterators.cc

          op->getLoc(), op->getResultTypes()[0], name, /*container=*/"",
          op.getOutputTypes(), op.getOutputShapes());
      op->getResults()[0].replaceAllUsesWith(new_op->getResults()[0]);
      if (op->use_empty()) op->erase();
      return count;
    }
    
    void NameAnonymousIteratorsPass::runOnOperation() {
      int count = 1;
      getOperation().walk(
          [&](TF::AnonymousIteratorOp op) { count = replace(op, count); });
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tfr/passes/rewrite_quantized_io.cc

            auto new_op = builder.create<TFR::CastOp>(
                returned_op->getLoc(), new_type, returned_op.getArg());
            returned_value.set(new_op.getResult());
            if (returned_op.use_empty()) {
              returned_op.erase();
            }
          } else {
            returned_value.get().getDefiningOp()->emitError(
                "The producer of quantized type result should be a tfr.cast op.");
            return;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 08 01:19:25 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/tpu_partitioned_op_conversion.cc

          status = ReplacePartitionedOp(num_cores_per_replica, partitioned_output);
        }
    
        if (status.has_value()) {
          if (failed(*status) || !op->use_empty()) return WalkResult::interrupt();
    
          op->erase();
        }
    
        return WalkResult::advance();
      });
    
      if (result.wasInterrupted()) {
        signalPassFailure();
        return;
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/sink_constant.cc

              LLVM_DEBUG(llvm::dbgs() << "Re-use sunk constant " << use->get()
                                      << "\n     in " << use->get() << "\n");
              if (constant.use_empty()) const_op.erase();
              return;
            }
            if (constant.hasOneUse()) {
              LLVM_DEBUG(llvm::dbgs() << "Moved constant " << constant << "\n");
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 4.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/optimize_global_tensors.cc

        llvm::BitVector args_to_erase(func.getNumArguments());
        for (int i = 0, e = func.getNumArguments(); i < e; i++) {
          if (func.getArgAttr(i, "tf_saved_model.bound_input") &&
              func.getArgument(i).use_empty()) {
            args_to_erase.set(i);
          }
        }
        func.eraseArguments(args_to_erase);
      }
    }
    
    void OptimizeGlobalTensorsPass::runOnOperation() {
      auto module = getOperation();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tfr/passes/canonicalize.cc

          mapping.map(std::get<0>(iter_op), std::get<1>(iter_op));
        }
        mapping.map(iv, for_op.getLowerBound());
        for (auto i = 0; i < trip_count; ++i) {
          if (!iv.use_empty()) {
            // iv' = iv + step * i;
            Value iter = rewriter.create<arith::ConstantIndexOp>(loc, i);
            Value step_cst =
                rewriter.create<arith::ConstantIndexOp>(loc, step.getSExtValue());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jan 14 22:15:06 UTC 2023
    - 6.8K bytes
    - Viewed (0)
Back to top