Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 158 for getOperands (0.18 sec)

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

        has_resource_result = true;
        int result_idx = result.getResultNumber();
    
        Value ret0 =
            op->getRegion(0).front().getTerminator()->getOperand(result_idx);
        for (Region &region : op->getRegions().drop_front()) {
          Value ret = region.front().getTerminator()->getOperand(result_idx);
          if (ret != ret0) {
            return op->emitError("Result #")
                   << result_idx
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/translate/export_graphdef.cc

        for (auto operand_and_idx : llvm::enumerate(op->getOperands()))
          TF_RETURN_IF_ERROR(AddEdgeBetweenNodes(operand_and_idx.value(), dst_node,
                                                 operand_and_idx.index()));
    
        operand_offset = op->getNumOperands();
      }
    
      // For all other ops (including tf_executor.island), add remaining edges.
      for (auto operand_and_idx : llvm::enumerate(inst->getOperands()))
        TF_RETURN_IF_ERROR(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/api/v2/tf_executor_to_graph.cc

        for (auto operand_and_idx : llvm::enumerate(op->getOperands()))
          TF_RETURN_IF_ERROR(AddEdgeBetweenNodes(operand_and_idx.value(), dst_node,
                                                 operand_and_idx.index()));
    
        operand_offset = op->getNumOperands();
      }
    
      // For all other ops (including tf_executor.island), add remaining edges.
      for (auto operand_and_idx : llvm::enumerate(inst->getOperands()))
        TF_RETURN_IF_ERROR(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 23:04:51 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/layout_optimization.cc

                                       SmallVector<TransposeOp, 2>* transpose_ops) {
      for (auto it = transpose_ops->begin(); it != transpose_ops->end(); ++it) {
        auto tranpose_op = *it;
        for (auto tranpose_operand : tranpose_op.getOperands()) {
          auto ranked_tranpose_type =
              mlir::dyn_cast_or_null<RankedTensorType>(tranpose_operand.getType());
          if (!ranked_tranpose_type) continue;
          if (ranked_tranpose_type.getRank() == permutation.size() &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/resource_op_lifting.cc

      auto new_operands = llvm::to_vector<8>(caller->getOperands());
      llvm::SmallVector<int64_t, 8> changed_indices;
      // Find the operands to change, and create the loads.
      for (auto& entry : arg_data_type_and_updated_output_index) {
        int64_t index = entry.getFirst();
        Type new_type = entry.getSecond().first;
        int64_t updated_index = entry.getSecond().second;
        auto operand = caller->getOperand(index);
        builder.setInsertionPoint(caller);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 55.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc

          // inputs.
          SmallVector<Value, 4> inputs;
          inputs.reserve(op_with_region->getNumOperands());
          for (Value operand : op_with_region->getOperands()) {
            const Type operand_type = operand.getType();
            if (mlir::isa<NoneType>(operand_type)) {
              inputs.push_back(operand);
              continue;
            }
    
            const Type element_type =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 06:04:36 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_stablehlo_custom_call_to_composite.cc

        auto decomposition = mlir::cast<FlatSymbolRefAttr>(calledComputations[0]);
    
        auto composite = rewriter.create<mlir::stablehlo::CompositeOp>(
            op.getLoc(), op.getResultTypes(), op.getOperands(), name.str(), attrs,
            decomposition.getValue());
        rewriter.replaceOp(op, composite.getResults());
        return success();
      }
    };
    
    struct LegalizeStablehloCustomCallToCompositePass
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_with_tf2xla.cc

        // while creating the ops so make sure there aren't any type changes between
        // the original op operands and the operands during the conversion.
        for (auto&& [old_val, new_val] : llvm::zip(op->getOperands(), operands)) {
          if (old_val.getType() != new_val.getType()) return failure();
        }
    
        auto abstractOp = op->getRegisteredInfo();
        if (!abstractOp) return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

    OpFoldResult LeakyReluOp::fold(FoldAdaptor adaptor) {
      auto operands = adaptor.getOperands();
      assert(operands.size() == 1 && "leaky relu has one operand");
    
      // leaky_relu(x, alpha: 1) -> x
      if (getAlpha().convertToFloat() == 1.0f &&
          getOperand().getType() == getType())
        return getOperand();
    
      auto calculate = [&](FloatAttr arg) {
        APFloat val = arg.getValue();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/passes/merge_fusion_with_dequantize.cc

            func_op.getRegion().getBlocks().front().getTerminator());
        if (!return_op) return failure();
        auto req_op = llvm::dyn_cast_or_null<mlir::stablehlo::UniformQuantizeOp>(
            return_op.getOperands()[0].getDefiningOp());
        if (!req_op) return failure();
    
        // Create a new func.call op with f32 output.
        auto new_call_op = call_op.clone();
        new_call_op->getResult(0).setType(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.9K bytes
    - Viewed (0)
Back to top