- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 130 for ShapedType (0.14 sec)
-
tensorflow/compiler/mlir/lite/utils/size_utils.cc
#include <cstdint> #include "mlir/IR/BuiltinTypes.h" // from @llvm-project namespace mlir { namespace TFL { int32_t ConvertToTfliteSize(int64_t size) { return mlir::ShapedType::isDynamic(size) ? -1 : static_cast<int32_t>(size); } } // namespace TFL
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Dec 23 16:15:59 UTC 2022 - 1009 bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/size_utils_test.cc
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Dec 23 16:15:59 UTC 2022 - 1.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/ir/QuantizeUtils.cc
if (!quantDenseAttr) { return nullptr; } // Cast from an expressed-type-based type to storage-type-based type, // preserving the sparse shape (i.e. tensor<4xf32> -> tensor<4xi8>). ShapedType newSparseType = mlir::dyn_cast_or_null<ShapedType>( quantizedElementType.castExpressedToStorageType( realSparseAttr.getType())); if (!newSparseType) { return nullptr; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/verification_utils.cc
namespace mlir { namespace TF { LogicalResult VerifyShapeOfReshapeOp(ArrayRef<int64_t> shape) { bool has_dynamic_dim = false; for (int64_t dim : shape) { if (dim != ShapedType::kDynamic) { if (dim < 0) return failure(); continue; } if (has_dynamic_dim) return failure(); has_dynamic_dim = true; } return success(); } } // namespace TF
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Nov 21 16:21:18 UTC 2022 - 1.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/odml_converter/transforms/shlo_simplify.td
include "mlir/IR/BuiltinAttributes.td" include "mlir/IR/CommonAttrConstraints.td" include "mlir/IR/CommonTypeConstraints.td" def CloneF32ElementsAttrWithOnes : NativeCodeCall<"DenseElementsAttr::get($0.getType().cast<ShapedType>(), (float)1.0)">; def NotConstant : Constraint< CPred<"$0.isa<BlockArgument>() || !llvm::isa<stablehlo::ConstantOp>($0.getDefiningOp())">, "Is not a constant.">; def : Pat<(StableHLO_DivOp $l,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 10 03:05:20 UTC 2024 - 1.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/op_stat_pass.cc
if (op->getNumResults() > 0 && isa<ShapedType>(op->getResult(0).getType())) { // Use rhs operand to detect types for dynamic range quantizable ops. Value value_for_deducing_op_type = (dyn_cast_or_null<DynamicRangeQuantizedOpInterface>(op)) ? op->getOperand(1) : op->getResult(0); ShapedType value_shaped_type = mlir::dyn_cast_or_null<ShapedType>(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.td
CPred<"$0 == $1">>; // Checks if the value has rank. def HasRank : Constraint< CPred<"$0.getType().cast<ShapedType>().hasRank()">>; // Checks if the value has rank of `n`. class HasRankOf<int n> : Constraint< CPred<"$0.getType().cast<ShapedType>().hasRank() && " "$0.getType().cast<ShapedType>().getRank() == " # n>, "Checks if the value has rank of 'n'.">; // Checks if the value has static shape.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Mar 08 04:55:44 UTC 2024 - 6.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/optimize.cc
if (!reshape_op) return failure(); auto reshape_type = mlir::cast<ShapedType>(reshape_op.getOutput().getType()); if (!reshape_type.hasStaticShape()) return failure(); ArrayRef<int64_t> reshape_shape = reshape_type.getShape(); auto input_type = mlir::cast<ShapedType>(op.getInput().getType()); auto output_type = mlir::cast<ShapedType>(op.getOutput().getType());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/translate/export_tf_dialect_op.cc
} // Here we only add the shapes for the leading values with ShapedType, // assuming values with non-ShapedType are put at the end of the result. if (!ignore_unregistered_attrs && inst->getNumResults() > 0) { auto values = inst->getResults(); auto begin = values.begin(); auto end = values.begin(); while (end != values.end() && mlir::isa<mlir::ShapedType>((*end).getType())) end++; if (begin != end) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 01 11:17:36 UTC 2024 - 11.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/optimize.td
CPred<"$0.getType().isa<RankedTensorType>()">, CPred<"!$0.getType().cast<ShapedType>().isDynamicDim( " " $0.getType().cast<RankedTensorType>().getRank() - 1)">]>>; def IsNotComplexType : Constraint<And<[ CPred<"$0.getType().isa<RankedTensorType>()">, CPred<"!$0.getType().cast<ShapedType>().getElementType().isa<ComplexType>()"> ]>>;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Apr 22 07:31:23 UTC 2023 - 5.4K bytes - Viewed (0)