Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 277 for quantize (0.31 sec)

  1. tensorflow/compiler/mlir/lite/tests/prepare-tf-fake-quant.mlir

      func.return %rst : tensor<8xf32>
    
    // CHECK: %[[CONSTANT:.*]] = arith.constant dense<0.000000e+00> : tensor<8xf32>
    // CHECK: %[[QUANTIZE:.*]] = "tfl.quantize"(%[[CONSTANT]]) <{qtype = tensor<8x!quant.uniform<u8:f32, 1.000000e+00>>}>
    // CHECK: %[[DEQUANTIZE:.*]] = "tfl.dequantize"(%[[QUANTIZE]])
    // CHECK: return %[[DEQUANTIZE]] : tensor<8xf32>
    }
    
    // CHECK-LABEL: fakeQuantFolded
    func.func @fakeQuantFolded() -> (tensor<8xf32>) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/quantize_patterns.td

    include "tensorflow/compiler/mlir/lite/ir/tfl_ops.td"
    
    // Quantize attribute $0 by using quantization parameter from %1.
    def QuantizeByQuantizedType : NativeCodeCall<"quant::Quantize($0, $1.getValue())">;
    def F32ElementsAttr : ElementsAttrBase<
      CPred<"$_self.cast<ElementsAttr>().getShapedType().getElementType().isF32()">, "float constant tensor">;
    
    // Squash tfl.dequantize and tfl.quantize pairs.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 23:10:13 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/tests/prepare-tf-fake-quant-4bit.mlir

      func.return %rst : tensor<8xf32>
    
    // CHECK: %[[CONSTANT:.*]] = arith.constant dense<0.000000e+00> : tensor<8xf32>
    // CHECK: %[[QUANTIZE:.*]] = "tfl.quantize"(%[[CONSTANT]]) <{qtype = tensor<8x!quant.uniform<u4:f32, 1.000000e+00>>}>
    // CHECK: %[[DEQUANTIZE:.*]] = "tfl.dequantize"(%[[QUANTIZE]])
    // CHECK: return %[[DEQUANTIZE]] : tensor<8xf32>
    }
    
    // CHECK-LABEL: fakeQuantFolded
    func.func @fakeQuantFolded() -> (tensor<8xf32>) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 22K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/passes.td

      ];
    }
    def DecomposeHybridQuantizationPass : Pass<"tfl-decompose-hybrid-quantization", "mlir::func::FuncOp"> {
      let summary = "Decomposes hybridge quantization to explicit quantize / dequantize";
      let description = [{
          Decomposes (with explicit quantize/dequantize ops) selected math
          operations which exist in the model with hybrid quantization
          (some arguments/results left in floating point).
      }];
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 22.6K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/python/integration_test/quantize_model_test.py

            op_set=target_opset,
        )
    
        if target_opset != quant_opts_pb2.XLA:
          # Uniform quantized opset is not supported for weight-only
          with self.assertRaisesRegex(
              ValueError, 'TF/Uniform quantized opset does not support weight-only.'
          ):
            converted_model = quantize_model.quantize(
                input_saved_model_path,
                output_directory,
                quantization_options,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 03:36:50 UTC 2024
    - 235.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/passes.td

    }
    
    def QuantizeCompositeFunctionsPass : Pass<"stablehlo-quantize-composite-functions", "ModuleOp"> {
      let summary = "Quantize composite functions with QDQ input / outputs.";
      let options = [
        Option<"enable_per_channel_quantized_weight_",
            "enable-per-channel-quantized-weight",
            "bool", /*default=*/"true",
            "Whether to enable per-channel quantized weights.">,
        Option<"mlir_dump_file_name_", "mlir-dump-file-name",
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/transforms/default_quant_params.cc

      }
      TypeAttr type_attr = TypeAttr::get(new_type);
      auto quantize = builder.create<TFL::QuantizeOp>(value.getLoc(), new_type,
                                                      value, type_attr);
      auto dequantize = builder.create<TFL::DequantizeOp>(
          value.getLoc(), expressed_type, quantize.getOutput());
      value.replaceAllUsesWith(dequantize);
    
      // `quantize` is using `dequantize` now, so we should set its operand to
      // `value`.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_quantize_drq.cc

      Option<bool> enable_per_channel_quantization_{
          *this, "enable-per-channel-quantization", llvm::cl::init(false),
          llvm::cl::desc("Whether enable per-channel quantized weights.")};
    };
    
    // If the weight is applicable to dynamic range quantization, insert Quantize
    // and Dequantize ops with per-tensor scale.
    class PrepareDRQQuantizableOp : public OpRewritePattern<arith::ConstantOp> {
     public:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/post_quantize.cc

                op->user_begin()->hasTrait<OpTrait::IsTerminator>())
              return failure();
          }
          // If the quantize op is a requantize op, it is being used in other scale
          // adjustments and should be kept. Instead, moving dequantize op before
          // the requantize op to remove the unnecessary requantize op.
          if (auto qtype = quant::QuantizedType::getQuantizedElementType(
                  q.getInput().getType())) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/tests/modify_io_nodes.mlir

      %6 = "tfl.dequantize"(%5) : (tensor<1x401408x!quant.uniform<i8:f32, 3.906250e-03>>) -> tensor<1x401408xf32>
      func.return %6 : tensor<1x401408xf32>
    
    // CHECK-LABEL: func @modified(%arg0: tensor<1x224x224x3xf32>) -> tensor<1x401408xf32>
    // CHECK-NEXT: %[[shape:.*]] = arith.constant dense<[1, 401408]> : tensor<2xi32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 19.9K bytes
    - Viewed (0)
Back to top