- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 104 for constop (0.2 sec)
-
tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc
// Returns a value if the `value` is defined by a ConstOp with a single // integer element in it and has an expected rank. auto get_const_int = [](Value value, int expected_rank) -> std::optional<int64_t> { auto const_op = dyn_cast_or_null<ConstOp>(value.getDefiningOp()); if (!const_op) return std::nullopt; auto value_attr = const_op.getValue().dyn_cast<DenseIntElementsAttr>();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 09 22:07:10 UTC 2024 - 170.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/sparsecore/embedding_program_key.cc
if (!op->hasAttr(kMiniBatchSplitsAttr) && !op->hasAttr(kMiniBatchCsrAttr)) return WalkResult::advance(); Operation* defining = op->getOperand(0).getDefiningOp(); if (llvm::dyn_cast_or_null<TF::ConstOp>(defining)) { op->emitError("Couldn't find a program key to insert into this op."); return WalkResult::interrupt(); } return WalkResult::advance(); });
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 17.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h
return success(); } LogicalResult processConstantOp( SourceOp op, Operation* const_op, int input_index, const operator_property::TensorProperty& tensor_property, PatternRewriter& rewriter) const { // Non-float tensors are neither weights nor require quantization. auto type = mlir::dyn_cast<ShapedType>(const_op->getResult(0).getType()); if (!type || !mlir::isa<FloatType>(type.getElementType())) return success();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 03 18:01:23 UTC 2024 - 28K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/dilated_conv.h
squeeze_op, "result for current op has more than 1 use"); } // Make sure that the axis in `expand_op` is constant. if (auto const_op = llvm::dyn_cast<TF::ConstOp>(expand_op.getDim().getDefiningOp())) { expand_axis = (*mlir::cast<DenseElementsAttr>(const_op.getValue()) .getValues<APInt>() .begin()) .getSExtValue();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 20K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/replace_cast_hacks_with_tf_xla_ops.cc
ShapedType weight_type = mlir::cast<ShapedType>(weight.getType()); const int32_t input_rank = input_type.getRank(); const int32_t weight_rank = weight_type.getRank(); const int32_t broadcasted_rank = std::max(input_rank, weight_rank); const int32_t num_matmul_dim = 2; const int32_t num_input_batch_dim = input_rank - num_matmul_dim; const int32_t num_weight_batch_dim = weight_rank - num_matmul_dim;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 47.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_variable_runtime_reformatting.cc
for (const auto& arg : replicate.GetReplicatedBlockArguments()) { replicated_inputs.emplace_back(); for (int64_t i = 0; i < num_replicas; ++i) { replicated_inputs.back().push_back( replicate.GetReplicaOperandForBlockArgument(arg, i)); } new_replicated_inputs.emplace_back(replicated_inputs.back(), arg.getType()); } for (const auto& arg : replicate.GetPackedBlockArguments()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 21.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/legalization_op_config.cc
} bool IsTypeLegalizedWithMlir(const TypeID& type_id) { return MlirAlwaysOps().contains(type_id); } bool IsOpAllowedTf2xlaFallback(const TypeID& type_id) { return IsOpTypeAllowedTf2XlaFallback(type_id); } bool IsOpAllowedTf2xlaPreferred(const TypeID& type_id) { return IsOpTypeAllowedTf2XlaPreferred(type_id); } bool IsDynamicPadderOp(const TypeID& type_id) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 24 04:08:35 UTC 2024 - 21.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_validate_inputs.cc
return false; } if (!is_cluster_op) { if (!CheckNonClusterSuccessors(succ, op, metadata_map)) return false; } } return true; } bool TypeMustBeNonXLA(const Type& type) { const Type elem = getElementTypeOrSelf(type); return !mlir::isa<TF::ResourceType>(elem) && !tensorflow::TypeValidForXLA(type); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 07 06:51:01 UTC 2024 - 21.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/convert_control_to_data_outputs.cc
IslandOp GetDummyConstant(OpBuilder builder, ShapedType const_type, Location loc) { DenseIntElementsAttr val = DenseIntElementsAttr::get(const_type, 1); auto const_op = builder.create<TF::ConstOp>(loc, val); auto const_island = CreateIsland(const_op, {}, builder); return const_island; } // Rewrites the while op with extra chaining operands and results. Uses a
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 28.7K bytes - Viewed (0) -
tensorflow/c/c_api_experimental.cc
} void TF_AttrBuilderSetTypeList(TF_AttrBuilder* builder, const char* attr_name, const TF_DataType* values, int num_values) { auto iter = builder->attr_names.insert(attr_name).first; builder->Set(*iter, tensorflow::gtl::ArraySlice<const tensorflow::DataType>( reinterpret_cast<const tensorflow::DataType*>(values), num_values)); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Apr 15 03:35:10 UTC 2024 - 29.4K bytes - Viewed (0)