Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for GetWeightComponentSpec (0.5 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_op_quant_spec_test.cc

      *mutable_quant_method->add_quantization_component_specs() = quant_spec;
      auto output = GetWeightComponentSpec(quant_options);
      EXPECT_TRUE(output.has_value());
    }
    
    TEST(TfOpQuantSpecTest, WeightComponentSpecDoNotExist) {
      QuantizationOptions quant_options;
      auto output = GetWeightComponentSpec(quant_options);
      EXPECT_FALSE(output.has_value());
    }
    
    }  // namespace
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Aug 22 18:28:40 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_op_quant_spec.h

    // Check if the data is in quantizable precision. Currently, a value in f32 or
    // bf16 is quantizable.
    bool IsValueWithQuantizablePrecision(Value val);
    
    std::optional<tensorflow::quantization::QuantizationComponentSpec>
    GetWeightComponentSpec(
        const tensorflow::quantization::QuantizationOptions& quantization_options);
    
    // Returns the spec for the given operation that can be used for both of
    // dynamic and static range quantization.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_op_quant_spec.cc

      if (type.getElementType().isF32() || type.getElementType().isBF16())
        return true;
      return false;
    }
    
    std::optional<tensorflow::quantization::QuantizationComponentSpec>
    GetWeightComponentSpec(
        const tensorflow::quantization::QuantizationOptions& quantization_options) {
      for (auto& cur_spec : quantization_options.quantization_method()
                                .quantization_component_specs()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_weights.cc

            quant_options_(quantization_options) {}
    
      LogicalResult matchAndRewrite(TF::ConstOp op,
                                    PatternRewriter& rewriter) const override {
        auto weight_component_spec = GetWeightComponentSpec(quant_options_);
        if (!weight_component_spec) return failure();
    
        // 1. Check if the constant is quantizable.
        if (failed((isQuantizableWeight(op)))) {
          return failure();
        }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 11.3K bytes
    - Viewed (0)
Back to top