Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 218 for getOperands (0.3 sec)

  1. tensorflow/compiler/mlir/lite/utils/arithmetic_count_util.h

        *count = output_type.getNumElements();
        return true;
      }
    
      static bool GetInputTensorTotalSize(mlir::Operation* op, int64_t* count) {
        int64_t total_count = 0;
        for (auto input : op->getOperands()) {
          auto input_type =
              mlir::dyn_cast_or_null<mlir::RankedTensorType>(input.getType());
          if (!input_type || !input_type.hasStaticShape()) {
            return false;
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/tensor_list_ops_decomposition.cc

      auto old_terminator = block.getTerminator();
      auto new_outputs = llvm::to_vector<8>(old_terminator->getOperands());
      llvm::SmallVector<std::tuple<int64_t, int64_t, bool>, 8>
          output_buffer_to_size;
      for (auto retval : llvm::enumerate(old_terminator->getOperands())) {
        auto it = buffer_to_size.find(retval.value());
        if (it == buffer_to_size.end()) continue;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_stablehlo_composite_to_tfl_custom.cc

            composite->getLoc(), composite->getResultTypes(),
            composite->getOperands().slice(2, 3), composite.getName(),
            CustomOption(&builder, custom_option_buffer));
      }
      return builder.create<TFL::CustomOp>(
          composite->getLoc(), composite->getResultTypes(),
          composite->getOperands(), composite.getName(),
          CustomOption(&builder, custom_option_buffer));
    }
    
    }  // namespace
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/experimental/tac/transforms/cost_model.cc

    // Get total bytes transferred.
    int64_t GetTransferredTensorBytes(func::CallOp from_graph,
                                      func::CallOp to_graph) {
      int64_t total_size_transferred = 0;
      for (auto input : to_graph.getOperands()) {
        Operation* input_op = input.getDefiningOp();
        if (input_op && input_op == from_graph.getOperation()) {
          auto input_type =
              mlir::dyn_cast_or_null<RankedTensorType>(input.getType());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/ir/tf_executor.cc

      YieldOp yield = GetYield();
      return wrapped_op.getNumResults() == yield.getNumOperands() &&
             std::equal(wrapped_op.getResults().begin(),
                        wrapped_op.getResults().end(), yield.getOperands().begin());
    }
    
    mlir::LogicalResult IslandOp::verify() {
      IslandOp island = *this;
      if (!island.GetBody().args_empty())
        return island.emitOpError() << "expects body without any arguments";
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/tpu_partitioned_op_conversion.cc

            op.getLoc(), op.getType(), op.getOperands(),
            builder.getI64ArrayAttr(partition_dims), builder.getBoolAttr(false),
            op.get_XlaShardingAttr());
        op->replaceAllUsesWith(pi);
      } else {
        auto po = builder.create<TF::TPUPartitionedOutputV2Op>(
            op.getLoc(), op.getResultTypes(), op.getOperand(),
            builder.getI64ArrayAttr(partition_dims), op.get_XlaShardingAttr());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/replace_stablehlo_ops_in_main_function_with_xla_call_module_ops.cc

          liveouts.snapshot_previous_state();
          return;
        }
    
        reverse_subgraph.insert(op);
        defined_values.insert(op->getResults().begin(), op->getResults().end());
        operands.insert(op->getOperands().begin(), op->getOperands().end());
      };
    
      for (Operation* op : reverse_main_func_block_ops) {
        if (!ops_to_add.contains(op)) continue;
        // When hitting a non-StableHLO op, i.e. tf.CustomAggregatorOp, start
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/region_control_flow_to_functional.cc

        return std::nullopt;
      for (auto [arg, operand] :
           llvm::zip(block.getArguments(), call.getOperands())) {
        if (arg != operand) return std::nullopt;
      }
      for (auto [ret, operand] :
           llvm::zip(call.getResults(), yield.getOperands())) {
        if (ret != operand) return std::nullopt;
      }
      SymbolRefAttr symbol = call.getCallableForCallee().get<SymbolRefAttr>();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/tpu_colocate_splits.cc

      llvm::SmallVector<Operation*> predecessors;
      for (Value operand : op->getOperands()) {
        if (Operation* pred = operand.getDefiningOp()) {
          int result_number = llvm::cast<OpResult>(operand).getResultNumber();
          if (auto pred_island = llvm::dyn_cast<tf_executor::IslandOp>(pred)) {
            Value yield_operand = pred_island.GetYield().getOperand(result_number);
            predecessors.push_back(yield_operand.getDefiningOp());
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 27 18:44:34 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/convert_tf_control_flow_to_scf.cc

          rewriter.setInsertionPoint(current_terminator);
          SmallVector<Value, 4> scf_yield_input;
          for (auto it : llvm::zip(tf_if_region_return_type,
                                   current_terminator->getOperands())) {
            scf_yield_input.push_back(rewriter.create<CastOp>(
                current_terminator->getLoc(), std::get<0>(it), std::get<1>(it)));
          }
    
          rewriter.replaceOpWithNewOp<scf::YieldOp>(current_terminator,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 9.4K bytes
    - Viewed (0)
Back to top