Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 475 for qint (0.04 sec)

  1. tensorflow/compiler/mlir/quantization/stablehlo/tests/bridge/verify-quant-legalization.mlir

    func.func @illegal_qint8(%arg0: tensor<1x!tf_type.qint8>) -> tensor<1x!tf_type.qint8> {
      // expected-error@+1 {{'func.return' op is illegal as it is a UQ op or contains uq/qint types}}
      func.return %arg0: tensor<1x!tf_type.qint8>
    }
    
    // -----
    
    func.func @illegal_cast(%arg0: tensor<1x!tf_type.qint8>) -> tensor<1xi8> {
      // expected-error@+1 {{'tf.Cast' op is illegal as it is a UQ op or contains uq/qint types}}
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Aug 18 18:54:14 UTC 2023
    - 3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/passes.td

    }
    
    def ConvertTFQuantTypes : Pass<"convert-tf-quant-types", "mlir::func::FuncOp"> {
      let summary = "Replace TensorFlow qint types with int types.";
    
      let description = [{
        Converts TF ops with qint types to int types. Some UniformQuantized ops
        argument/result allow qint type only. For such cases, add qint <-> int
        tf.Cast around the ops so that they are still valid.
      }];
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Feb 23 01:41:18 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_types.cc

        if (!IsTFUniformQuantizedOp(op)) {
          return failure();
        }
    
        // Add CastOp int->qint before an input operand only when it original type
        // is qint and its defining op is not already an int->qint CastOp.
        llvm::SmallVector<Value, 4> new_operands;
        for (int i = 0; i < operands.size(); ++i) {
          Type orig_op_type = op->getOperandTypes()[i];
          if (IsIllegalType(orig_op_type) &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/utils/tf_type_utils.h

    FailureOr<mlir::DenseElementsAttr> GetDenseAttrFromTensorProtoAttr(
        llvm::StringRef mangled_tensor_proto, TensorType result_tensor_type);
    
    // Check if a type is TF qint type.
    bool IsTFQintType(Type type);
    
    // Convert qint type to the corresponding int type. Return original type if it
    // is not qint type.
    Type GetIntTypeFromTFQint(Type type);
    
    // Check if an op is TF UniformQuantized op.
    bool IsTFUniformQuantizedOp(Operation* op);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 08:32:43 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/verify_quant_legalization.cc

        // Verify all uq and qint types are lowered.
        if (llvm::any_of(op->getOperandTypes(), IsQuantType) ||
            llvm::any_of(op->getResultTypes(), IsQuantType) ||
            IsTFUniformQuantizedOp(op) || IsMhloUniformQuantizedOp(*op)) {
          op->emitOpError("is illegal as it is a UQ op or contains uq/qint types");
          LOG(ERROR) << "Found illegal op containing uq/qint type: "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/passes.h

                                                RewritePatternSet *patterns);
    
    // Creates an instance of the ConvertTFQuantTypes pass, which will convert TF
    // qint types to int types and surround TF UniformQuantized ops with qint <->
    // int casts.
    std::unique_ptr<OperationPass<func::FuncOp>> CreateConvertTFQuantTypesPass();
    
    // Creates an instance of the VerifyQuantLegalization pass, which verifies all
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Feb 23 01:41:18 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/tests/bridge/convert-tf-quant-types.mlir

        %cst = "tf.Const"()  {value = dense<1> : tensor<i1>}  : () -> tensor<i1>
        "tf.Yield"(%cst) : (tensor<i1>) -> ()
        }, {
      ^bb0(%barg0: tensor<2x?x!tf_type.qint8>, %barg1: tensor<?x2x!tf_type.qint8>):
        %id = "tf.Identity"(%barg0) : (tensor<2x?x!tf_type.qint8>) -> tensor<2x?x!tf_type.qint8>
        "tf.Yield"(%id, %barg1) : (tensor<2x?x!tf_type.qint8>, tensor<?x2x!tf_type.qint8>) -> ()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 30 06:52:55 UTC 2023
    - 25.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/stablehlo/utils/tf_type_utils_test.cc

    namespace {
    
    std::string GetQint8Tensor() {
      ::tensorflow::Tensor tensor(::tensorflow::DT_QINT8, {2, 2});
      tensor.matrix<tsl::qint8>()(0, 0) = tsl::qint8(1);
      tensor.matrix<tsl::qint8>()(0, 1) = tsl::qint8(2);
      tensor.matrix<tsl::qint8>()(1, 0) = tsl::qint8(3);
      tensor.matrix<tsl::qint8>()(1, 1) = tsl::qint8(4);
    
      ::tensorflow::TensorProto tensor_proto;
      tensor.AsProtoTensorContent(&tensor_proto);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_ops_to_mhlo.cc

                    .getStorageType()),
            res_max_clipped);
        return success();
      }
    };
    
    // This pattern converts qint <-> int CastOp to int -> int ConvertOps.
    // The former are introduced in ConvertTFQuantTypes pass. The resulting int <->
    // int ConvertOps are no-ops and can be removed later in a Canonicalizer pass.
    class ConvertTfCastOp : public OpConversionPattern<TF::CastOp> {
     public:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/g3doc/tf_dialects.md

    systems in general.
    
    Operations in this dialect usually operate on tensor and scalar types defined in
    the standard dialect. The extra defined types are specific to TensorFlow: `QINT`
    types like !tf_type.qint8 (etc), `QUINT` types like !tf_type.quint8, all of the
    `REF` types like !tf_type.uint8ref, as well as !tf_type.string,
    !tf_type.resource, and !tf_type.variant which correspond to the tensorflow types
    of the same name.
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 13 16:33:28 UTC 2021
    - 16K bytes
    - Viewed (0)
Back to top