Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for GetSubtypes (0.19 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/decompose_resource_ops.cc

      if (resource_type.getSubtypes().size() == 1)
        return resource_type.getSubtypes().front();
    
      return UnrankedTensorType::get(element_type);
    }
    
    static bool HasResourceSubtype(Value resource) {
      return resource.getType()
                 .cast<TensorType>()
                 .getElementType()
                 .cast<ResourceType>()
                 .getSubtypes()
                 .size() == 1;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 8.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/lower_variable_ops_to_ml_program.cc

        if (!tensor) return nullptr;
        TF::ResourceType resource =
            llvm::dyn_cast<TF::ResourceType>(tensor.getElementType());
        if (!resource || resource.getSubtypes().size() != 1) return nullptr;
        return resource.getSubtypes().front();
      } else if (auto global_tensor_op =
                     dyn_cast<tf_saved_model::GlobalTensorOp>(source)) {
        return global_tensor_op.getType();
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Mar 06 23:53:00 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/utils/variables_utils.cc

        type = op->getResult(0)
                   .getType()
                   .cast<ShapedType>()
                   .getElementType()
                   .cast<TF::TensorFlowTypeWithSubtype>()
                   .GetSubtypes()
                   .back();
      }
      return IsSupportedVariableType(type);
    }
    
    bool IsSupportedVariableType(ShapedType type) {
      auto element_type = type.getElementType();
      // Check complex types.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jun 21 19:32:03 UTC 2021
    - 2.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/tpu_resource_partitioning.cc

                                        .cast<TF::ResourceType>()
                                        .getSubtypes()))
          return false;
    
      return true;
    }
    
    Type GetResourceSubtype(Type type) {
      return type.cast<TensorType>()
          .getElementType()
          .cast<TF::ResourceType>()
          .getSubtypes()
          .front();
    }
    
    Type GetResourceSubtype(Value resource) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/tpu_partitioned_op_conversion.cc

      }
    
      auto element_type = getElementTypeOrSelf(first_operand_type);
      if (mlir::isa<TF::ResourceType>(element_type)) {
        first_operand_type =
            mlir::cast<TF::ResourceType>(element_type).getSubtypes().front();
      }
    
      auto tensor_type = mlir::dyn_cast_or_null<TensorType>(first_operand_type);
      if (!(tensor_type && tensor_type.hasRank())) {
        return op->emitError()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/lower_static_tensor_list.cc

        return type;
      }
      if (!variant_ty.getSubtypes().empty()) {
        // Short-circut if the variant type has subtype info.
        return UnrankedTensorType::get(
            variant_ty.getSubtypes()[0].getElementType());
      }
      Type value_type = value.getType();
      Type element_type;
      variant_ty = value_type.dyn_cast<TF::VariantType>();
      if (variant_ty && !variant_ty.getSubtypes().empty()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 70.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/promote_resources_to_args.cc

    mlir::LogicalResult ValidateResourceArgument(func::FuncOp function,
                                                 BlockArgument resource_arg,
                                                 TF::ResourceType resource_type) {
      if (resource_type.getSubtypes().size() != 1)
        return function.emitError()
               << "expects resource type of argument "
               << resource_arg.getArgNumber() << " to have one subtype, got "
               << resource_type;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/shape_inference.cc

              "result isn't");
        } else if (lhs_element_type_with_subtype.GetSubtypes().size() > 1) {
          DCOMMENT(
              "Unexpected `TensorFlowTypeWithSubtype` original type with size>1");
        } else if (lhs_element_type_with_subtype.GetSubtypes().empty()) {
          subtype = rhs_element_type_with_subtype.GetSubtypes().front();
        } else {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jun 08 07:28:49 UTC 2024
    - 134.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/lift_variables.cc

          auto arg_type = mlir::cast<RankedTensorType>(arg.getType());
          assert(arg_type.getRank() == 0);
          llvm::ArrayRef<TensorType> underlying_type =
              mlir::cast<TF::ResourceType>(arg_type.getElementType()).getSubtypes();
    
          // If the arg type already matches the global_tensor type, we don't need
          // to do anything.
          if (!underlying_type.empty() &&
              underlying_type[0] == global_tensor.getType()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 23 09:05:47 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/decompose_optionals.cc

        Type elementType = getElementTypeOrSelf(op->getResult(0));
        Type newType = nullptr;
        if (auto variant = dyn_cast<TF::VariantType>(elementType)) {
          ArrayRef<TensorType> sub = variant.getSubtypes();
          if (sub.size() == 1) {
            auto inner = sub[0];
            if (!isa<TF::VariantType>(inner)) {
              newType = inner;
            }
          }
        }
        if (!newType) {
          return failure();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:18:05 UTC 2024
    - 9.8K bytes
    - Viewed (0)
Back to top