Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 108 for getOperands (0.2 sec)

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

        auto walk_res = func_op.walk([&](Operation* op) {
          if (auto while_op = dyn_cast<WhileOp>(op)) {
            if (failed(propagate_operands_to_callee_arguments(
                    while_op, while_op.getOperands(),
                    {while_op.body_function(), while_op.cond_function()},
                    func_res)))
              return WalkResult::interrupt();
          } else if (auto if_op = dyn_cast<IfOp>(op)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 03 03:47:00 UTC 2023
    - 13.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tf2xla/internal/passes/xla_broadcast.cc

      if (num_cores_per_replica != 1) return success();
    
      llvm::SetVector<Value> bcasts;
      cluster->walk([&](Operation* op) {
        if (op == cluster) return WalkResult::advance();
        for (auto operand : op->getOperands()) {
          Operation* scope = operand.getParentBlock()->getParentOp();
          if (scope->isProperAncestor(replicate)) {
            bcasts.insert(operand);
          }
        }
        return WalkResult::advance();
      });
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 13 18:52:07 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/internal/passes/tpu_cluster_formation.cc

          return input->emitOpError() << "requires " << num_inputs << " operands";
        if (is_packed) {
          packed_inputs.push_back(input->getOperand(0));
          packed_ops.push_back(input);
        } else {
          replicated_inputs.push_back(
              {input->getOperands(), input->getOperand(0).getType()});
          replicated_ops.push_back(input);
        }
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 22:03:30 UTC 2024
    - 39.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/prepare_quantize.cc

      //
      func.walk([&](quantfork::QuantizeCastOp q_op) {
        // If up with end up with
        auto dq_op = dyn_cast_or_null<quantfork::DequantizeCastOp>(
            q_op.getOperand().getDefiningOp());
        if (!dq_op) {
          return;
        }
        auto dq_arg = dq_op.getOperand();
    
        if (!dq_arg.hasOneUse()) {
          // The initial quantization is used someplace else ... so it might be
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_quantize.cc

      //
      func.walk([&](quantfork::QuantizeCastOp q_op) {
        // If up with end up with
        auto dq_op = dyn_cast_or_null<quantfork::DequantizeCastOp>(
            q_op.getOperand().getDefiningOp());
        if (!dq_op) {
          return;
        }
        auto dq_arg = dq_op.getOperand();
    
        if (!dq_arg.hasOneUse()) {
          // The initial quantization is used someplace else ... so it might be
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.h

            // case it is quantized.
            for (int i = 0, e = quantized_op->getNumOperands(); i < e; ++i) {
              auto def = quantized_op->getOperand(i).getDefiningOp();
              if (auto q = llvm::dyn_cast_or_null<QuantizeOpT>(def)) {
                DenseFPElementsAttr attr;
                if (!matchPattern(q.getOperand(), m_Constant(&attr))) {
                  continue;
                }
                auto cst = rewriter.create<arith::ConstantOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/cluster_tf_ops_pass.cc

        func_metadata.original_name = func_op.getName();
        func_metadata.insertion_point = ++Block::iterator(func_op);
        func_metadata.ops.push_back(op);
    
        for (Value value : op->getOperands()) {
          std::string value_device = "";
    
          // If the value is defined as an argument of the func_op, adds it to
          // the argument list of the function that uses this op.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.cc

        std::vector<tensorflow::Tensor>& tensors,
        std::vector<tensorflow::TensorValue>& inputs) {
      // Prepare the list of Tensor inputs for the kernel.
      for (auto it : llvm::enumerate(op_->getOperands())) {
        Value operand = it.value();
        size_t idx = it.index();
    
        tensorflow::XlaExpression expr = GetExprForOperand(operand, op_, idx);
        tensorflow::XlaExpression::Kind kind = expr.kind();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:16:07 UTC 2024
    - 18.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/promote_resources_to_args.cc

          }
    
          write_op.erase();
        }
      }
    
      const int64_t num_results_before = function.getNumResults();
      auto return_operands = llvm::to_vector<4>(return_op.getOperands());
      auto result_types = llvm::to_vector<4>(return_op.getOperandTypes());
      llvm::SmallVector<std::pair<int64_t, llvm::StringRef>, 4>
          output_only_resources;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/tpu_validate_inputs.cc

    }
    // Gets the predecessors of an op wrapped in tf_executor.island.
    llvm::SmallVector<Operation*> GetPredecessors(Operation* op) {
      llvm::SmallVector<Operation*> predecessors;
      for (auto operand : op->getOperands()) {
        if (Operation* pred = operand.getDefiningOp()) {
          pred->walk([&](mlir::Operation* opinexecutor) {
            predecessors.push_back(opinexecutor);
          });
        }
      }
      return predecessors;
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 06:51:01 UTC 2024
    - 21.5K bytes
    - Viewed (0)
Back to top