- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for GetSubtypes (0.29 sec)
-
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) -
tensorflow/compiler/mlir/tensorflow/transforms/collection_ops_util.cc
.create<TF::ReadVariableOp>( loc, ArrayRef<Type>{mlir::cast<TF::ResourceType>( getElementTypeOrSelf(local_var.getType())) .getSubtypes()[0]}, ArrayRef<Value>{local_var}) .getValue(); } // Creates an AssignVariableOp on a local variable. TF::AssignVariableOp WriteLocalVariable(Value local_var, Value value,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 14.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc
auto variant_type = getElementTypeOrSelf(getOperand().getType()).cast<TF::VariantType>(); if (variant_type.getSubtypes().empty()) return {}; return ConvertShapeToAttr(variant_type.getSubtypes()[0], width); } //===----------------------------------------------------------------------===// // TensorListStackOp
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 09 22:07:10 UTC 2024 - 170.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tensor_list_ops_decomposition.cc
Type type, llvm::SmallVector<int64_t, 8>* shape) { auto variant_type = mlir::dyn_cast<TF::VariantType>(getElementTypeOrSelf(type)); if (!variant_type || variant_type.getSubtypes().size() != 1) return failure(); TensorType tensor_type = variant_type.getSubtypes().front(); if (!tensor_type.hasStaticShape()) return failure(); for (auto d : tensor_type.getShape()) shape->push_back(d); return success(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 39.2K bytes - Viewed (0)