- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for GetSubtypes (0.14 sec)
-
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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) -
tensorflow/compiler/mlir/lite/transforms/legalize_tensorlist.cc
std::optional<Type> GetSingularVariantBaseType(Value val) { auto val_t = mlir::getElementTypeOrSelf(val).dyn_cast_or_null<VariantType>(); if (!val_t) { return std::nullopt; } llvm::ArrayRef<mlir::TensorType> subtypes = val_t.getSubtypes(); if (subtypes.size() != 1) { return std::nullopt; } return subtypes[0].getElementType(); } // Create an `ConstBytesAttr` which encodes the options
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 07 23:04:40 UTC 2024 - 10.6K bytes - Viewed (0)