- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 98 for get_shape (0.18 sec)
-
tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc
// Reshape input image to add a new spatial dimension. auto image_type = mlir::cast<ShapedType>(conv_op.getLhs().getType()); SmallVector<int64_t, 4> image_2d_shape(image_type.getShape().begin(), image_type.getShape().end()); image_2d_shape.push_back(1); auto image_2d_type = RankedTensorType::get(image_2d_shape, image_type.getElementType()); auto loc = conv_op.getLoc();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 154.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc
auto new_shape_const_attr = DenseElementsAttr::get(shape_spec_type, new_shape.getShape()); rewriter.setInsertionPointAfter(weight_op); auto new_shape_const = rewriter.create<TF::ConstOp>( weight_op->getLoc(), shape_spec_type, new_shape_const_attr); auto reshape_op = rewriter.create<TF::ReshapeOp>( weight_op->getLoc(), new_shape, weight_op->getResult(0), new_shape_const);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 54.5K 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/lite/tests/flatbuffer2mlir/legacy_reshape.json
"outputs": [1], "operators": [ { "inputs": [ 0 ], "outputs": [ 1 ], "builtin_options_type": "ReshapeOptions", "builtin_options": { "new_shape": [ 2, 2 ] } } ] } ], "buffers": []
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 09:41:17 UTC 2024 - 986 bytes - Viewed (0) -
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/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/transforms/set_tpu_infeed_layout.cc
} ApiConverter::ToC(old_shape, &old_shape_c); executor->TpuTransferManager_GetInfeedLayoutFn(&old_shape_c, &new_shape_c); xla::Shape new_shape = ApiConverter::FromC(&new_shape_c); ApiConverter::Destroy(&old_shape_c); ApiConverter::Destroy(&new_shape_c); auto minor_to_major = new_shape.layout().minor_to_major(); return std::vector<int64_t>(minor_to_major.begin(), minor_to_major.end()); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.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)