Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 218 for getOperands (0.17 sec)

  1. tensorflow/compiler/mlir/lite/transforms/analyze_variables.cc

        // and mark the module as not valid for TFLite legalization.
        // Note: this might disable native variables in more than needed cases.
        // TODO(b/189370197): Enhance variable analysis.
        for (auto operand : op->getOperands()) {
          if (mlir::isa<TF::ResourceType>(
                  getElementTypeOrSelf(operand.getType()))) {
            legalize_to_tfl = false;
            return WalkResult::interrupt();
          }
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/legalize_tf_while.cc

      Operation* op = while_op.getOperation();
      // Create new TFL While op that will be used to replace TF While op.
      auto new_op = OpBuilder(op).create<TFL::WhileOp>(
          op->getLoc(), op->getResultTypes(), op->getOperands(),
          while_op.getIsStateless());
      Location loc = while_op->getLoc();
      CreateRegionWithCall(while_op.cond_function(), new_op.getCond(), loc);
      CreateRegionWithCall(while_op.body_function(), new_op.getBody(), loc);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/experimental/tac/transforms/pick_subgraphs.cc

        llvm::SetVector<Operation*>* unprocessed_subgraphs) {
      Subgraph& current_subgraph = subgraphs_.find(current_graph_call)->second;
    
      std::vector<Subgraph*> input_subgraphs;
      for (auto input : current_graph_call.getOperands()) {
        func::CallOp input_call = GetProducerCallOpOrNull(input);
        // If the input subgraph is not processed yet, we just go ahead and process
        // that one first.
        if (input_call == nullptr) continue;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 24 15:10:02 UTC 2022
    - 19.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/tpu_host_computation_expansion.cc

        if (IsTrivialUnaryOperation(&cluster_op) ||
            HasOutsideCompilationAttribute(&cluster_op)) {
          auto walk_result = cluster_op.walk([&](Operation* op) {
            for (Value operand : op->getOperands()) {
              Operation* operand_op = GetOpOfValue(operand);
              if (head_outside_compiled_ops.count(operand_op)) continue;
    
              if (operand_op->getParentRegion() == cluster_region)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/tpu_identity_pruning.cc

    // results.
    void RemoveIdentityFromRegion(Region& region) {
      region.walk([](Operation* op) {
        if (isa<TF::IdentityOp, TF::IdentityNOp>(op)) {
          op->replaceAllUsesWith(op->getOperands());
          op->erase();
        }
      });
    }
    
    void TPUIdentityPruning::runOnOperation() {
      SmallVector<tf_device::ClusterOp, 4> clusters;
      getOperation().walk(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 4.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_tpu_model_to_cpu.cc

        // which should be removed. So the replaced PartitionedCall op should keep
        // its original arguments except for the last element.
        SmallVector<Value> args = call_op.getOperands().drop_back();
    
        rewriter.replaceOpWithNewOp<TF::PartitionedCallOp>(
            call_op, float_func.getResultTypes(), args, f_attr);
        return success();
      }
    };
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tfr/ir/tfr_ops.cc

    OpFoldResult TFR::EqualOp::fold(FoldAdaptor adaptor) {
      auto operands = adaptor.getOperands();
      assert(operands.size() == 2 && "equal op has two operands");
      auto ctx = getContext();
      if (operands[0] == operands[1]) return BoolAttr::get(ctx, true);
      return BoolAttr::get(ctx, false);
    }
    
    OpFoldResult ConstOp::fold(FoldAdaptor adaptor) {
      auto operands = adaptor.getOperands();
      (void)operands;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Nov 21 16:55:41 UTC 2023
    - 38.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/rewrite_tpu_embedding_ops.cc

    template <typename OpT>
    OpT AddOperandAndRewriteAs(Operation* op, Value operand, NamedAttrList attr,
                               OpBuilder* builder) {
      builder->setInsertionPoint(op);
      auto operands = llvm::to_vector<4>(op->getOperands());
      operands.push_back(operand);
      auto new_op = builder->create<OpT>(op->getLoc(), op->getResultTypes(),
                                         operands, attr.getAttrs());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 22:55:42 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tfr/passes/canonicalize.cc

          }
          // Map the block arguments to the yield results.
          for (auto iter_op : llvm::zip(for_op.getRegionIterArgs(),
                                        terminator_op->getOperands())) {
            mapping.map(std::get<0>(iter_op), std::get<1>(iter_op));
          }
          rewriter.eraseOp(terminator_op);
        }
        SmallVector<Value, 4> returned;
        for (Value arg : for_op.getRegionIterArgs()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jan 14 22:15:06 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/utils/topological_sort.cc

          ancestor[child] = &op;
          for (Operation* predecessor : ctrlPredecessors(child)) {
            if (predecessor->getBlock() == &block) {
              incoming_ctrl_edges++;
            }
          }
          for (Value v : child->getOperands()) {
            if (v.getParentBlock() == &block) {
              incoming_data_edges++;
            }
          }
        });
        remaining_incoming_data_edges[&op] = incoming_data_edges;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Nov 08 17:01:11 UTC 2022
    - 5K bytes
    - Viewed (0)
Back to top