- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for GetSubtypes (0.15 sec)
-
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/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/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/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) -
tensorflow/compiler/mlir/tensorflow/transforms/tensor_array_ops_decomposition.cc
return size.emitOpError("unknown tensor array"); } auto buffer_type = getElementTypeOrSelf(local_var.getType()) .cast<TF::ResourceType>() .getSubtypes()[0] .cast<RankedTensorType>(); OpBuilder builder(size); auto result = cutil::CreateScalarConst(buffer_type.getDimSize(0), builder, size.getLoc());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Mar 02 20:41:19 UTC 2023 - 40.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_variable_runtime_reformatting.cc
// Get the data type of the resource. auto subtypes = mlir::cast<TF::ResourceType>( getElementTypeOrSelf(execute.getOperand(it->second))) .getSubtypes(); if (subtypes.size() != 1) continue; auto data_type = getElementTypeOrSelf(subtypes[0]); // The XLA backend does not yet support formatting 64-bit data types.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 21.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/internal/passes/mark_ops_for_outside_compilation.cc
if (mlir::isa<mlir::TF::StringType>(type)) return true; auto sub_type = mlir::dyn_cast<mlir::TF::TensorFlowTypeWithSubtype>(type); if (!sub_type) return false; bool has_string = llvm::any_of(sub_type.GetSubtypes(), [](TensorType type) { return mlir::isa<mlir::TF::StringType>(type.getElementType()); }); return has_string; } bool HasStringOperand(Operation& op) { for (auto operand : op.getOperands()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 21.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/translate/export_graphdef.cc
if (auto resource_type = mlir::dyn_cast<mlir::TF::ResourceType>(arg_type.getElementType())) { llvm::ArrayRef<mlir::TensorType> subtypes = resource_type.getSubtypes(); if (!subtypes.empty()) { AttrValue handle_dtypes_attr; AttrValue handle_shapes_attr; for (mlir::TensorType subtype : subtypes) { DataType dtype;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 01 11:17:36 UTC 2024 - 35.2K bytes - Viewed (0)