- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for ranked_type (0.15 sec)
-
tensorflow/compiler/mlir/tensorflow/ir/tf_ops_layout_helper.cc
} // Shuffle ranked tensor dimensions according to the permutation. Type ShuffleRankedTensorType(Type type, ArrayRef<int64_t> permutation) { if (auto ranked_type = mlir::dyn_cast<RankedTensorType>(type)) { ArrayRef<int64_t> shape = ranked_type.getShape(); assert(permutation.size() == shape.size()); SmallVector<int64_t, 4> new_shape(permutation.size()); for (size_t i = 0; i < permutation.size(); ++i)
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 3.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_space_to_depth_pass.cc
// Handles padding before convolution for space to depth transform. LogicalResult HandlePad(TF::PadOp op, int32_t kernel_size, int32_t block_size) { auto ranked_type = mlir::dyn_cast<RankedTensorType>(op.getInput().getType()); if (!ranked_type) return failure(); auto pad_input_shape = ranked_type.getShape(); Location loc = op.getLoc(); OpBuilder builder(op); builder.setInsertionPoint(op);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 29.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_ops_tensor_helper.cc
} else { return UnrankedTensorType::get(builder->getI1Type()); } } auto ranked_type = mlir::dyn_cast<RankedTensorType>(result_type); if (!ranked_type) return UnrankedTensorType::get(builder->getI1Type()); return RankedTensorType::get(ranked_type.getShape(), builder->getI1Type()); } Type InferReductionOpType(Value input, Value reduction_indices,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/functional_control_flow_to_regions.cc
} // Converts the condition for an IfOp/WhileOp to a boolean value. Value ConvertConditionToBoolean(Operation* op, Value cond) { if (auto ranked_type = mlir::dyn_cast<RankedTensorType>(cond.getType())) if (ranked_type.getRank() == 0 && ranked_type.getElementType().isSignlessInteger(1)) return cond; OpBuilder builder(op); Value to_bool = builder.create<TF::ToBoolOp>(op->getLoc(), cond);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/validators.cc
if (dim != 1) return false; } return true; } bool IsDimensionsDegenerateExceptLastOne(TypedAttr val) { if (auto ranked_type = mlir::dyn_cast<RankedTensorType>(val.getType())) { return IsDimensionsDegenerateExceptLastOne(ranked_type.getShape()); } return false; } } // namespace TFL
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/internal/passes/xla_broadcast.cc
elem_type.isF32()) { 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;
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/tf2xla/internal/passes/tpu_sharding_identification_pass.cc
// verify shardings that actually break a tensor apart. return mlir::success(); } if (RankedTensorType ranked_type = mlir::dyn_cast<RankedTensorType>(type)) { const int64_t tensor_rank = ranked_type.getRank(); int tile_assignment_rank = sharding->tile_assignment_dimensions_size(); // When a tensor is partial or subgroup tiled, its tile assignment will
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 02:01:13 UTC 2024 - 28.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/internal/passes/extract_outside_compilation.cc
Type& shard_type) { RankedTensorType ranked_type = mlir::dyn_cast<RankedTensorType>(full_type); if (!ranked_type) return context_op->emitOpError() << "A map_outside_compilation op's input and output types must be " "ranked tensors."; ArrayRef<int64_t> in_shape = ranked_type.getShape(); if (in_shape.empty() || in_shape[0] < 0) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 21:25:12 UTC 2024 - 68.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/lower_static_tensor_list.cc
// also populate the shape info to the op result. The shape of the // tensorlist is inferred from `num_elements` and `element_shape`. auto ranked_type = element_shape.getType().dyn_cast<RankedTensorType>(); DenseIntElementsAttr dense_elem_attr; if ((ranked_type && ranked_type.getRank() == 0) || !matchPattern(element_shape, m_Constant(&dense_elem_attr))) { // If no constant is spotted, just forward the operand.
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/shape_inference.cc
RankedTensorType DropFirstDimension(Type type) { RankedTensorType ranked_type = mlir::dyn_cast<RankedTensorType>(type); if (!ranked_type) return {}; llvm::ArrayRef<int64_t> dims_except_first = ranked_type.getShape().drop_front(); return tensorflow::GetTypeFromTFTensorShape(dims_except_first, ranked_type.getElementType()); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Jun 08 07:28:49 UTC 2024 - 134.1K bytes - Viewed (0)