Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 283 for quantize (0.27 sec)

  1. tensorflow/compiler/mlir/lite/transforms/prepare_quantize.cc

          llvm::SmallVector<Value, 4> quantized;
          for (auto user : returned.getUsers()) {
            if (auto q = Quantized(user)) {
              quantized.push_back(q);
            }
          }
          if (quantized.size() == 1) {
            ret.setOperand(i, quantized.front());
          }
          i++;
        }
      });
    
      // We prefer to placing quantization emulation ops on the results of the
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/utils/convert_type.h

    // Returns element type from attribute Type 'type_attr'.
    mlir::Type GetShapeStrippedType(mlir::TypeAttr type_attr);
    
    // Returns true if 'val' is not from Quantize op or
    // from Quantize Op with same quant type as 'qtype_attr'
    bool NotFromQuantOpOrSameQuantType(mlir::Value val, mlir::TypeAttr qtype_attr);
    
    }  // namespace tflite
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/common/uniform_quantized_types.cc

                                << quantized_per_axis_type << ".\n");
        return false;
      }
    
      return true;
    }
    
    // Determines whether the storage type of a quantized type is supported by
    // `tfl.quantize` or `tfl.dequantize` ops. ui8, i8 and i16 are supported.
    bool IsSupportedByTfliteQuantizeOrDequantizeOps(IntegerType storage_type) {
      if (storage_type.getWidth() == 8 ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/propagate_quantize_type.cc

        // the textual format (on the commandline for example).
        return "quant-propagate-quantize-type";
      }
      StringRef getDescription() const final {
        // This is a brief description of the pass.
        return "Propagate quantized type through allowed ops.";
      }
    
      void runOnOperation() override;
    };
    
    // Propagate dequantize op if the next op supports the data type.
    // Given the below graph,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/common/uniform_quantized_types_test.cc

      auto func_op = module_op->lookupSymbol<func::FuncOp>("quantize");
      ASSERT_THAT(func_op, NotNull());
    
      auto uniform_quantize_op_itr =
          func_op.getBody().op_begin<mlir::stablehlo::UniformQuantizeOp>();
      ASSERT_THAT(
          uniform_quantize_op_itr,
          Ne(func_op.getBody().op_end<mlir::stablehlo::UniformQuantizeOp>()));
    
      // `uniform_quantize` is considered partially quantized because its output is
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/stablehlo/transforms/compose_uniform_quantized_type_pass.cc

            /*value=*/filter_i8_value_attr);
    
        // Replace filter uses with uniform quantized filter.
        rewriter.replaceAllUsesWith(filter_op->getResult(0),
                                    quantized_filter_constant_op.getResult());
    
        // Replace conv op with a new convolution op that has quantized output type.
        // Quantize -> Dequantize following r3.
        auto output_uniform_quantize_call_op = cast<func::CallOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 64.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/python/converter_python_api.h

                      const tensorflow::quantization::PyFunctionLibrary*
                          quantization_py_function_library = nullptr);
    
    // Quantize the model with calibration data. Throw errors if `fully_quantize`
    // is specified by the calibration data are not sufficient to quantize the
    // model.
    PyObject* MlirQuantizeModel(PyObject* data, bool disable_per_channel,
                                bool fully_quantize, int inference_type,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 31 18:18:30 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform.cc

        // execution to be safe. Although normally they should support float
        // execution. Not Quantized ops.
        if (!int8_type_observed && !uint8_type_observed) return;
    
        // Insert dequantize ops for every quantized input.
        SmallVector<Value, 4> dequantized_inputs;
        for (auto& input : op->getOpOperands()) {
          auto input_type = input.get().getType();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tf2xla/tests/legalize-tf-quant.mlir

      %zps = "tf.Const"() { value = dense<3> : tensor<i32> } : () -> tensor<i32>
    
      // CHECK: %[[QUANTIZE:.*]] = mhlo.uniform_quantize %arg0 : (tensor<2xf32>) -> tensor<2x!quant.uniform<i8:f32, 1.000000e+00:3>>
      // CHECK: %[[CONVERT_1:.*]] = mhlo.bitcast_convert %[[QUANTIZE]] : (tensor<2x!quant.uniform<i8:f32, 1.000000e+00:3>>) -> tensor<2xi8>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 01:25:29 UTC 2024
    - 37.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/quantize_variables.cc

            }
            assign_variable_op.erase();
            dq_op.erase();
          } else {
            // Add quantize op.
            builder.setInsertionPoint(assign_variable_op);
            auto new_q_op = builder.create<QuantizeOp>(
                assign_variable_op.getLoc(), ref_qtype,
                assign_variable_op.getValue(), TypeAttr::get(ref_qtype));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.5K bytes
    - Viewed (0)
Back to top