Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for qtype_attr (0.21 sec)

  1. tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc

      auto new_filter_constant_value_attr =
          DenseIntElementsAttr::get(new_filter_value_attr_type, new_filter_values);
      return rewriter.create<TFL::QConstOp>(
          filter_constant_op.getLoc(),
          /*output=*/TypeAttr::get(new_filter_result_type),
          /*value=*/new_filter_constant_value_attr);
    }
    
    // Creates the `tfl.qconst` for filter. If `rhs_op` is a `stablehlo.constant`,
    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/lite/ir/tfl_ops.td

        // determined while going through quantization passes.
        OptionalAttr<TypeAttr>:$input_to_input_intermediate,
        OptionalAttr<TypeAttr>:$input_to_forget_intermediate,
        OptionalAttr<TypeAttr>:$input_to_cell_intermediate,
        OptionalAttr<TypeAttr>:$input_to_output_intermediate,
        OptionalAttr<TypeAttr>:$effective_hidden_scale_intermediate
      );
    
      let results = (outs AnyTensor:$output);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 19:09:08 UTC 2024
    - 186K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/optimize.cc

        return f.isExactlyValue(value);
      });
    }
    
    // Returns true if `value` is compile-time constant and its splat value equals
    // to `raw_value`.
    template <typename T>
    bool IsConstantValueOf(mlir::TypedAttr value, T raw_value) {
      auto element_type = mlir::cast<ShapedType>(value.getType()).getElementType();
    
      if (mlir::isa<FloatType>(element_type)) {
        return FloatValueEquals(value, raw_value);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 102.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/translate/import_model.cc

      if (node.IsArg()) {
        if (dtype == DT_RESOURCE) {
          const AttrValue* dtype_attr = node.attrs().Find("_handle_dtypes");
          const AttrValue* shape_attr = node.attrs().Find("_handle_shapes");
          if (dtype_attr && shape_attr) {
            if (dtype_attr->list().type().empty()) {
              return errors::InvalidArgument(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 183.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/shape_inference.cc

          return false;
        }
      }
      return true;
    }
    
    // Returns the tensor type created from the `shape_attr` and `type_attr`
    // attributes.
    Type GetType(Attribute shape_attr, Attribute type_attr) {
      auto shape = mlir::cast<tf_type::ShapeAttr>(shape_attr);
      auto type = mlir::cast<TypeAttr>(type_attr);
      if (shape.hasRank())
        return tensorflow::GetTypeFromTFTensorShape(shape.getShape(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jun 08 07:28:49 UTC 2024
    - 134.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/ir/tfl_ops.cc

      int64_t out = 0;
      for (int64_t outer = 0; outer < outer_size; ++outer) {
        for (auto op : operands) {
          auto typed_attr = op.cast<TypedAttr>();
          const int64_t dim_size =
              typed_attr.getType().cast<RankedTensorType>().getDimSize(axis);
          const int64_t inner_size = dim_size * base_inner_size;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 169.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

        // types. But we need to wrap it up with ElementsAttr to construct
        // valid TensorFlow constants.
        auto typed_attr = mlir::cast<TypedAttr>(value);
        type = tensorflow::GetTypeFromTFTensorShape(/*shape=*/{},
                                                    typed_attr.getType());
        return ConstOp::build(builder, result, DenseElementsAttr::get(type, value));
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/python/integration_test/quantize_model_test.py

        type_attr = attr_value_pb2.AttrValue(type=types_pb2.DT_QINT8)
        if quantize:
          self.assertTrue(
              self._contains_op(output_graphdef, 'Const', 'dtype', type_attr)
          )
        else:
          self.assertFalse(
              self._contains_op(output_graphdef, 'Const', 'dtype', type_attr)
          )
    
      @parameterized.named_parameters(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 03:36:50 UTC 2024
    - 235.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/flatbuffer_export.cc

        // Const op can have a result of dynamic shaped type (e.g. due to constant
        // folding), but we can still derive the shape of a constant tensor for
        // its attribute type.
        auto tensor_attr = mlir::cast<mlir::TypedAttr>(inst->getAttr("value"));
        llvm::ArrayRef<int64_t> shape_ref =
            mlir::cast<TensorType>(tensor_attr.getType()).getShape();
        if (mlir::failed(check_shape(shape_ref))) return std::nullopt;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:41:49 UTC 2024
    - 164.5K bytes
    - Viewed (0)
Back to top