- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 156 for RankedTensorType (0.34 sec)
-
tensorflow/compiler/mlir/lite/utils/utils.h
.getValues<APInt>()[perm.getSExtValue()] .getSExtValue()]); } } return mlir::DenseElementsAttr::get( RankedTensorType::get( {static_cast<int>(new_permutation.size())}, mlir::IntegerType::get(permutation1.getContext(), 32)), llvm::ArrayRef(new_permutation)); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 00:40:15 UTC 2024 - 11.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_arith_ops_folder.cc
Location loc) { auto dims_type = mlir::dyn_cast<RankedTensorType>(dims.getType()); if (!dims_type) return success(); if (dims_type.getRank() > 1) return emitError(loc, "dimensions can only be 0D or 1D tensor"); auto input_type = mlir::dyn_cast<RankedTensorType>(input.getType()); if (!input_type) return success(); int64_t rank = input_type.getRank();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_utils.cc
auto range = dense_attr.getValues<int64_t>(); std::transform(range.begin(), range.end(), ret.begin(), [](int64_t attr) { return static_cast<int32_t>(attr); }); return DenseIntElementsAttr::get( RankedTensorType::get(ret.size(), builder.getIntegerType(32)), ret); } bool DenseI64AttrToI32Vector(const DenseIntElementsAttr& dense_attr, std::vector<int32_t>* out_vec) {
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/tensorflow/transforms/tf_saved_model_asset_sinking_pass.cc
// Asset filenames are relative to the SavedModel directory. const std::string filename = tsl::io::JoinPath( saved_model_dir_, absl::string_view(asset.getFilename())); RankedTensorType type = RankedTensorType::get( {}, TF::StringType::get(builder.getContext())); auto const_op = builder.create<TF::ConstOp>( builder.getUnknownLoc(),
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/unfold_splat_constant_pass.cc
Value scalar = op_builder->create<mhlo::ConstantOp>( const_op->getLoc(), DenseElementsAttr::get( RankedTensorType::get(/*shape=*/{}, element_type), splat_elements_attr.getSplatValue<Attribute>())); auto broadcast_dims = DenseIntElementsAttr::get( RankedTensorType::get(/*shape=*/{0}, op_builder->getI64Type()), llvm::SmallVector<int64_t>{}); mhlo::BroadcastInDimOp broadcast_in_dim_op =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 3.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_ops_layout_helper.cc
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) new_shape[i] = shape[permutation[i]]; return RankedTensorType::get(new_shape, ranked_type.getElementType()); }
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/rewrite_util.h
// Returns int, float or complex DenseElementsAttr with scalar shape with the // given element type and the integer value. template <typename T> DenseElementsAttr GetScalarOfType(Type ty, T raw_value) { RankedTensorType scalar_ty = RankedTensorType::get({}, ty); if (auto float_ty = mlir::dyn_cast<FloatType>(ty)) { FloatAttr attr = FloatAttr::get(float_ty, raw_value); return DenseElementsAttr::get(scalar_ty, attr);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 22 19:47:48 UTC 2024 - 4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/ir/tfl_ops.cc
LogicalResult BatchMatMulOp::verify() { BatchMatMulOp op = *this; // batch size in lhs and rhs must be broadcastable RankedTensorType x_ty = op.getX().getType().dyn_cast<RankedTensorType>(); RankedTensorType y_ty = op.getY().getType().dyn_cast<RankedTensorType>(); if (!x_ty || !y_ty) return success(); ArrayRef<int64_t> x_shape = x_ty.getShape(); ArrayRef<int64_t> y_shape = y_ty.getShape();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 09:41:17 UTC 2024 - 169.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/ir/UniformSupport.cc
} Type ExpressedToQuantizedConverter::convert( quant::QuantizedType elemental_type) const { assert(expressed_type && "convert() on unsupported conversion"); if (auto tensor_type = dyn_cast<RankedTensorType>(input_type)) return RankedTensorType::get(tensor_type.getShape(), elemental_type); if (auto tensor_type = dyn_cast<UnrankedTensorType>(input_type)) return UnrankedTensorType::get(elemental_type);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 08 02:10:16 UTC 2024 - 4.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/fold_broadcast.cc
auto broadcast_arg_type = mlir::dyn_cast_or_null<RankedTensorType>( broadcast.getInput().getType()); if (!broadcast_arg_type || !broadcast_arg_type.hasStaticShape()) continue; // Check that the other argument has fully defined shape. auto argument_type = mlir::dyn_cast_or_null<RankedTensorType>( op->getOpOperand(1 - i).get().getType());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.9K bytes - Viewed (0)