Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 88 for getOperands (0.31 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/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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. tensorflow/compiler/mlir/tensorflow/analysis/resource_value_typed_analyzer.cc

          // Propagate the analysis results from within the callee's body.
          PropagatePotentiallyWrittenUpFromCallee(batch_function.func().getRegion(),
                                                  batch_function.getOperands());
          return;
        }
        // For all other ops, we assume it mutates all resources it uses, so
        // this errs on the side of being conservative. We should improve
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/reduce_type_precision.cc

        auto const_type = mlir::dyn_cast<ShapedType>(op.getOperand(0).getType());
        auto result_type = mlir::dyn_cast<ShapedType>(op.getResult().getType());
        if (!const_type || !const_type.getElementType().isSignlessInteger(4) ||
            !result_type || !result_type.getElementType().isSignlessInteger(8)) {
          return failure();
        }
    
        auto input_op =
            dyn_cast<arith::ConstantOp>(op.getOperand(0).getDefiningOp());
        if (!input_op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/xla_inline_device_ops.cc

      // This is the last op, should be tf_device::ReturnOp.
      assert(mlir::isa<mlir::tf_device::ReturnOp>(return_op));
    
      Value old_val, new_val;
      for (auto it : llvm::zip(cluster_op.getResults(), return_op.getOperands())) {
        std::tie(old_val, new_val) = it;
        old_val.replaceAllUsesExcept(new_val, &return_op);
      }
    
      cluster_op.erase();
    }
    
    void XlaInlineDeviceOpsPass::runOnOperation() {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 04 00:59:46 UTC 2022
    - 2.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/tf_functional_to_executor.cc

          island.getBody().front().begin(), body.getOperations(),
          copy_range.begin(), copy_range.end());
      builder.setInsertionPointToEnd(&island.getBody().front());
      builder.create<tf_executor::YieldOp>(loc, return_op.getOperands());
      for (auto item : llvm::enumerate(graph_op.getResults())) {
        return_op.setOperand(item.index(), item.value());
      }
    }
    
    std::unique_ptr<OperationPass<func::FuncOp>>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Aug 11 20:52:36 UTC 2023
    - 4.1K bytes
    - Viewed (0)
Back to top