- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 119 for ShapedType (0.13 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/constant_fold.cc
// TODO(hinsu): Handle ops that have one of the results empty for constant // propagation. bool has_empty_numerical_results = llvm::all_of(inst->getResultTypes(), [](Type ty) { ShapedType shaped_ty = mlir::cast<ShapedType>(ty); Type element_ty = shaped_ty.getElementType(); return shaped_ty.hasStaticShape() && shaped_ty.getNumElements() == 0 && element_ty.isIntOrFloat(); });
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/quantization/tensorflow/utils/tf_to_xla_attribute_utils_test.cc
Value packed_value = PackOperand(builder, module->getLoc(), value, pack_dim); DenseIntElementsAttr packed_value_attr; ASSERT_TRUE(matchPattern(packed_value, m_Constant(&packed_value_attr))); ShapedType packed_shape_type = mlir::dyn_cast<ShapedType>(packed_value.getType()); llvm::SmallVector<int64_t> packed_shape(packed_shape_type.getShape().begin(), packed_shape_type.getShape().end());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 3.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/util.cc
for (auto s : arr) { if (s != iota) return false; ++iota; } return true; } PermutationAndShape GetPermutationAndTransposedShape( llvm::ArrayRef<int64_t> permutation_array, ShapedType input_type, ConversionPatternRewriter& rewriter) { assert(permutation_array.size() == input_type.getRank()); llvm::SmallVector<int64_t> transposed_shape(permutation_array.size());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc
if (expected_out_row_dim != ShapedType::kDynamic && out_row_dim != ShapedType::kDynamic && out_row_dim != expected_out_row_dim) return op.emitOpError() << "found invalid output dimension on row, expected " << expected_out_row_dim << " but got " << out_row_dim; if (expected_out_col_dim != ShapedType::kDynamic && out_col_dim != ShapedType::kDynamic &&
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 146.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/translate/export_tf_dialect_op.h
// not in the op registry will be ignored. If the `ignore_unregistered_attrs` // argument is not set to true, _output_shapes attribute is added to nodes with // ShapedType for the leading values with ShapedType in the results of the // nodes. Set it to true if the returned NodeDef will be executed by the linked // TF Eager runtime. absl::StatusOr<std::unique_ptr<NodeDef>> ConvertTFDialectOpToNodeDef(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 01 11:17:36 UTC 2024 - 2.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/ir/UniformSupport.cc
return isa<FloatType>(input_type); } ExpressedToQuantizedConverter ExpressedToQuantizedConverter::forInputType( Type input_type) { if (isa<TensorType, VectorType>(input_type)) { Type element_type = cast<ShapedType>(input_type).getElementType(); if (!isQuantizablePrimitiveType(element_type)) return ExpressedToQuantizedConverter{input_type, nullptr}; return ExpressedToQuantizedConverter{input_type, element_type}; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 08 02:10:16 UTC 2024 - 4.3K bytes - Viewed (0) -
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/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/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)