- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 56 for ShapedType (0.42 sec)
-
tensorflow/compiler/mlir/tensorflow/utils/convert_type.cc
#include "tensorflow/core/framework/types.h" #include "tensorflow/core/framework/types.pb.h" #include "tensorflow/core/lib/core/errors.h" namespace tensorflow { using mlir::Builder; using mlir::ShapedType; using mlir::Type; Status ConvertDataType(DataType dtype, Builder builder, Type* type) { switch (dtype) { case DT_HALF: *type = builder.getF16Type(); return absl::OkStatus();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Apr 26 09:37:10 UTC 2024 - 7.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/dynamic_shape_utils.cc
return llvm::to_vector(llvm::map_range(shapes, [](int64_t shape) { return shape == kTFDynamicSize ? mlir::ShapedType::kDynamic : shape; })); } llvm::SmallVector<int64_t> ConvertMlirShapeToTF( llvm::ArrayRef<int64_t> shapes) { return llvm::to_vector(llvm::map_range(shapes, [](int64_t shape) { return mlir::ShapedType::isDynamic(shape) ? kTFDynamicSize : shape; })); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Nov 21 16:21:18 UTC 2022 - 1.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/reduce_type_precision.cc
LogicalResult matchAndRewrite(TFL::GatherOp op, PatternRewriter &rewriter) const override { auto const_type = mlir::dyn_cast<ShapedType>(op.getOperand(0).getType()); auto result_type = mlir::dyn_cast<ShapedType>(op.getResult().getType()); if (!const_type || !const_type.getElementType().isSignlessInteger(4) || !result_type || !result_type.getElementType().isSignlessInteger(8)) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/util.h
#include "mlir/Transforms/DialectConversion.h" // from @llvm-project #include "xla/mlir_hlo/mhlo/IR/hlo_ops.h" namespace mlir { namespace odml { struct PermutationAndShape { DenseIntElementsAttr permutation; ShapedType shape; }; // Check that `arr` is an R1 iota with integer element type starting from `0` // with `size` number of values. bool IsIotaAttr(ArrayRef<int64_t> arr, int64_t size);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Nov 08 11:35:25 UTC 2023 - 6.4K bytes - Viewed (0) -
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/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/lite/stablehlo/transforms/legalize_hlo_conversions/scatter.cc
namespace mlir { namespace odml { LogicalResult CanonicalizeScatterUpdates( Operation* scatter_op, llvm::ArrayRef<int64_t> update_window_dims, const Value& indices, const ShapedType& indices_type, Value& updates, ShapedType& updates_type, ConversionPatternRewriter& rewriter) { auto canonical_update_window_dims = llvm::to_vector( llvm::seq<int64_t>(indices_type.getRank() - 1, updates_type.getRank()));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Sep 12 02:29:42 UTC 2023 - 3.1K 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)