- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for IsConstantValueOf (0.22 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/rewrite_util.td
// Here, the element type can be any integer or float type. But, note that only // 32 bit integers are supported for the values. class IsConstantValueOf<int value> : Constraint<CPred< "IsConstantValueOf($0," # value # ")">>; def IsOnGpuDevicePred : CPred<"IsOnGpuDevice($0.getOwner())">;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jul 21 02:54:35 UTC 2022 - 1.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/rewrite_util.h
} } llvm_unreachable("unsupported type"); } // Returns true if `value` is compile-time constant and its splat value equals // to `raw_value`. template <typename T> bool IsConstantValueOf(Value value, T raw_value) { auto element_type = mlir::cast<ShapedType>(value.getType()).getElementType(); if (mlir::isa<FloatType>(element_type)) { DenseFPElementsAttr float_attr;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 22 19:47:48 UTC 2024 - 4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/canonicalize.td
// canonicalization device independent, by adding an int32 GPU kernel for Relu. def MaximumOfZeroToRelu : Pat< (TF_MaximumOp:$maximum_op $x, $y), (TF_ReluOp:$dest $x), [(IsConstantValueOf<0> $y), (IsDeviceCompatible $maximum_op)], [(CopyAttrs $maximum_op, $dest)]>; //===----------------------------------------------------------------------===// // Canonicalize tf.Relu of Minimul six to tf.Relu6
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Dec 06 18:42:28 UTC 2023 - 17K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/optimize_patterns.td
(TFL_ReshapeOp $input, (Arith_ConstantOp (GetShape $expand_dims_op))), [(AnyStaticShapeTensor $expand_dims_op)]>; // Here, the element type can be any integer or float type. class IsConstantValueOf<int value> : Constraint<CPred< "TFL::IsConstantValueOf($0," # value # ")">>; // ReLU patterns def MatchReluPattern : Pat< (TFL_MaximumOp $input, (Arith_ConstantOp $Zero)), (TFL_ReluOp $input), [(FloatValueEquals<"0"> $Zero)]>;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 16 20:31:41 UTC 2024 - 66.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/optimize.cc
return f.isExactlyValue(value); }); } // Returns true if `value` is compile-time constant and its splat value equals // to `raw_value`. template <typename T> bool IsConstantValueOf(mlir::TypedAttr value, T raw_value) { auto element_type = mlir::cast<ShapedType>(value.getType()).getElementType(); if (mlir::isa<FloatType>(element_type)) { return FloatValueEquals(value, raw_value);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 00:40:15 UTC 2024 - 102.3K bytes - Viewed (0)