- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 46 for get_shape (0.13 sec)
-
tensorflow/compiler/mlir/lite/stablehlo/transforms/fold_broadcast_pass.cc
DenseIntElementsAttr bcast_dims) { auto dimensions = llvm::to_vector(bcast_dims.getValues<int64_t>()); const auto result_shape = result_type.getShape(); // Index for the broadcasted matrix. llvm::SmallVector<int64_t, 16> current_index(result_type.getRank(), 0); // Computes the new operand shape using the original shape and the broadcast
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tensor_list_ops_decomposition.cc
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(); } LogicalResult HandleEmptyTensorListOp( TF::EmptyTensorListOp list, llvm::SmallDenseMap<Value, SizeInfo>* buffer_to_size) { Value buffer;
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/tf2xla/internal/passes/xla_broadcast.cc
zero = builder.getFloatAttr(elem_type, 0); } else { return false; } if (auto ranked_type = dyn_cast<RankedTensorType>(type)) { llvm::ArrayRef<int64_t> type_shape = ranked_type.getShape(); for (int64_t i : type_shape) { if (i < 0) return false; } shape = builder.getI64TensorAttr(type_shape); } else { return false; } return true; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jun 13 18:52:07 UTC 2024 - 13.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/replace_cast_hacks_with_tf_xla_ops.cc
GetBroadcastShapesForBatchMatmul(ShapedType input_type, ShapedType weight_type) { ArrayRef<int64_t> input_shape = input_type.getShape(); ArrayRef<int64_t> weight_shape = weight_type.getShape(); const int64_t num_matmul_dim = 2; const int64_t num_input_batch_dim = input_type.getRank() - num_matmul_dim;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 47.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/lstm_utils.cc
axis_op); } ArrayRef<int64_t> GetRankedTensorShape(Value value) { return mlir::cast<RankedTensorType>(value.getType()).getShape(); } Value SliceRankedTensor(OpBuilder* builder, Value input, ArrayRef<int64_t> begin_shape, ArrayRef<int64_t> begin_values,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 36.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/hlo_matchers.cc
DenseIntElementsAttr iota_const_attr; if (!matchPattern(iota, m_Constant(&iota_const_attr))) return false; auto iota_type = iota_const_attr.getType(); auto iota_shape = iota_type.getShape(); auto reduce_dim = (*dimensions.value_begin<APInt>()).getSExtValue(); if (reduce_dim < 0) reduce_dim += iota_type.getRank(); auto index =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.6K bytes - Viewed (0) -
tensorflow/compiler/jit/shape_inference.cc
} shape_inference::ShapeHandle handle; TF_RETURN_IF_ERROR( context->MakeShapeFromPartialTensorShape(arg_shape.shape, &handle)); TF_RETURN_IF_ERROR(shape_refiner->SetShape(n, 0, handle)); } } // Sometimes we have VariableShape nodes in while loop (after Enter nodes). // They won't be constant-folded because TensorFlow constant folding does
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 31 00:41:19 UTC 2024 - 13K bytes - Viewed (0) -
tensorflow/compiler/jit/partially_decluster_pass.cc
// a TensorFlow graph. // // Abstractly, if we have a cluster of this form: // // x0 = arg0 // x1 = arg1 // ... // shape = f(x0, x1, ...) // result = Reshape(input=<something>, new_shape=shape) // // then pulling `f` out of the cluster may reduce the number of compilations and // will never increase the number of compilations. //
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Feb 09 11:36:41 UTC 2024 - 15.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/api/v1/compile_mlir_util.cc
auto ranked_ty = mlir::dyn_cast_or_null<mlir::RankedTensorType>(ty); if (!ranked_ty) return {}; int64_t rank = ranked_ty.getRank(); llvm::SmallVector<int64_t, 4> dims = llvm::to_vector<4>(ranked_ty.getShape()); auto encoding = mlir::dyn_cast_or_null<mlir::mhlo::TypeExtensionsAttr>( ranked_ty.getEncoding()); if (encoding && !encoding.getBounds().empty()) { for (int64_t dim = 0; dim < rank; ++dim) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 21 17:24:39 UTC 2024 - 45.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.cc
return op_->emitRemark() << "skipping legalization due to unsupported type " << operand.getType(); } auto shape_or = expr.GetShape(); if (!shape_or.ok()) { return op_->emitRemark() << "failed to get shape for expression. " << expr.HumanString(); } tensors.emplace_back(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 09:16:07 UTC 2024 - 18.9K bytes - Viewed (0)