- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 32 for getShape (0.12 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/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/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) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/fuse_convolution_pass.cc
// Only fuses multiplier if all dimensions other than the out channel // dimension are equal to 1. if (!TFL::IsDimensionsDegenerateExceptLastOne( mul_value.getShapedType().getShape())) { return rewriter.notifyMatchFailure(mul_op, [&](::mlir::Diagnostic &diag) { diag << "entities 'mul_value' failed to satisfy constraint: " "unsupported dimensions"; }); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Feb 22 22:21:19 UTC 2024 - 8.3K bytes - Viewed (0) -
maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/DefaultLifecyclesStub.java
VALIDATE.getPhase(), INITIALIZE.getPhase(), PROCESS_RESOURCES.getPhase(), COMPILE.getPhase(), TEST.getPhase(), PROCESS_TEST_RESOURCES.getPhase(), PACKAGE.getPhase(), "BEER", INSTALL.getPhase());
Registered: Wed Jun 12 09:55:16 UTC 2024 - Last Modified: Fri Apr 12 10:50:18 UTC 2024 - 3.2K bytes - Viewed (0)