Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 169 for getElementDtype (0.3 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_lifting.cc

    bool CanBeSymmetricallyQuantized(Value weight) {
      auto dq_op = weight.getDefiningOp<quantfork::DequantizeCastOp>();
      if (!dq_op) return true;
    
      auto qtype =
          mlir::cast<TensorType>(dq_op.getArg().getType()).getElementType();
      if (auto uniform_type = llvm::dyn_cast_or_null<UniformQuantizedType>(qtype)) {
        return uniform_type.getZeroPoint() == 0;
      } else if (auto per_axis_type =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/quantization/quantization_context.cc

      // Use the final state to set all the operands' parameters.
      for (int i = 0, e = op->getNumOperands(); i != e; ++i) {
        auto ele = op->getOperand(i).getType().cast<ShapedType>().getElementType();
        if (ele.isa<FloatType>() && SetOperandParams(op, i, params)) {
          *changed |= true;
          new_items->push_back(op->getOperand(i).getDefiningOp());
        }
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 08 01:38:03 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/prepare_tf.cc

        // TODO(antiagainst): also handle the case of tf.Add(tf.[op], <bias>)
    
        // Get a splat zero tensor with the expected dimension for the bias tensor
        auto elem_type = filter_type.getElementType();
        auto bias_dim = static_cast<const ConcreteType *>(this)->getBiasDim(
            filter_type.getShape());
        auto bias_type =
            tensorflow::GetTypeFromTFTensorShape({bias_dim}, elem_type);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 64.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/ir/tf_arith_ops_folder.h

      const int identity =
          (std::is_same<OpT, MulOp>::value || std::is_same<OpT, DivOp>::value ||
           std::is_same<OpT, RealDivOp>::value)
              ? 1
              : 0;
    
      Type element_ty = lhs_type.getElementType();
      Attribute identity_attr;
      if (auto ty = mlir::dyn_cast<FloatType>(element_ty)) {
        identity_attr = FloatAttr::get(ty, static_cast<double>(identity));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h

        // Non-float tensors are neither weights nor require quantization.
        auto type = mlir::dyn_cast<ShapedType>(const_op->getResult(0).getType());
        if (!type || !mlir::isa<FloatType>(type.getElementType())) return success();
    
        DenseFPElementsAttr attr;
        if (!matchPattern(const_op->getResult(0), m_Constant(&attr))) {
          const_op->emitError("Not a constant op.");
          return failure();
        }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 28K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/tpu_annotate_dynamic_shape_inputs.cc

          shape[0] = ShapedType::kDynamic;
          auto extensions =
              mhlo::TypeExtensionsAttr::get(func->getContext(), bounds);
          auto resultType =
              RankedTensorType::get(shape, inputType.getElementType(), extensions);
          arg.setType(resultType);
        }
        llvm::SmallVector<Type, 8> arg_types;
        for (auto arg : func.getArguments()) arg_types.push_back(arg.getType());
        func.setType(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tfrt/saved_model/saved_model.cc

    }
    
    absl::StatusOr<std::pair<tensorflow::DataType, tensorflow::PartialTensorShape>>
    ProcessTensorSpec(mlir::TensorType type) {
      tensorflow::DataType dtype;
      TF_RETURN_IF_ERROR(
          ConvertScalarTypeToDataType(type.getElementType(), &dtype));
    
      if (!type.hasRank())
        return std::make_pair(dtype, tensorflow::PartialTensorShape());
    
      auto shape = type.getShape();
      llvm::SmallVector<int64_t, 4> dims;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/optimize_patterns.td

      CPred<"$_self.isa<ElementsAttr>() && $_self.cast<ElementsAttr>().getShapedType().getElementType().isF32()">,
            "32 bit float constant tensor">;
    
    // Checks if the param passed is a float ElementsAttr.
    def FloatElementsAttr : ElementsAttrBase<
      CPred<"$_self.isa<ElementsAttr>() && $_self.cast<ElementsAttr>().getShapedType().getElementType().isa<FloatType>()">,
            "float constant tensor">;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 20:31:41 UTC 2024
    - 66.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/legalize_patterns.td

      "non-opaque constant tensor">;
    
    def F32ElementsAttr : ElementsAttrBase<
      CPred<"$_self.cast<ElementsAttr>().getShapedType().getElementType().isF32()">, "float constant tensor">;
    
    def Int64ElementsAttr : ElementsAttrBase<
      CPred<"$_self.cast<ElementsAttr>().getShapedType().getElementType().isInteger(64)">, "Int 64 constant tensor">;
    
    // Extract the ith int element from an ArrayAttr $0 as an 32-bit IntegerAttr
    // with builder.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 04 13:30:42 UTC 2024
    - 28.5K bytes
    - Viewed (0)
  10. platforms/core-runtime/client-services/src/main/java/org/gradle/internal/daemon/client/serialization/ClasspathInferer.java

                        Type type = Type.getObjectType(classDescriptor);
                        while (type.getSort() == Type.ARRAY) {
                            type = type.getElementType();
                        }
                        if (type.getSort() != Type.OBJECT) {
                            // A primitive type
                            continue;
                        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed May 15 19:53:31 UTC 2024
    - 5.9K bytes
    - Viewed (0)
Back to top