Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for ConvertDataType (0.17 sec)

  1. tensorflow/compiler/mlir/tensorflow/utils/convert_attr.cc

          return builder->getFloatAttr(builder->getF32Type(), value.f());
        case AttrValue::kB:
          return builder->getBoolAttr(value.b());
        case AttrValue::kType: {
          mlir::Type type;
          TF_RETURN_IF_ERROR(ConvertDataType(value.type(), *builder, &type));
          return mlir::TypeAttr::get(type);
        }
        case AttrValue::kShape:
          return ConvertTensorShapeProto(value.shape(), builder->getContext());
        case AttrValue::kTensor:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/convert_type.cc

    #include "tensorflow/core/framework/types.pb.h"
    #include "tensorflow/core/lib/core/errors.h"
    
    namespace tensorflow {
    
    using mlir::Builder;
    using mlir::ShapedType;
    using mlir::Type;
    
    Status ConvertDataType(DataType dtype, Builder builder, Type* type) {
      switch (dtype) {
        case DT_HALF:
          *type = builder.getF16Type();
          return absl::OkStatus();
        case DT_FLOAT:
          *type = builder.getF32Type();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/utils/convert_type.h

    #include "tensorflow/core/framework/types.pb.h"
    
    namespace tensorflow {
    
    using tsl::StatusOr;
    
    // Converts the TensorFlow DataType 'dtype' into an MLIR (scalar) type.
    Status ConvertDataType(DataType dtype, mlir::Builder builder, mlir::Type* type);
    
    // Converts a scalar MLIR type to a TensorFlow Datatype.
    Status ConvertScalarTypeToDataType(mlir::Type type, DataType* dtype);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/c/c_api_unified_experimental_mlir.cc

      ctx.loadAllAvailableDialects();
    }
    
    Status ConvertDataTypeToTensor(tensorflow::DataType dtype, Builder builder,
                                   Type* type) {
      Status s = tensorflow::ConvertDataType(dtype, builder, type);
      if (s.ok()) *type = UnrankedTensorType::get(*type);
      return s;
    }
    
    class MlirTensor : public TracingTensorHandle {
     public:
      explicit MlirTensor(Value value)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tfr/integration/tfr_decompose_ctx.cc

      for (auto ty : input_dtys) {
        mlir::Type elt_ty;
        TF_RETURN_IF_ERROR(ConvertDataType(ty, builder, &elt_ty));
        mlir::TensorType mlir_ty = mlir::UnrankedTensorType::get(elt_ty);
        input_tys.push_back(mlir_ty);
      }
      for (auto ty : output_dtys) {
        mlir::Type elt_ty;
        TF_RETURN_IF_ERROR(ConvertDataType(ty, builder, &elt_ty));
        mlir::TensorType mlir_ty = mlir::UnrankedTensorType::get(elt_ty);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 29 02:34:43 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/utils/convert_tensor.cc

                                               Builder* builder) {
      const auto& input_dtype = input_tensor.dtype();
      const auto& input_shape = input_tensor.shape();
      Type elt_type;
      TF_RETURN_IF_ERROR(ConvertDataType(input_dtype, *builder, &elt_type));
      SmallVector<int64_t, 4> shape;
      ConvertToMlirShape(input_shape, &shape);
      auto type = RankedTensorType::get(shape, elt_type);
    
    #define CONVERT_FLAT(DTYPE, CTYPE) \
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 20.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/translate/import_model.cc

                                       context, builder);
      }
      DataType dtype = node.properties()->input_types[idx];
      mlir::Type element_type;
      TF_RETURN_IF_ERROR(ConvertDataType(dtype, builder, &element_type));
      return mlir::UnrankedTensorType::get(element_type);
    }
    
    absl::StatusOr<mlir::Type> ImporterBase::InferOutputType(
        const Node& node, int idx, mlir::Builder builder) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 183.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/api/v1/compile_mlir_util.cc

                "Argument ", idx,
                " is an uninitialized resource variable which is currently"
                " unsupported in the MLIR-based TPU bridge"));
          }
          TF_RETURN_IF_ERROR(ConvertDataType(xla_arg.type, builder, &element_type));
          TF_ASSIGN_OR_RETURN(TensorShape arg_shape,
                              GetTensorShapeFromXlaArgument(xla_arg));
          auto resource_shape = arg_shape.dim_sizes();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 17:24:39 UTC 2024
    - 45.3K bytes
    - Viewed (0)
Back to top