- Sort Score
- Result 10 results
- Languages All
Results 31 - 38 of 38 for IsInteger (0.13 sec)
-
tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform_patterns.cc
// The value won't change in the new attribute, but if the value is out of // the bound of i32, the function returns a failure. LogicalResult ConvertToI32Attr(IntegerAttr attr, IntegerAttr* attr_i32) { if (attr.getType().isInteger(/*width=*/32)) { *attr_i32 = attr; return success(); } int64_t value = attr.getInt(); if (value > std::numeric_limits<int>::max() || value < std::numeric_limits<int>::min()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 25.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/legalize_patterns.td
CPred<"$_self.cast<ElementsAttr>().getShapedType().getElementType().isF32()">, "float constant tensor">; def Int64ElementsAttr : ElementsAttrBase< CPred<"$_self.cast<ElementsAttr>().getShapedType().getElementType().isInteger(64)">, "Int 64 constant tensor">; // Extract the ith int element from an ArrayAttr $0 as an 32-bit IntegerAttr // with builder. class ExtractI32At<int i> : NativeCodeCall<
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 04 13:30:42 UTC 2024 - 28.5K bytes - Viewed (0) -
src/cmd/compile/internal/walk/order.go
// can directly convert (e.g. named type to underlying type, or one pointer to another) return typecheck.Expr(ir.NewConvExpr(pos, ir.OCONVNOP, kt, n)) case nt.IsInteger() && kt.IsInteger(): // can directly convert (e.g. int32 to uint32) if n.Op() == ir.OLITERAL && nt.IsSigned() { // avoid constant overflow error n = ir.NewConstExpr(constant.MakeUint64(uint64(ir.Int64Val(n))), n)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 02:00:33 UTC 2024 - 42.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/library/cost_test.go
expr: `quantity("50k").add(20).sub(quantity("100k")).asInteger() > 0`, expectEstimatedCost: checker.CostEstimate{Min: 6, Max: 6}, expectRuntimeCost: 6, }, { name: "arith_chain", expr: `quantity("50k").add(20).sub(quantity("100k")).sub(-50000).asInteger() > 0`, expectEstimatedCost: checker.CostEstimate{Min: 7, Max: 7}, expectRuntimeCost: 7,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Apr 23 17:22:44 UTC 2024 - 40.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/legalize_tf.cc
// The value won't change in the new attribute, but if the value is out of // the bound of i32, the function returns a failure. LogicalResult ConvertToI32Attr(IntegerAttr attr, IntegerAttr* attr_i32) { if (attr.getType().isInteger(/*width=*/32)) { *attr_i32 = attr; return success(); } int64_t value = attr.getInt(); if (value > std::numeric_limits<int>::max() || value < std::numeric_limits<int>::min()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon May 20 20:06:54 UTC 2024 - 45.2K bytes - Viewed (0) -
src/cmd/compile/internal/walk/switch.go
return } sort.Slice(cc, func(i, j int) bool { return constant.Compare(cc[i].lo.Val(), token.LSS, cc[j].lo.Val()) }) // Merge consecutive integer cases. if s.exprname.Type().IsInteger() { consecutive := func(last, next constant.Value) bool { delta := constant.BinaryOp(next, token.SUB, last) return constant.Compare(delta, token.EQL, constant.MakeInt64(1)) } merged := cc[:1]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:34:01 UTC 2024 - 30.1K bytes - Viewed (0) -
src/cmd/compile/internal/walk/expr.go
n.Len = walkExpr(n.Len, init) return n } // return 1 if integer n must be in range [0, max), 0 otherwise. func bounded(n ir.Node, max int64) bool { if n.Type() == nil || !n.Type().IsInteger() { return false } sign := n.Type().IsSigned() bits := int32(8 * n.Type().Size()) if ir.IsSmallIntConst(n) { v := ir.Int64Val(n) return 0 <= v && v < max }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:34:01 UTC 2024 - 27.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/replace_cast_hacks_with_tf_xla_ops.cc
bool IsRankedInt(Value value, const int integer_width) { ShapedType value_type = mlir::cast<ShapedType>(value.getType()); if (!value_type.hasRank()) return false; if (!value_type.getElementType().isInteger(integer_width)) return false; return true; } // Constraint to check: // 1. The einsum has two inputs and one output. // 2. The einsum is not created by the convert function itself.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 47.1K bytes - Viewed (0)