- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for GetScalarOfType (0.22 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/lower_tf.td
class GetScalarOfFloatType<string value> : NativeCodeCall< "GetScalarOfType(getElementTypeOrSelf($0)," # value # ")">; def GetScalarInfOfType : NativeCodeCall< "GetScalarOfType(getElementTypeOrSelf($0), " "std::numeric_limits<double>::infinity())">; def GetScalarNanOfType : NativeCodeCall< "GetScalarOfType(getElementTypeOrSelf($0), " "std::numeric_limits<double>::quiet_NaN())">;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 04 13:30:42 UTC 2024 - 24.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/decompose_resource_ops.td
$l2_shrinkage, $lr_power, $use_locking, $multiply_linear_by_lr), [// grad_with_shrinkage = grad + 2 * l2_shrinkage * var (TF_ConstOp:$zero (GetScalarOfType<0> $lr)), (TF_ConstOp:$one (GetScalarOfType<1> $lr)), (TF_ConstOp:$two (GetScalarOfType<2> $lr)), (TF_AddV2Op:$grad_with_shrinkage $grad, (TF_MulOp $two, (TF_MulOp $l2_shrinkage, (CreateTFReadVariableOp $src_op, $grad, $var))
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 22 19:47:48 UTC 2024 - 20.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_patterns.td
// TODO(hinsu): Lower quantized types after supporting them in GetScalarOfType. def : Pat<(TF_ReluOp AnyTensor:$input), (CHLO_BroadcastMaxOp (MHLO_ConstantOp:$zero (GetScalarOfType<0> $input)), $input, (BinBroadcastDimensions $zero, $input)), [(TF_IntOrFpTensor $input)]>; // TODO(hinsu): Lower quantized types after supporting them in GetScalarOfType. def : Pat<(TF_Relu6Op AnyRankedTensor:$input),
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/tensorflow/transforms/rewrite_util.td
include "mlir/IR/OpBase.td" include "mlir/IR/PatternBase.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 GetScalarOfType<int value> : NativeCodeCall< "GetScalarOfType(getElementTypeOrSelf($0)," # value # ")">; // Here, the element type can be any integer or float type. But, note that only // 32 bit integers are supported for the values.
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/decompose_resource_ops.cc
Value step_size = rewriter.create<ConstOp>(loc, GetScalarOfType(u64, 256)); Value increment = rewriter.create<MulOp>(loc, u64_scalar, step_size, rng_op.getDelta()); // Increment the counter. SmallVector<Value, 4> pack_args; RankedTensorType word_u64_type = RankedTensorType::get({}, u64); Value zero_u64 = rewriter.create<ConstOp>(loc, GetScalarOfType(u64, 0));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Nov 03 12:35:38 UTC 2022 - 8.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/utils.cc
namespace mlir { namespace mhlo { ConstantOp GetScalarConstOfType(Type ty, Location loc, int64_t raw_value, OpBuilder* builder) { return builder->create<ConstantOp>(loc, hlo::getScalarOfType(ty, raw_value)); } ConstantOp GetScalarNegZeroOfType(Type ty, Location loc, OpBuilder* builder) { return builder->create<ConstantOp>(loc, hlo::getScalarNegZeroOfType(ty)); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Sep 06 19:12:29 UTC 2023 - 1.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/lower_tf.cc
auto result_type = x_type; auto start = rewriter.create<ConstOp>(loc, GetScalarOfType(int_type, 0)); Value limit = rewriter.create<ConstOp>( loc, GetScalarOfType(int_type, x_type.getShape()[0])); auto delta = rewriter.create<ConstOp>(loc, GetScalarOfType(int_type, 1)); // Construct a sequence of numbers [0, 1, ... len(x)-1]. auto updates =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 74.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/rewrite_util.h
namespace mlir { namespace TF { // Returns int, float or complex DenseElementsAttr with scalar shape with the // given element type and the integer value. template <typename T> DenseElementsAttr GetScalarOfType(Type ty, T raw_value) { RankedTensorType scalar_ty = RankedTensorType::get({}, ty); if (auto float_ty = mlir::dyn_cast<FloatType>(ty)) { FloatAttr attr = FloatAttr::get(float_ty, raw_value);
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
def MatrixDiagToV3 : Pat< (TF_MatrixDiagOp:$src $diag), (TF_MatrixDiagV3Op:$dest $diag, (TF_ConstOp (GetI32Attr<0>)), (TF_ConstOp (GetI32Attr<-1>)), (TF_ConstOp (GetI32Attr<-1>)), (TF_ConstOp (GetScalarOfType<0> $diag)), (GetStrAttr<"RIGHT_LEFT">)), [], [(CopyAttrs $src, $dest)]>; //===----------------------------------------------------------------------===// // QuantizeAndDequantizeV2 op patterns.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Dec 06 18:42:28 UTC 2023 - 17K bytes - Viewed (0)