Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 54 for uniform_quantize (0.23 sec)

  1. tensorflow/compiler/mlir/tensorflow/tests/compile_mlir_util/convert_mhlo_quant_to_int.mlir

    module attributes {tf.versions = {producer = 179 : i32}} {
      func.func @main(%arg0: tensor<f32>) -> tensor<f32> {
        %0 = "stablehlo.uniform_quantize"(%arg0) : (tensor<f32>) -> tensor<!quant.uniform<ui8:f32, 34.0:16>>
        %1 = "stablehlo.uniform_dequantize"(%0) : (tensor<!quant.uniform<ui8:f32, 34.0:16>>) -> tensor<f32>
        func.return %1 : tensor<f32>
      }
    }
    
    // CHECK-LABEL: HloModule main
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 07 16:28:50 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/passes.td

          "uniform_quantize". The first argument is the tensor to be quantized,
          the second argument is the zero point constant (element type: int) and
          the third argument is the inverse scale constant (element type: float).
        * A tensor is dequantized using a `func::FuncOp` whose name contains
          "uniform_dequantize". The first argument is the tensor to be quantized,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 21:59:06 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/stablehlo/passes/post_quantize.cc

            return success();
          }
    
          op.replaceAllUsesWith(q.getArg());
          return success();
        }
        return failure();
      }
    };
    
    // Replaces constant and uniform_quantize ops with single quantized constant op.
    class QuantizeConstPattern
        : public OpRewritePattern<mlir::stablehlo::UniformQuantizeOp> {
     public:
      explicit QuantizeConstPattern(MLIRContext* context)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/tests/components/post_calibration_component.mlir

    // CHECK-NO-UNPACK: %[[QUANTIZE_0:.+]] = stablehlo.uniform_quantize %[[ARG_0]] : (tensor<1x1024xf32>) -> tensor<1x1024x!quant.uniform<i8:f32, {{.*}}>>
    // CHECK-NO-UNPACK: %[[DOT:.+]] = stablehlo.dot_general %[[QUANTIZE_0]], %[[CONST]]
    // CHECK-NO-UNPACK: %[[QUANTIZE_1:.+]] = stablehlo.uniform_quantize %[[DOT]] : (tensor<1x3x!quant.uniform<i32:f32:1, {{.*}}>>) -> tensor<1x3x!quant.uniform<i8:f32, {{.*}}>>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 01:09:50 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/stablehlo/tests/uniform-quantized-stablehlo-to-tfl.mlir

      %0 = stablehlo.uniform_quantize %arg : (tensor<2x2x!quant.uniform<i8:f32, 2.000000e+0:16>>) -> tensor<2x2x!quant.uniform<i8:f32, 3.000000e+0:127>>
      return %0 : tensor<2x2x!quant.uniform<i8:f32, 3.000000e+0:127>>
    }
    // CHECK-LABEL: uniform_quantize_op_quantized_input
    // CHECK: stablehlo.uniform_quantize
    // CHECK-NOT: tfl.quantize
    
    // -----
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 17:10:32 UTC 2024
    - 106.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/tests/passes/quantize/quantize_same_scale.mlir

        // CHECK: %[[Q3:.*]] = stablehlo.uniform_quantize %0 : (tensor<1x3x!quant.uniform<i32:f32:1, {3.000000e-05,3.000000e-05,3.000000e-05}>>) -> tensor<1x3x!quant.uniform<i8:f32, 0.13170163023705575:-1>>
        // CHECK: return %[[Q3]]
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 17:10:32 UTC 2024
    - 35.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/tests/passes/quantize/quantize_op_with_region.mlir

        // CHECK: %[[DOT:.*]] = stablehlo.dot_general
        // CHECK: %[[RQ:.*]] = stablehlo.uniform_quantize %[[DOT]]
        // CHECK: return %[[RQ]]
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 18 20:32:46 UTC 2024
    - 18.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/common/uniform_quantized_types_test.cc

    TEST_F(IsOpFullyQuantizedTest, FalseIfOpPartiallyQuantized) {
      constexpr absl::string_view kQuantizeOp = R"mlir(
        func.func @quantize(%arg0: tensor<2xf32>) -> tensor<2x!quant.uniform<i8:f32, 1.000000e+00:0>> {
          %0 = stablehlo.uniform_quantize %arg0 : (tensor<2xf32>) -> tensor<2x!quant.uniform<i8:f32, 1.000000e+00:0>>
          return %0 : tensor<2x!quant.uniform<i8:f32, 1.000000e+00:0>>
        }
      )mlir";
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/tests/bridge/convert_tf_quant_ops_to_mhlo.mlir

      %output_scales = "tf.Const"() { value = dense<2.0> : tensor<f32> } : () -> tensor<f32>
      %output_zps = "tf.Const"() { value = dense<4> : tensor<i32> } : () -> tensor<i32>
    
      // CHECK-DAG: %[[LHS:.*]] = mhlo.uniform_quantize %arg0 : (tensor<3x2xf32>) -> tensor<3x2x!quant.uniform<i32:f32, 2.000000e+00:4>>
      // CHECK-DAG: %[[LHS1:.*]] = mhlo.bitcast_convert %[[LHS]] : (tensor<3x2x!quant.uniform<i32:f32, 2.000000e+00:4>>) -> tensor<3x2xi32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 06 15:32:52 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/tests/bridge/convert-tf-quant-types.mlir

    }
    
    // -----
    
    // CHECK-LABEL: func @uniform_quantize
    func.func @uniform_quantize(%arg0: tensor<1xf32>) -> tensor<1x!tf_type.qint8>
    {
      %scales = "tf.Const"() { value = dense<1.0> : tensor<f32> } : () -> tensor<f32>
      %zps = "tf.Const"() { value = dense<3> : tensor<i32> } : () -> tensor<i32>
    
      // CHECK: %[[qint:.*]] = "tf.UniformQuantize"
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 30 06:52:55 UTC 2023
    - 25.9K bytes
    - Viewed (0)
Back to top