Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 152 for requantize (0.14 sec)

  1. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.h

        if (failed(candidate_ops) || candidate_ops->empty()) return failure();
    
        // Rewrite the floating-point ops to the quantized version, by fusing
        // preceding dequantize ops and succeding quantize ops.
        for (Operation* candidate_op : *candidate_ops) {
          // If it is requantize op, we shouldn't rewrite this op.
          if (isa<QuantizeOpT, DequantizeOpT>(candidate_op)) {
            return failure();
          }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/stablehlo/passes/prepare_quantize.cc

      auto func_op_quant_scale_spec = GetStableHloQuantConstraints;
    
      for (auto func_op : module_op.getOps<func::FuncOp>()) {
        // The function might contain more stats ops than required, and it will
        // introduce requantize if the calibration stats have conflicts. This tries
        // to remove all the redundant stats ops.
        RemoveRedundantStatsOps(func_op, func_op_quant_spec,
                                func_op_quant_scale_spec);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 03 05:11:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_driver.cc

      // TODO: b/323478683 - Make the attribute being part of op definition.
      quantize->setAttr(kVolatileOpAttrName, builder_.getUnitAttr());
    
      // `original_result` has a use to `quantize`, so this will replace that use
      // by the result of `dequantize`. Remember to reset that use afterwards
      value.replaceAllUsesWith(dequantize);
      quantize.getOperation()->replaceUsesOfWith(dequantize, value);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 38.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize.cc

                               TFDynamicRangeQuantization>(ctx, quant_params) {}
    };
    
    // Removes quantize-dequantize pairs that are not used in the quantization.
    // The benefit of this pattern is set to lower value than other patterns, so
    // that the other patterns can work on quantize/dequantize ops first.
    class RemoveUnusedQdqPattern
        : public OpRewritePattern<quantfork::DequantizeCastOp> {
     public:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc

      }
    
      void rewrite(quantfork::DequantizeCastOp op,
                   PatternRewriter& rewriter) const final {
        // Rewrite the floating-point ops to the quantized version, by fusing
        // preceding dequantize ops and succeding quantize ops.
        for (Operation* op_with_region : op.getResult().getUsers()) {
          // Collect all the quantized inputs and "clone" the matched op by these
          // inputs.
          SmallVector<Value, 4> inputs;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 06:04:36 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/prepare_quantize.cc

      // ranges.
      bool SetInputNodesQuantizationParams(func::FuncOp func);
    
      // The function might contain more stats ops than required, and it will
      // introduce requantize if the calibration stats have conflicts. This method
      // tries to remove all the redundant stats ops.
      bool RemoveRedundantStats(func::FuncOp func);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_quantize.cc

      // Whether the func contains Quantize ops. This is used to determine whether
      // to use the quantization parameters from the fixed output range property.
      bool ContainsQuantizeOps(func::FuncOp func);
    
      QuantizationSpecs quant_specs_;
    
      Option<bool> enable_post_training_quantize_{
          *this, "post-training-quantize", llvm::cl::init(false),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/stablehlo/quantization_config.proto

      // hardware performs better with integer ops.
      // Default value: true
      optional bool unpack_quantized_types = 1;
    
      // When set to True, requantize op in the quantized fusion will merge with the
      // subsequent dequantize op if present.
      // Default value: false
      // TODO: b/321729008 - re-consider default value after testing on prod model.
      bool merge_fusion_with_dequantize = 2;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 03:36:50 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc

      }
    };
    
    // stablehlo.uniform_dequantize -> tfl.dequantize
    class RewriteUniformDequantizeOp
        : public OpRewritePattern<stablehlo::UniformDequantizeOp> {
      using OpRewritePattern<stablehlo::UniformDequantizeOp>::OpRewritePattern;
    
      // Determines whether the input and output types are compatible with
      // `tfl.dequantize`. See the definition for the `DEQUANTIZE` kernel for the
      // detailed limitations
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 09:00:19 UTC 2024
    - 99.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/tests/prepare-quantize.mlir

    // MixedPrecision-NEXT: %[[q:.*]] = "tfl.quantize"(%arg0)
    // MixedPrecision-NEXT: %[[dq:.*]] = "tfl.dequantize"(%[[q]])
    // MixedPrecision-NEXT: %[[q_0:.*]] = "tfl.quantize"(%arg1)
    // MixedPrecision-NEXT: %[[dq_0:.*]] = "tfl.dequantize"(%[[q_0]])
    // MixedPrecision-NEXT: %[[c:.*]] = "tfl.concatenation"(%[[dq]], %[[dq_0]])
    // MixedPrecision-NEXT: %[[q_1:.*]] = "tfl.quantize"(%[[c]])
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 67.5K bytes
    - Viewed (0)
Back to top