- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 113 for ShapedType (0.13 sec)
-
tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h
auto next_op = *transpose_op.getResult().getUsers().begin(); if (dyn_cast_or_null<quantfork::QuantizeCastOp>(next_op)) return failure(); auto input_type = mlir::cast<ShapedType>(transpose_op.getInput().getType()); auto perm_type = mlir::cast<ShapedType>(transpose_op.getPerm().getType()); if (input_type.hasStaticShape() && perm_type.hasStaticShape()) { if (perm_type.getNumElements() != input_type.getRank()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 03 18:01:23 UTC 2024 - 28K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/legalize_jax_random.cc
auto result_tuple_ty = mlir::dyn_cast_or_null<TupleType>(func.getFunctionType().getResult(0)); if (!result_tuple_ty) return; if (result_tuple_ty.size() != 1) return; auto result_ty = mlir::dyn_cast<ShapedType>(result_tuple_ty.getType(0)); func.eraseBody(); func.addEntryBlock(); ImplicitLocOpBuilder builder(func.getLoc(), func.getBody()); llvm::SmallVector<int32_t> result_shape_i32;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/propagate_quantize_type.cc
auto original_result_type = user_op->getResult(0).getType(); auto new_user_op_type = CloneTypeWithNewElementType( original_result_type, mlir::cast<ShapedType>(op_before_dequantize.getType()) .getElementType()); createNewDequantizeOp(rewriter, op, user_op, user_idx, new_user_op_type); } else {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/merge_fusion_with_dequantize.cc
if (!req_op) return failure(); // Create a new func.call op with f32 output. auto new_call_op = call_op.clone(); new_call_op->getResult(0).setType( mlir::cast<ShapedType>(call_op.getResult(0).getType()) .clone(rewriter.getF32Type())); rewriter.setInsertionPoint(call_op); rewriter.insert(new_call_op);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/fake_quant_utils.h
return failure(); } int quant_dim = -1; if (PerAxis) { // This is a special case that the quant_dim is the last dimensions. quant_dim = mlir::cast<ShapedType>(res.getType()).getRank() - 1; } // Use the min/max from the operands and the num_bits and narrow_range // attribute to create the quantization parameter for the new quantize op.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_op_quant_spec.cc
return (isa<TF::XlaConvV2Op, TF::XlaDotV2Op, TF::XlaGatherOp, TF::GatherOp, TF::GatherV2Op>(op)); } bool IsValueWithQuantizablePrecision(Value val) { auto type = mlir::dyn_cast<ShapedType>(val.getType()); if (!type) return false; // Supported original tensor data types. if (type.getElementType().isF32() || type.getElementType().isBF16()) return true; return false; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/prepare_tf.cc
// destination type is not inferred and must be given explicitly. // // Preconditions: The given value must have a ShapedType. static Value CreateTFCastOpI32(OpBuilder *builder, Location loc, Value x, BoolAttr truncate) { auto x_type = mlir::dyn_cast_or_null<ShapedType>(x.getType()); if (!x_type) llvm_unreachable("unsupported type"); Type type = x_type.clone(builder->getI32Type());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 28 21:49:50 UTC 2024 - 64.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/transforms/cost_model.cc
if (IsQUI8Type(input_type) || IsQI8Type(input_type)) { total_size_transferred += input_type.getNumElements() * 8; } else { auto s_type = mlir::cast<ShapedType>(input_type); total_size_transferred += s_type.getNumElements() * s_type.getElementTypeBitWidth(); } } } return total_size_transferred; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/utils/fake_quant_utils.h
if (!fetch_min_max_(tf_op, min_value, max_value)) { return failure(); } Value input = tf_op.getInputs(); int quant_dim = -1; auto input_type = mlir::cast<ShapedType>(input.getType()); if (PerAxis) { if (!input_type.hasRank()) { tf_op.emitError("The input should have known rank for per-channel op."); return failure(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/prepare_quantize.cc
}; bool need_to_set_input_nodes_quantization_params = false; for (const BlockArgument arg : func.getArguments()) { auto shaped = mlir::dyn_cast<ShapedType>(arg.getType()); if (shaped && mlir::isa<FloatType>(shaped.getElementType()) && !has_quantize_op(arg)) { need_to_set_input_nodes_quantization_params = true; break; } }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 17.6K bytes - Viewed (0)