Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 66 for type_attr (0.26 sec)

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

    // before the op being constant folded. Since the constant
    // folding logic will use a "arith.constant" op to replace the
    // "tf.FakeQuantWithMinMaxVarsOp", the "tfl.quantize" op is used to preserve
    // the quantization parameters as a TypeAttr and "tfl.dequantize" op used to
    // convert the output type to the next op. Here are the transformations:
    //
    // input   min cst       max cst          input   min cst       max cst
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h

    // index.
    template <typename LstmOp>
    inline QuantizedType GetIntermediateElementType(LstmOp op, int tensor_index) {
      if (tensor_index < 0 || tensor_index > 4) return nullptr;
      TypeAttr attr = op->template getAttrOfType<TypeAttr>(
          intermediate_attributes[tensor_index]);
      if (!attr) {
        return nullptr;
      }
      return QuantizedType::getQuantizedElementType(attr.getValue());
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 28K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/quantization/tensorflow/tf_to_quant.cc

    // folding logic will use a "arith.constant" op to replace the
    // "tf.FakeQuantWithMinMaxVarsOp", the "tfl.quantize" op is used to preserve
    // the quantization parameters as a TypeAttr and "tfl.dequantize" op used to
    // convert the output type to the next op. Here are the transformations:
    //
    // input   min cst       max cst          input   min cst       max cst
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/quantize_variables.cc

              builder.setInsertionPoint(assign_variable_op);
              auto new_q_op = builder.create<QuantizeOp>(
                  assign_variable_op.getLoc(), ref_qtype, dq_op.getInput(),
                  TypeAttr::get(ref_qtype));
              auto new_assign_variable_op = builder.create<AssignVariableOp>(
                  assign_variable_op.getLoc(), assign_variable_op.getResourceId(),
                  new_q_op.getResult());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tfr/passes/raise_to_tf.cc

        if (input_types.size() <= 1) return;
    
        Type target_input_type = mlir::cast<TypeAttr>(input_types[0]).getValue();
        auto result_type = UnrankedTensorType::get(target_input_type);
        for (auto i = 1; i < input_types.size(); ++i) {
          Type current_input_type = mlir::cast<TypeAttr>(input_types[i]).getValue();
          if (current_input_type != target_input_type) {
            input_values[i] =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.cc

                           legacy_float_scale, use_fake_quant_num_bits);
      if (!final_type) return {};
      return TypeAttr::get(final_type);
    }
    
    TypeAttr CastQuantizedTypeAttrFromExpressedType(const Builder builder,
                                                    const TypeAttr source,
                                                    const Type target,
                                                    const int axis) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/quantization/lite/tfl_to_std.cc

        } else if (auto q = llvm::dyn_cast<quantfork::QuantizeCastOp>(op)) {
          auto out_type = q.getResult().getType();
          auto qcast = b.create<QuantizeOp>(q.getLoc(), out_type, q.getArg(),
                                            TypeAttr::get(out_type));
          q.getResult().replaceAllUsesWith(qcast);
          if (auto extra_attr = op->getAttr(mlir::quant::kVolatileOpAttrName)) {
            qcast->setAttr(mlir::quant::kVolatileOpAttrName, extra_attr);
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 02:50:01 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc

      auto new_filter_constant_value_attr =
          DenseIntElementsAttr::get(new_filter_value_attr_type, new_filter_values);
      return rewriter.create<TFL::QConstOp>(
          filter_constant_op.getLoc(),
          /*output=*/TypeAttr::get(new_filter_result_type),
          /*value=*/new_filter_constant_value_attr);
    }
    
    // Creates the `tfl.qconst` for filter. If `rhs_op` is a `stablehlo.constant`,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 09:00:19 UTC 2024
    - 99.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/quantization/ir/ConvertConst.cc

      auto fusedLoc = rewriter.getFusedLoc(
          {qbarrier.getArg().getDefiningOp()->getLoc(), qbarrier.getLoc()});
      auto newConstOp = rewriter.create<arith::ConstantOp>(
          fusedLoc, newConstValueType, cast<TypedAttr>(newConstValue));
      rewriter.replaceOpWithNewOp<StorageCastOp>(qbarrier, qbarrier.getType(),
                                                 newConstOp);
      return success();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/ir/tfl_ops.td

        // determined while going through quantization passes.
        OptionalAttr<TypeAttr>:$input_to_input_intermediate,
        OptionalAttr<TypeAttr>:$input_to_forget_intermediate,
        OptionalAttr<TypeAttr>:$input_to_cell_intermediate,
        OptionalAttr<TypeAttr>:$input_to_output_intermediate,
        OptionalAttr<TypeAttr>:$effective_hidden_scale_intermediate
      );
    
      let results = (outs AnyTensor:$output);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 19:09:08 UTC 2024
    - 186K bytes
    - Viewed (0)
Back to top