Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for GetQuantizedTypeAttr (0.33 sec)

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

        IntegerAttr num_bits = rewriter.getI64IntegerAttr(tf_op.getNumBits());
        BoolAttr narrow_range = rewriter.getBoolAttr(tf_op.getNarrowRange());
        Type res_type = tf_op.getType();
        TypeAttr qtype = quant::GetQuantizedTypeAttr(
            rewriter, input_type, min_value, max_value, quant_dim, num_bits,
            narrow_range, /*is_signed=*/true, /*legacy_float_scale=*/false,
            use_fake_quant_num_bits_);
        if (!qtype) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/quantization/tensorflow/tf_to_quant.cc

        IntegerAttr num_bits = rewriter.getI64IntegerAttr(tf_op.getNumBits());
        BoolAttr narrow_range = rewriter.getBoolAttr(tf_op.getNarrowRange());
        Type res_type = tf_op.getType();
        TypeAttr qtype = quant::GetQuantizedTypeAttr(
            rewriter, res_type, min_value, max_value, quant_dim, num_bits,
            narrow_range, /*is_signed=*/true);
        if (!qtype) return failure();
    
    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/utils/fake_quant_utils.h

        IntegerAttr num_bits = rewriter.getI64IntegerAttr(tf_op.getNumBits());
        BoolAttr narrow_range = rewriter.getBoolAttr(tf_op.getNarrowRange());
        Type res_type = tf_op.getType();
        TypeAttr qtype = quant::GetQuantizedTypeAttr(
            rewriter, res_type, min_value, max_value, quant_dim, num_bits,
            narrow_range, /*is_signed=*/false, /*legacy_float_scale=*/false,
            use_fake_quant_num_bits_);
        if (!qtype) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/prepare_quantize.cc

            // The input min/max or mean/std are not specified, then skip.
            if (!min_max.first.has_value() || !min_max.second.has_value()) return;
    
            TypeAttr params = quant::GetQuantizedTypeAttr(
                builder, input_type, builder.getF64FloatAttr(min_max.first.value()),
                builder.getF64FloatAttr(min_max.second.value()),
                /*quant_dim=*/-1, num_bits, narrow_range, is_signed);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_quantize.cc

            // The input min/max or mean/std are not specified, then skip.
            if (!min_max.first.has_value() || !min_max.second.has_value()) return;
    
            TypeAttr params = quant::GetQuantizedTypeAttr(
                builder, input_type, builder.getF64FloatAttr(min_max.first.value()),
                builder.getF64FloatAttr(min_max.second.value()),
                /*quant_dim=*/-1, num_bits, narrow_range, is_signed);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/legalize_patterns.td

    // Use the tensor type information from $0 and convert min $1, max $2 and
    // numBits $3 and narrowRange $4 to a QuantizedType.
    def ConvertToQuantTypeFromAttrs : NativeCodeCall<
        "quant::GetQuantizedTypeAttr($_builder, $0.getType(), $1, $2, -1, $3, $4, /*is_signed=*/false)">;
    
    // Converts an integer attribute $0 to 32-bit with builder.
    def convertIntAttrTo32Bit : NativeCodeCall<
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 04 13:30:42 UTC 2024
    - 28.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.cc

                quant::QuantizedType::castToExpressedType(input))) {
          return TypeAttr::get(new_type);
        }
      }
      // Currently, we only support per-axis quantized type.
      return {};
    }
    
    TypeAttr GetQuantizedTypeAttr(const Builder builder, const Type input_type,
                                  const Attribute min, const Attribute max,
                                  const int quant_dim, const IntegerAttr num_bits,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.h

    // symmetry of min and max is not adjusted by this method. The QAT workflow
    // should set min/max correctly (and use `narrow_range`=true, `is_signed`=true)
    // if symmetric quantization is required.
    TypeAttr GetQuantizedTypeAttr(Builder builder, Type input_type, Attribute min,
                                  Attribute max, int quant_dim,
                                  IntegerAttr num_bits, BoolAttr narrow_range,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 41.7K bytes
    - Viewed (0)
Back to top