Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 203 for dequantize (0.39 sec)

  1. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization.td

        left as is for weight-only which means the weight is dequantized at runtime.
    
        For example, if the kernel does not support dynamic range quantization the
        graph will be converted into the following IR:
    
        %q_w = "tfl.pseudo_qconst"() {
             qtype = tensor<64x3x3x3x!quant.uniform<i8<-127:127>:f32, 1.000000e+00>>
        %w = "tfl.dequantize"(%q_w) :
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/compose_uniform_quantized_type_pass.cc

        if (!combined_scale_constant_op) {
          LLVM_DEBUG(llvm::dbgs()
                     << "Failed to match combined_scale_constant_op.\n");
          return failure();
        }
    
        // Quantize -> Dequantize following r3.
        auto output_uniform_quantize_call_op = dyn_cast_or_null<func::CallOp>(
            *combined_scale_multiply_op.getResult().user_begin());
        if (!output_uniform_quantize_call_op->hasOneUse()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 64.6K bytes
    - Viewed (0)
  3. 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)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

            call_op, result_types, args,
            FlatSymbolRefAttr::get(new_quant_func_name));
    
        return success();
      }
    
      // For composite functions followed by Dequantize ops, merges the Dequantize
      // op into the functions by creating quantized functions with float output.
      LogicalResult mergeDequantizeOpFollowingQuantizedFunction(
          TF::PartitionedCallOp call_op, const SmallVector<Value, 4>& args,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K 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/quantization/stablehlo/passes/bridge/legalize_tf_quant_test.cc

          %min_range = "tf.Const"() { value = dense<1.0> : tensor<f32> } : () -> tensor<f32>
          %max_range = "tf.Const"() { value = dense<5.0> : tensor<f32> } : () -> tensor<f32>
          %0 = "tf.Dequantize"(%arg0, %min_range, %max_range) : (tensor<1x!tf_type.qint8>, tensor<f32>, tensor<f32>) -> tensor<1xf32>
          func.return %0 : tensor<1xf32>
        }
      })mlir";
      std::vector<tensorflow::TensorShape> arg_shapes = {{1}};
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 29 18:43:55 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/tests/optimize_batch_matmul.mlir

      %0 = arith.constant dense<[[1.0], [2.0]]> : tensor<2x1xf32>
      %1 = "tfl.quantize"(%0) {qtype = tensor<2x1x!quant.uniform<i8:f32, 0.024986599940879671:92>>} : (tensor<2x1xf32>) -> tensor<2x1x!quant.uniform<i8:f32, 0.024986599940879671:92>>
      %2 = "tfl.dequantize"(%1) : (tensor<2x1x!quant.uniform<i8:f32, 0.024986599940879671:92>>) -> tensor<2x1xf32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_quantize_op.cc

          func_name, rewriter, quant_type, val_to_dequantize, result_type,
          LogicsForUniformDequanization);
    
      return dequant_op;
    }
    }  // namespace
    
    // Generate quantize and dequantize functions with uniform quantization.
    std::optional<TF::PartitionedCallOp> ApplyUniformQuantization(
        PatternRewriter& rewriter, TF::ConstOp op,
        tensorflow::quantization::QuantizationComponentSpec& weight_spec) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_algorithm.py

        find the quant_min and quant_max that best describe this distribution. To do
        this, we quantize hist_mids using quant_min and quant_max and dequantize
        them again. Then the difference between hist_mids and dequantized hist_mids
        equates to quantization error when using quant_min and quant_max.
    
    
        Args:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Mar 11 19:29:56 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_config.h

      // weights but will dequantize them back at runtime which is useful for
      // memory bound case without kernel support available in lower precisions.
      // Used in MLIR dynamic range quantizer.
      bool weight_only_quantization = false;
    
      // The minimum number of elements in a weights array required to apply
      // quantization. This is especially useful not to quantize small tensors as
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Mar 13 10:16:19 UTC 2024
    - 10.8K bytes
    - Viewed (0)
Back to top