- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,131 for convertOp (0.18 sec)
-
tensorflow/compiler/mlir/quantization/stablehlo/passes/quantize_weight.cc
// Insert ConvertOp if it does not exist yet. Otherwise, just rewire without // creating a ConvertOp. for (const OpOperand& connected_op : op.getResult().getUses()) { ConvertOp convert_op = dyn_cast_or_null<ConvertOp>(connected_op.getOwner()); // ConvertOp already exists. Rewire the existing convert op into f16. if (convert_op && convert_op.getType() == new_result_type) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/convert_func_to_bfloat16.cc
// This helper function makes legality check easier. Both convert ops in the // patterns below are considered legal: // - `BitcastConvertOp` (i32 -> f32) + `ConvertOp` (f32 -> bf16) // - `ConvertOp` (bf16 -> f32) -> `BitcastConvertOp` (f32 -> i32) template <typename ConvertOp, typename OtherConvertOp> bool IsConvertOpLegal(ConvertOp convert_op, BFloat16TypeConverter& converter) { if (!converter.isLegal(convert_op.getOperand().getType())) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/compose_uniform_quantized_type_pass.cc
bool IsI8ToI32Cast(stablehlo::ConvertOp convert_op) { const bool is_i8_operand = convert_op.getOperand().getType().getElementType().isInteger(/*width=*/8); const bool is_i32_result = convert_op.getResult().getType().getElementType().isInteger(/*width=*/32); return is_i8_operand && is_i32_result; } // Tests whether a `stablehlo::ConvertOp` is a i32 -> f32 cast.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 64.6K bytes - Viewed (0) -
src/reflect/value.go
} // Convert returns the value v converted to type t. // If the usual Go conversion rules do not allow conversion // of the value v to type t, or if converting v to type t panics, Convert panics. func (v Value) Convert(t Type) Value { if v.flag&flagMethod != 0 { v = makeMethodValue("Convert", v) } op := convertOp(t.common(), v.typ()) if op == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:17:41 UTC 2024 - 119.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc
return axis < 0 ? axis + rank : axis; } /// Returns a `ConvertOp` that casts the elements to a i64 type while retaining /// the shape of the input value. static ConvertOp CastValueToI64(Location loc, Value value, PatternRewriter *rewriter) { return rewriter->create<ConvertOp>(loc, value, rewriter->getIntegerType(64)); }
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/tf2xla/transforms/legalize_tf_patterns.td
//===----------------------------------------------------------------------===// /// Converts a TF::SoftsignOp to HLO. /// Softsign(features) = features / (1 + abs(features)) def : Pat<(TF_SoftsignOp AnyTensor:$input), (MHLO_DivOp $input, (MHLO_AddOp (MHLO_ConstantLike<"1"> $input), (MHLO_AbsOp $input)) ) >; /// Converts a TF::SoftsignGradOp to HLO.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon May 06 18:46:23 UTC 2024 - 34.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_ops_to_mhlo.cc
.getStorageType()), res_max_clipped); return success(); } }; // This pattern converts qint <-> int CastOp to int -> int ConvertOps. // The former are introduced in ConvertTFQuantTypes pass. The resulting int <-> // int ConvertOps are no-ops and can be removed later in a Canonicalizer pass. class ConvertTfCastOp : public OpConversionPattern<TF::CastOp> { public:
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/lite/flatbuffer_import.cc
} else if (op_name == "tfl.reshape" && op_state.operands.size() == 1) { // Special case for reshape: the second op is optional in the old // converter and kernel, so we create the second operand, which is // required by the new converter, from the reshape op's option. auto new_shape = op.builtin_options.AsReshapeOptions()->new_shape; auto shape_type = tensorflow::GetTypeFromTFTensorShape(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 21 18:21:50 UTC 2024 - 66.8K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/expr.go
t := n.X.Type() if t == nil || n.Type() == nil { n.SetType(nil) return n } op, why := convertOp(n.X.Op() == ir.OLITERAL, t, n.Type()) if op == ir.OXXX { // Due to //go:nointerface, we may be stricter than types2 here (#63333). base.ErrorfAt(n.Pos(), errors.InvalidConversion, "cannot convert %L to type %v%s", n.X, n.Type(), why) n.SetType(nil) return n } n.SetOp(op) switch n.Op() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 23.1K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/subr.go
types.TSLICE: return ir.OCONVNOP, "" } } // 6. rule about untyped constants - already converted by DefaultLit. // 7. Any typed value can be assigned to the blank identifier. if dst.Kind() == types.TBLANK { return ir.OCONVNOP, "" } return ir.OXXX, "" } // Can we convert a value of type src to a value of type dst? // If so, return op code to use in conversion (maybe OCONVNOP).
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 05 19:45:58 UTC 2023 - 20.2K bytes - Viewed (0)