- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 133 for ShapedType (0.15 sec)
-
tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc
return failure(); } ShapedType tensor_qtype = mlir::cast<ShapedType>(q_op.getResult().getType()); Attribute tensor_proto_attr = Quantize(attr, tensor_qtype); if (!tensor_proto_attr) { return failure(); } Type storage_type = mlir::cast<QuantizedType>(tensor_qtype.getElementType()) .getStorageType(); ShapedType new_type = tensor_qtype.clone(storage_type);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 54.5K bytes - Viewed (0) -
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/lite/transforms/legalize_variables.td
def HasSupportedElementType : Constraint<CPred<"HasSupportedElementType($0.getDefiningOp())">>; def IsSupportedElementType : Constraint<CPred<"IsSupportedElementType($0.getType().cast<ShapedType>())">>; def LegalizeVarHandle : Pat< (TF_VarHandleOp:$result $container, $shared_name), (TFL_VarHandleOp $container, $shared_name), [(HasSupportedElementType $result)]>; def LegalizeReadVariable : Pat<
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Mar 16 23:20:46 UTC 2022 - 1.5K 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)