/external/tensorflow/tensorflow/compiler/mlir/quantization/tensorflow/passes/ |
D | utils.h | 71 auto value_attr = DenseFPElementsAttr::get(type, values); in CreateConstValue() local 72 return builder.create<TF::ConstOp>(loc, value_attr); in CreateConstValue() 94 DenseIntElementsAttr value_attr; in GetSplatValue() local 95 if (!matchPattern(value, m_Constant(&value_attr)) || in GetSplatValue() 96 !value_attr.isSplat()) { in GetSplatValue() 99 splat_value = value_attr.getSplatValue<T>(); in GetSplatValue() 103 DenseFPElementsAttr value_attr; in GetSplatValue() local 104 if (!matchPattern(value, m_Constant(&value_attr)) || !value_attr.isSplat()) { in GetSplatValue() 107 splat_value = value_attr.getSplatValue<T>(); in GetSplatValue()
|
/external/tensorflow/tensorflow/lite/toco/tensorflow_graph_matching/ |
D | resolve_svdf.cc | 64 const auto& value_attr = node->attr().at("value"); in FilterPartitionedConstNodes() local 65 const tensorflow::TensorProto& tensor = value_attr.tensor(); in FilterPartitionedConstNodes() 84 const auto& value_attr = node->attr().at("value"); in InferFilterRank() local 85 const tensorflow::TensorProto& tensor = value_attr.tensor(); in InferFilterRank() 191 const auto& value_attr = const_node_parts[i]->attr().at("value"); in MaybeMergeConstNodes() local 192 const tensorflow::TensorProto& tensor = value_attr.tensor(); in MaybeMergeConstNodes() 219 const auto& value_attr = const_node_parts[i]->attr().at("value"); in MaybeMergeConstNodes() local 220 const tensorflow::TensorProto& tensor = value_attr.tensor(); in MaybeMergeConstNodes()
|
/external/tensorflow/tensorflow/lite/toco/ |
D | import_tensorflow_test.cc | 172 AttrValue value_attr; in BuildConstNode() local 173 SetAttrValue(t, &value_attr); in BuildConstNode() 174 (*node->mutable_attr())["value"] = value_attr; in BuildConstNode() 514 AttrValue value_attr; in NodeWithTensorContent() local 515 SetAttrValue(t, &value_attr); in NodeWithTensorContent() 516 (*node->mutable_attr())["value"] = value_attr; in NodeWithTensorContent() 680 AttrValue value_attr; in TEST() local 681 SetAttrValue(2, &value_attr); in TEST() 682 (*node.mutable_attr())["Nsparse"] = value_attr; in TEST() 688 AttrValue value_attr; in TEST() local [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/tfrt/transforms/ |
D | tf_to_tfrt_data.cc | 55 T ConstAttrToTypeAttr(ElementsAttr value_attr) { in ConstAttrToTypeAttr() argument 56 if (T type_attr = value_attr.dyn_cast<T>()) { in ConstAttrToTypeAttr() 58 } else if (auto v = value_attr.dyn_cast<SplatElementsAttr>()) { in ConstAttrToTypeAttr()
|
/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/ |
D | prepare_quantize_dynamic_range.cc | 366 DenseFPElementsAttr value_attr = in convertToFloat16Constant() local 368 new_values.reserve(value_attr.getNumElements()); in convertToFloat16Constant() 373 for (auto value : value_attr.template getValues<float>()) { in convertToFloat16Constant()
|
/external/tensorflow/tensorflow/core/grappler/optimizers/ |
D | generic_layout_optimizer_transposer.cc | 607 const auto* value_attr = fanin_node_view->GetAttr(kAttrValue); in IsFaninPortDimsNIfConst() local 608 if (value_attr == nullptr) { in IsFaninPortDimsNIfConst() 612 if (!tensor.FromProto(value_attr->tensor())) { in IsFaninPortDimsNIfConst() 1509 const auto* value_attr = axis_node->GetAttr(kAttrValue); in IsReduceAxisSupported() local 1510 if (value_attr == nullptr) { in IsReduceAxisSupported() 1514 if (!tensor.FromProto(value_attr->tensor())) { in IsReduceAxisSupported() 2163 const auto* value_attr = regular_fanin_node->GetAttr(kAttrValue); in GetValueAttrFromConstInputNode() local 2164 if (value_attr == nullptr || value_attr->tensor().dtype() != DT_INT32) { in GetValueAttrFromConstInputNode() 2167 if (!tensor->FromProto(value_attr->tensor())) { in GetValueAttrFromConstInputNode()
|
D | generic_layout_optimizer_transposer_test.cc | 530 const auto* value_attr = const_perm_node->GetAttr("value"); in TEST_F() local 531 ASSERT_NE(value_attr, nullptr); in TEST_F() 534 ASSERT_TRUE(tensor.FromProto(value_attr->tensor())); in TEST_F()
|
/external/tensorflow/tensorflow/core/ir/ |
D | ops.cc | 182 if (StringAttr value_attr = op->getAttrOfType<StringAttr>(keyword)) { local 183 assert(!value_attr.getValue().empty()); 185 << value_attr.getValue() << "\")"; 370 if (StringAttr value_attr = op.getAttrOfType<StringAttr>(keyword)) { in VerifyGenericTFGOperation() local 371 if (value_attr.getValue().empty()) { in VerifyGenericTFGOperation()
|
/external/tensorflow/tensorflow/core/transforms/constant_folding/ |
D | pass.cc | 81 ElementsAttr value_attr) { in CreateElementsAttrOfTypeValues() argument 86 tensor_shape, llvm::to_vector(value_attr.getValues<APInt>())); in CreateElementsAttrOfTypeValues() 89 tensor_shape, llvm::to_vector(value_attr.getValues<APFloat>())); in CreateElementsAttrOfTypeValues() 264 Attribute value_attr; in ReplaceOperationWithConstant() local 266 value_attr = builder.getIntegerAttr(dtype, constant_value); in ReplaceOperationWithConstant() 268 value_attr = builder.getFloatAttr(dtype, constant_value); in ReplaceOperationWithConstant() 271 RankedTensorType::get(res.getShape(), dtype), value_attr); in ReplaceOperationWithConstant() 3374 ElementsAttr value_attr = in matchAndRewrite() local 3376 if (!value_attr) return failure(); in matchAndRewrite() 3378 int output_idx = value_attr.getSplatValue<int>(); in matchAndRewrite()
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/utils/ |
D | compile_mlir_util.cc | 739 TF_ASSIGN_OR_RETURN(auto value_attr, in RewriteWithArgs() 743 mlir::UnknownLoc::get(module_op.getContext()), value_attr); in RewriteWithArgs()
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/ir/ |
D | tf_ops_n_z.cc | 275 auto value_attr = const_op.value().dyn_cast<DenseIntElementsAttr>(); in fold() local 276 if (!value_attr || value_attr.getNumElements() != 1) return None; in fold() 278 auto value_ty = value_attr.getType(); in fold() 281 auto splat = value_attr.getSplatValue<IntegerAttr>(); in fold()
|
/external/tensorflow/tensorflow/python/ |
D | tfe_wrapper.cc | 146 tensorflow::Safe_PyObjectPtr value_attr( in InputTFE_InputTensorHandles() local 148 if (value_attr) { in InputTFE_InputTensorHandles() 150 (input_tensor_handles)[i] = EagerTensor_Handle(value_attr.get()); in InputTFE_InputTensorHandles()
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/translate/ |
D | import_model.cc | 3462 TF_ASSIGN_OR_RETURN(auto value_attr, ConvertTensor(value, &builder)); in CreateSavedModelIR() 3471 value_attr, in CreateSavedModelIR() 3486 TF_ASSIGN_OR_RETURN(auto value_attr, in CreateSavedModelIR() 3491 value_attr, in CreateSavedModelIR() 3492 /*type=*/mlir::TypeAttr::get(value_attr.getType()), in CreateSavedModelIR()
|