Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 178 for dequantize (0.26 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. tensorflow/compiler/mlir/quantization/stablehlo/ops/stablehlo_op_quant_spec_test.cc

          func.return %add : tensor<3x2xf32>
        }
      }
    )mlir";
    
    // Quantizable ops: XlaCallModule op with "fully_quantizable" attribute and
    // same-scale StableHLO ops
    // Non-quantizable ops: quantize/dequantize ops
    constexpr absl::string_view kModuleCompositeSameScale = R"mlir(
      module {
        func.func @same_scale_after_composite() -> tensor<3x1xf32> {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 04 07:19:09 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  10. 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)
Back to top