- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 117 for set_shape (0.23 sec)
-
tensorflow/compiler/mlir/lite/transforms/lower_static_tensor_list.cc
Type dtype = getElementTypeOrSelf(type); if (RankedTensorType ty = type.dyn_cast<RankedTensorType>()) { llvm::SmallVector<int64_t, 4> shape = {dim}; shape.append(ty.getShape().begin(), ty.getShape().end()); return tensorflow::GetTypeFromTFTensorShape(shape, dtype); } return type; } Type GetTensorTypeForTensorList(Type element_type, TF::VariantType handle_dtype,
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/c/tf_tensor_internal.h
size_t ByteSize() const override; void* Data() const override; bool IsAligned() const override; bool CanMove() const override; std::string SummarizeValue() const override; void SetShape(const int64_t* dims, int num_dims); Status ToTensor(tensorflow::Tensor* dst) const; Status BitcastFrom(const TensorInterface& from, DataType type, const int64_t* new_dims, int num_new_dims);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Aug 24 20:38:55 UTC 2023 - 4.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/post_quantize.cc
const int num_dimensions = input_tensor.getShapedType().getRank(); assert(perm_tensor.getType().getNumElements() == num_dimensions); ArrayRef<int64_t> input_shape = input_tensor.getShapedType().getShape(); auto output_type = mlir::cast<ShapedType>(op.getOutput().getType()); SmallVector<int32_t, 4> perm; SmallVector<int64_t, 4> output_shape; for (int i = 0; i < num_dimensions; ++i) {
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/quantization/tensorflow/passes/prepare_lifting.td
def HasEqualShape : Constraint<CPred< "$0.getType().cast<ShapedType>().hasRank() && " "$1.getType().cast<ShapedType>().hasRank() && " "$0.getType().cast<ShapedType>().getShape() == $1.getType().cast<ShapedType>().getShape()">, "Checks if the shapes of tensors are same.">; // Make the 1D value $0 broadcastable with the shape of $1. def MakeOneDimValueBroadcastable : NativeCodeCall<
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Feb 14 03:24:59 UTC 2024 - 8.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/scatter.h
auto scatter_dims_to_operand_dims = scatter_dimension_numbers.getScatterDimsToOperandDims(); if (IsIotaAttr(inserted_window_dims, indices_type.getShape().back()) && IsIotaAttr(scatter_dims_to_operand_dims, indices_type.getShape().back())) { rewriter.replaceOpWithNewOp<TfOp>(scatter_op, scatter_op.getResult(0).getType(),
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/xla_sharding_util.cc
auto input_type = mlir::cast<mlir::TensorType>(src_input.getType()); if (input_type.hasRank()) { if (input_type.getShape()[split_dimension] == mlir::ShapedType::kDynamic) { output_type = input_type; } else { auto shape = llvm::to_vector<4>(input_type.getShape()); if (shape[split_dimension] % num_split != 0) { return mlir::emitError( location, llvm::formatv(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 22 21:28:13 UTC 2024 - 34K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_utils.cc
} return std::nullopt; } ShapedType GetNhwcReturnTypeFromNchw(Operation* old_op) { auto composite_result_shape = mlir::cast<ShapedType>(old_op->getResults().front().getType()).getShape(); std::array<int64_t, 4> output_shape; // NHWC <- NCHW output_shape[0] = composite_result_shape[0]; output_shape[1] = composite_result_shape[2]; output_shape[2] = composite_result_shape[3];
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 29 18:33:05 UTC 2024 - 3.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/const_tensor_utils.cc
type, builder.getFloatAttr(element_ty, unique_index)); if (auto qtype = mlir::dyn_cast<QuantizedType>(element_ty)) { mlir::RankedTensorType new_type = tensorflow::GetTypeFromTFTensorShape( type.getShape(), qtype.getStorageType()); return DenseElementsAttr::get( new_type, builder.getIntegerAttr(qtype.getStorageType(), unique_index)); } llvm_unreachable("unhandled element type"); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 07 23:04:40 UTC 2024 - 16.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc
Value bcast_op_result = (*bcast_op)->getResult(0); auto bcast_op_result_type = mlir::cast<RankedTensorType>(bcast_op_result.getType()); const ArrayRef<int64_t> bcast_shape = bcast_op_result_type.getShape(); const TensorType new_bcast_op_result_type = bcast_op_result_type.cloneWith( bcast_shape, accumulation_quantized_element_type); bcast_op_result.setType(new_bcast_op_result_type); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 03 06:04:36 UTC 2024 - 41.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/unfold_large_splat_constant.cc
tensorflow::GetTypeFromTFTensorShape( {splat_elements_attr.getType().getRank()}, op_builder->getI64Type()), splat_elements_attr.getType().getShape())); mlir::arith::ConstantOp fill_value = op_builder->create<mlir::arith::ConstantOp>( const_op->getLoc(), DenseElementsAttr::get( tensorflow::GetTypeFromTFTensorShape(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 4.5K bytes - Viewed (0)