- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 86 for GetShape (0.14 sec)
-
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) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/fold_constant_transpose.cc
const auto value_attr = mlir::cast<DenseFPElementsAttr>(const_op.getValue()); const ArrayRef<int64_t> original_shape = value_attr.getShapedType().getShape(); const SmallVector<float> original_values = llvm::to_vector(value_attr.getValues<float>()); // Fold the constant value by transposing the values according to the
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/optimize_functional_ops.cc
// TODO(hinsu): Handle constants that are not scalar booleans. auto cond_type = mlir::dyn_cast<RankedTensorType>(cond.getType()); if (!cond_type || !cond_type.getShape().equals({}) || !cond_type.getElementType().isInteger(/*width=*/1)) return failure(); // Identify the branch to inline. bool cond_value = (*cond.value_begin<APInt>()).getSExtValue();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.6K bytes - Viewed (0)