- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 118 for getShape (0.16 sec)
-
tensorflow/compiler/mlir/lite/quantization/ir/QuantOps.cc
} } // Verify axisStats (optional) attribute. if (getAxisStats()) { if (!getAxis()) return emitOpError("axis must be specified for axisStats"); auto shape = tensorArg.getShape(); auto argSliceSize = std::accumulate(std::next(shape.begin(), *getAxis()), shape.end(), 1, std::multiplies<int64_t>()); auto axisStatsType = getAxisStats()->getShapedType();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/legalize_jax_random.cc
func.eraseBody(); func.addEntryBlock(); ImplicitLocOpBuilder builder(func.getLoc(), func.getBody()); llvm::SmallVector<int32_t> result_shape_i32; auto result_shape = result_ty.getShape(); for (auto element : result_shape) { result_shape_i32.push_back(static_cast<int32_t>(element)); } auto result_shape_attr = builder.getI32TensorAttr(result_shape_i32); Value result_shape_tensor =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/constant_utils.cc
absl::StatusOr<arith::ConstantOp> CreateConstOpWithVectorValue( PatternRewriter* rewriter, Location loc, ShapedType shaped_type, int value) { ShapedType dense_type = RankedTensorType::get(shaped_type.getShape(), shaped_type.getElementType()); auto attr = CreateTypedAttr(dense_type, value); return rewriter->create<arith::ConstantOp>(loc, dense_type,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.cc
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 08 02:10:16 UTC 2024 - 43.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfrt/saved_model/saved_model.cc
TF_RETURN_IF_ERROR( ConvertScalarTypeToDataType(type.getElementType(), &dtype)); if (!type.hasRank()) return std::make_pair(dtype, tensorflow::PartialTensorShape()); auto shape = type.getShape(); llvm::SmallVector<int64_t, 4> dims; dims.assign(shape.begin(), shape.end()); return std::make_pair(dtype, tensorflow::PartialTensorShape(dims)); } } // namespace
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/nchw_convolution_to_nhwc.cc
// equal. TensorType GetTransposedTensorType( const TensorType type, const ArrayRef<int64_t> permutation) const { const SmallVector<int64_t> after_shape = Permute<int64_t>(type.getShape(), permutation); return type.cloneWith(after_shape, type.getElementType()); } }; } // namespace void NchwConvolutionToNhwcPass::runOnOperation() { func::FuncOp func_op = getOperation();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/prepare_tf.cc
if (!input_type) { return failure(); } const ArrayRef<int64_t> input_shape = input_type.getShape(); const int input_size = input_shape.size(); RankedTensorType begin_type = mlir::cast<RankedTensorType>(begin.getType()); const ArrayRef<int64_t> begin_shape = begin_type.getShape(); const int begin_dim = begin_shape.size(); if (begin_dim != 1) return failure();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 28 21:49:50 UTC 2024 - 64.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/validators.cc
} 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/tfrt/analysis/cost_analysis.cc
namespace tensorflow { namespace tfrt_compiler { namespace { constexpr int64_t kDefaultCheapCost = 1; int64_t GetRankedTensorSize(mlir::TensorType type) { auto shape = type.getShape(); int64_t size = 1; for (int64_t dim : shape) { // For unknown dimensions, use 1 as the size because it is usually the batch // dimension. //
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/optimize_layout.cc
ArrayRef<int64_t> perm, bool isInvert) { SmallVector<int64_t, 4> permutedShape = applyPermutation( type.getShape(), isInvert ? invertPermutationVector(perm) : perm); return RankedTensorType::get(permutedShape, type.getElementType()); } static RankedTensorType GetInvertPermutedTensorType(RankedTensorType type,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 21:59:06 UTC 2024 - 8.6K bytes - Viewed (0)