- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 148 for getElementDtype (0.18 sec)
-
tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc
GetI64ElementsAttr({0}, &rewriter), input_type.getElementType()); assert(!input_type.getElementType().isInteger(1) && "data type should not be i1"); BuildReduceBody<AddOp>(input_type.getElementType(), &reduce.getBody(), &rewriter); rewriter.replaceOpWithNewOp<ReshapeOp>( op,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 11 20:00:43 UTC 2024 - 291.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/utils/bfloat16_type.cc
return isa<FloatType>(type) && type.getIntOrFloatBitWidth() > 16; } Type ToBfloat16Type(Type type) { if (auto shaped = mlir::dyn_cast<ShapedType>(type)) { const Type elem = shaped.getElementType(); if (IsLargeFloatType(elem)) { return shaped.clone(BFloat16Type::get(type.getContext())); } } else if (IsLargeFloatType(type)) { return BFloat16Type::get(type.getContext()); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 1.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/transforms/fold_constants_to_subgraph.cc
// arith ConstOp path. auto type = mlir::cast<ShapedType>(arith_const_op.getType()).getElementType(); if (!type.isInteger(32) && !type.isInteger(64)) return false; } else if (auto const_op = dyn_cast_or_null<TFL::ConstOp>(op)) { // ConstOp path. auto type = mlir::cast<ShapedType>(const_op.getType()).getElementType(); if (!type.isInteger(32) && !type.isInteger(64)) return false; } else { // QConstOp path.
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/push_transpose_through_ewise.cc
llvm::dyn_cast<RankedTensorType>(op->getResult(0).getType()); auto new_out_type = RankedTensorType::get( PermuteShape(current_out_type.getShape(), inverse_perm_arr), current_out_type.getElementType()); // Create new ewise op to appear before the tranpose. auto *new_ewise_op = rewriter.create(op->getLoc(), op->getName().getIdentifier(),
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 12.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_ops_to_mhlo.cc
op->getLoc(), *output_type, op.getInput()); rewriter.replaceOpWithNewOp<mhlo::BitcastConvertOp>( op, output_type->clone( mlir::dyn_cast<quant::QuantizedType>(output_type->getElementType()) .getStorageType()), result); return success(); } }; // UniformDequantizeOp takes TF quantized types as input which would have been
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 30.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/c/c_api_unified_experimental_mlir.cc
// unified_api_test.cc. return Unimplemented("MlirTensor::Shape is not implemented yet."); } Value getValue() { return value_; } Type getElementType() { return mlir::cast<ShapedType>(value_.getType()).getElementType(); } // For LLVM style RTTI. static bool classof(const AbstractTensorHandle* ptr) { return ptr->getKind() == kMlir; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 28.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/convert_type.cc
absl::StrCat("Converting ", debugString(type), " to DataType")); } } else if (auto complex_type = mlir::dyn_cast<mlir::ComplexType>(type)) { auto etype = complex_type.getElementType(); if (etype.isF32()) { *dtype = DT_COMPLEX64; return absl::OkStatus(); } else if (etype.isF64()) { *dtype = DT_COMPLEX128; 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/lite/transforms/quantize_patterns.td
def QuantizeByQuantizedType : NativeCodeCall<"quant::Quantize($0, $1.getValue())">; def F32ElementsAttr : ElementsAttrBase< CPred<"$_self.cast<ElementsAttr>().getShapedType().getElementType().isF32()">, "float constant tensor">; // Squash tfl.dequantize and tfl.quantize pairs. // TODO(fengliuai): Compare the scale of input and output. This can also be // squashed to a requantize op if the scales are different.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 28 23:10:13 UTC 2024 - 2.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc
if (const TensorType type = mlir::dyn_cast<TensorType>(operand.getType())) { if (mlir::isa<FloatType>(type.getElementType())) { return false; } if (mlir::isa<UniformQuantizedType, UniformQuantizedPerAxisType>( type.getElementType())) { has_quantized_types = true; } } } for (const Value result : call_op.getResults()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 03 06:04:36 UTC 2024 - 41.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform.cc
if (!output_type || !output_type.getElementType().isF32()) return failure(); auto input_type = mlir::dyn_cast<ShapedType>(input_dequant.getType()); // TODO(renjieliu): support UniformQuantizedPerAxisType. auto q_type = mlir::dyn_cast_or_null<quant::UniformQuantizedType>( input_type.getElementType()); if (!q_type) return failure();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.4K bytes - Viewed (0)