Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 178 for getDefiningOp (0.2 sec)

  1. tensorflow/compiler/mlir/lite/experimental/tac/transforms/cost_model.cc

    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)
  2. tensorflow/compiler/mlir/lite/quantization/tensorflow/tf_to_quant.cc

        DenseFPElementsAttr min_value, max_value;
        if (auto id1 = dyn_cast_or_null<TF::IdentityOp>(min.getDefiningOp())) {
          id1.replaceAllUsesWith(id1.getInput());
          min = tf_op.getMin();
          rewriter.eraseOp(id1);
        }
        if (auto id2 = dyn_cast_or_null<TF::IdentityOp>(max.getDefiningOp())) {
          id2.replaceAllUsesWith(id2.getInput());
          max = tf_op.getMax();
          rewriter.eraseOp(id2);
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/split_merged_operands.cc

        // case is useful for float16 quantization. Since all ops have been
        // legalized to tflite ops, so we only care about ConstOp or QConstOp or
        // mlir constant op.
        Operation* input_op = operand.getDefiningOp();
        if (input_op == nullptr) return failure();
    
        Attribute attr;
        if (matchPattern(input_op, m_Constant(&attr))) {
          // Constant case.
          builder->setInsertionPoint(op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/legalize_tensorlist.td

    def EmptyCustomOptions : NativeCodeCall<
      "TFL::ConstBytesAttr::get($_builder.getContext(), \"\")">;
    
    def CustomOptions : NativeCodeCall<
      "CustomOptions($_builder.getContext(), $0.getDefiningOp()).value()">;
    
    class CreateStringAttr<string values> : NativeCodeCall<
      "$_builder.getStringAttr("# values #")">;
    
    def LegalizeTensorListReserve : Pat<(TF_TensorListReserveOp:$tf_op $shape, $num_elements),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 18 07:12:51 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_driver.cc

      auto bias_op = op->getOperand(bias_index).getDefiningOp<arith::ConstantOp>();
      if (!affine_op || !bias_op || input_indices.size() != 2) return false;
      if (!mlir::isa<DenseFPElementsAttr>(bias_op.getValue())) return false;
      filter_index = affine_op.GetAffineOperandIndex();
      if (!op->getOperand(filter_index).getDefiningOp<arith::ConstantOp>()) {
        return false;
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 38.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/utils/fake_quant_utils.h

                      AttrType &max_value) const {
        Value min = tf_op.getMin(), max = tf_op.getMax();
        if (auto min_id = min.getDefiningOp<TF::IdentityOp>()) {
          min = min_id.getInput();
        }
        if (auto max_id = max.getDefiningOp<TF::IdentityOp>()) {
          max = max_id.getInput();
        }
    
        if (!matchPattern(min, m_Constant(&min_value))) {
          return false;
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_utils.td

    #define COMPOSITE_UTILS_TD
    
    include "mlir/IR/PatternBase.td"
    
    // See the function doc in the header file.
    def GetNhwcReturnTypeFromNchw: NativeCodeCall<
      "GetNhwcReturnTypeFromNchw((*$0.begin()).getDefiningOp())">;
    
    // When given a DenseIntElementsAttr containing I64 elements, this extracts
    // one I32IntegerAttr from the given index.
    class GetI32At<int index>: NativeCodeCall<
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 19:05:30 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/quantize_variables.cc

        auto assign_variable_op =
            dyn_cast_or_null<AssignVariableOp>(var_handle_user);
        if (!assign_variable_op) continue;
        auto value_op = assign_variable_op.getValue().getDefiningOp();
        auto dq_op = dyn_cast_or_null<DequantizeOp>(value_op);
        if (!dq_op || ref_qtype) continue;
        ref_qtype = dq_op.getInput().getType();
      }
      return ref_qtype;
    }
    
    class QuantizeVariablesPass
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/tf_data_optimization.cc

        auto batchInputDataset = op.getInputDataset();
    
        ParallelMapDatasetOp batchInputOp = dyn_cast_or_null<ParallelMapDatasetOp>(
            batchInputDataset.getDefiningOp());
        if (!batchInputOp) return failure();
    
        // The type of the `num_parallel_calls` argument in ParallelMapDataset
        // and MapAndBatchDataset is different (int32 and int64 respectively)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_quantize.cc

          return;
        }
    
        // Invariant:
        // isa<quantfork::QuantizeCastOp>(dq_arg.getDefiningOp()) -->
        // getdq_arg.getType() != q_op.getResult().getType()
        //
        // as otherwise qdq pair would have been optimized away.
        auto qd_arg_def_q_op =
            dyn_cast_or_null<quantfork::QuantizeCastOp>(dq_arg.getDefiningOp());
        if (!qd_arg_def_q_op) {
          return;
        }
    
        qd_arg_def_q_op.emitWarning()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.2K bytes
    - Viewed (0)
Back to top