- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 50 for constop (0.15 sec)
-
tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/util.cc
} else { // Convert I64 const array to I32. llvm::SmallVector<int32_t> const_i32_vec; for (auto element : const_value) { const_i32_vec.push_back(static_cast<int32_t>(element)); } const_value_raw = rewriter.getI32TensorAttr(const_i32_vec); } Value result_const = builder.create<TF::ConstOp>(const_value_raw); return result_const; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/unfuse_batch_norm_pass.cc
if (i != feature_index) { reduce_dim_axes.push_back(i); } } auto mean_dims = DenseIntElementsAttr::get(dims_type, reduce_dim_axes); ::mlir::TF::ConstOp reduce_dim_op = rewriter.create<TF::ConstOp>(bn_op.getLoc(), mean_dims); int64_t feature_dim_size = input_type.getDimSize(feature_index); auto mean_var_type = RankedTensorType::get(/*shape=*/{feature_dim_size},
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/lstm_utils.cc
} TF::ConstOp Create1DConstantOp(const std::vector<int>& value, Location loc, OpBuilder* builder) { auto type = mlir::RankedTensorType::get(value.size(), builder->getIntegerType(32)); auto dense_values = mlir::DenseIntElementsAttr::get(type, value); return builder->create<TF::ConstOp>(loc, dense_values); } TF::ConstOp CreateScalarConstantOp(int value, Location loc,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 36.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.h
} const auto type = RankedTensorType::get(shape, builder.getF32Type()); const auto value_attr = DenseFPElementsAttr::get(type, values); return builder.create<TF::ConstOp>(loc, value_attr); } // Creates a 1D array with integer/float type. template <typename T> Value Create1DConstValue(OpBuilder& builder, const Location loc, const SmallVector<T>& values) {
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/tensorflow/transforms/unroll_batch_matmul.cc
std::swap(rhs_shape[rhs_dims - 1], rhs_shape[rhs_dims - 2]); } const int64_t rows = lhs_shape[lhs_dims - 2]; const int64_t cols = rhs_shape[rhs_dims - 1]; if (lhs_shape[lhs_dims - 1] != rhs_shape[rhs_dims - 2]) { // Input dimensions must be compatible for multiplication. return failure(); } const auto matmul_type = RankedTensorType::get({rows, cols}, element_type);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfrt/tests/mlrt/tf_to_mlrt.mlir
// CHECK-NEXT: [[PREFIX:%.*]] = tf_mlrt.constop %cst = "tf.Const"() {__op_key = 0: i32, value = dense<"restore_ariables"> : tensor<!tf_type.string>} : () -> tensor<!tf_type.string> // CHECK-NEXT: [[SLICE:%.*]] = tf_mlrt.constop %cst_0 = "tf.Const"() {__op_key = 1: i32, value = dense<""> : tensor<1x!tf_type.string>} : () -> tensor<1x!tf_type.string> // CHECK-NEXT: [[NAME:%.*]] = tf_mlrt.constop
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 31 20:44:15 UTC 2024 - 24.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_collective.cc
IntegerAttr group_key = rewriter.getI32IntegerAttr(0); auto const_group_size = rewriter.create<TF::ConstOp>( assign_group->getLoc(), assign_group.getResult(0).getType(), group_size); auto const_group_key = rewriter.create<TF::ConstOp>( assign_group->getLoc(), assign_group.getResult(1).getType(), group_key);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 16K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/legalize_tf.cc
return rewriter.createOrFold<TF::CastOp>(loc, new_type, val, rewriter.getBoolAttr(false)); } return rewriter.createOrFold<TF::CastOp>( loc, UnrankedTensorType::get(new_ele_type), val, rewriter.getBoolAttr(false)); } // Utility function to- // 1. Create a tfl.const op with an int32_t values, from an MLIR Value, if the
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon May 20 20:06:54 UTC 2024 - 45.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tf_saved_model_freeze_variables.cc
OpBuilder builder, Location loc) { return builder.create<TF::ConstOp>(loc, tensor_elements); } // Returns ElementsAttr which has the value held by 'resource_tensor'. ElementsAttr GetTensorValueAsElementsAttr( TF::VarHandleOp var_handle_op, const tensorflow::Tensor& resource_tensor, const tensorflow::DeviceMgr* mgr, OpBuilder builder) { if (resource_tensor.dtype() != tensorflow::DT_RESOURCE) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 09:56:53 UTC 2024 - 19.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/einsum.cc
namespace mlir { namespace TF { namespace { // Creates ConstOp for int32_t value. ConstOp createI32ConstOp(int32_t value, Location loc, PatternRewriter* rewriter) { auto int_attr = IntegerAttr::get(rewriter->getIntegerType(32), value); return rewriter->create<ConstOp>(loc, int_attr); } // Creates ConstantOp for array of int32_t.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 33.3K bytes - Viewed (0)