- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 101 for constop (0.61 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/freeze_global_tensors.cc
bvector.set(use.getOperandNumber()); } } // Replace the arg with a tf.Const op in the function body. builder.setInsertionPointToStart(&func.getBody().front()); auto const_op = builder.create<TF::ConstOp>(global_tensor.getLoc(), *global_tensor.getValue()); args_to_erase.set(val.getArgNumber());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/split_merged_operands.cc
auto inserted_value = values->insert(operand).second; if (inserted_value) continue; // We can only clone the constant op or const->dequantize combo. The latter // case is useful for float16 quantization. Since all ops have been // legalized to tflite ops, so we only care about ConstOp or QConstOp or // mlir constant op. Operation* input_op = operand.getDefiningOp(); if (input_op == nullptr) return failure();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 24 20:30:06 UTC 2024 - 5.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc
llvm::SmallVectorImpl<ShapedTypeComponents>& inferredReturnShapes) { const int64_t num_spatial_dims = std::is_same<OpT, Conv2DOpAdaptor>() ? 2 : 3; const int64_t num_dims = 2 + num_spatial_dims; const Value input = op.getInput(); const Value filter = op.getFilter(); const TensorType input_ty = mlir::cast<TensorType>(input.getType()); const TensorType filter_ty = mlir::cast<TensorType>(filter.getType());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 146.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/tf2xla/transforms/legalization_op_config_test.cc
} TEST_F(LegalizationOpConfigTest, ChecksDynamicPadderOps) { EXPECT_TRUE( IsDynamicPadderOp(TypeID::get<TF::XlaSetDynamicDimensionSizeOp>())); EXPECT_FALSE(IsDynamicPadderOp(TypeID::get<TF::ConstOp>())); } // This test is kind of odd. We go through all the Tensorflow types and check // whether they are legalized with MLIR, TF2XLA, or both. Ideally the sets are
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 30 03:31:01 UTC 2024 - 8.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/lower_static_tensor_list.cc
return CreateI32SplatConst(op.getLoc(), rewriter, {1}, attr.getInt()); } if (auto const_op = num_elements.getDefiningOp<TF::ConstOp>()) { return CreateI32SplatConst(op->getLoc(), rewriter, {1}, (*const_op.getValue() .cast<DenseElementsAttr>() .getValues<APInt>()
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 11 20:00:43 UTC 2024 - 70.7K 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/lite/transforms/optimize_batch_matmul.cc
int cY = rhs_shape.size() - 2; if (bmm_op.getAdjX()) { rY = rhs_shape.size() - 2; cY = rhs_shape.size() - 1; } auto reduce_dim_op = rewriter.create<TFL::ConstOp>( bmm_op->getLoc(), DenseIntElementsAttr::get( RankedTensorType::get({1}, rewriter.getI32Type()), {cY})); auto sum_op = rewriter.create<TFL::SumOp>(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/ir/tfl_ops.cc
LogicalResult matchAndRewrite(ConstOp const_op, PatternRewriter& rewriter) const override { if (arith::ConstantOp::isBuildableWith(const_op.getValue(), const_op.getType())) { rewriter.replaceOpWithNewOp<arith::ConstantOp>(const_op, const_op.getValue()); return success();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 09:41:17 UTC 2024 - 169.2K bytes - Viewed (0)