/external/tensorflow/tensorflow/compiler/mlir/tensorflow/utils/ |
D | convert_tensor.cc | 405 auto dense_attr = attr.dyn_cast<mlir::DenseElementsAttr>(); in ConvertToTensorProto() local 406 if (!dense_attr) return errors::InvalidArgument("Unsupported elements attr"); in ConvertToTensorProto() 410 ConvertElementsAttr(dense_attr, output->mutable_bool_val()); in ConvertToTensorProto() 413 ConvertBfloat16ElementsAttr(dense_attr, output->mutable_half_val()); in ConvertToTensorProto() 416 ConvertComplexElementsAttr(dense_attr, output->mutable_scomplex_val()); in ConvertToTensorProto() 419 ConvertComplexElementsAttr(dense_attr, output->mutable_dcomplex_val()); in ConvertToTensorProto() 422 ConvertFloatElementsAttr(dense_attr, output->mutable_double_val(), in ConvertToTensorProto() 426 ConvertHalfElementsAttr(dense_attr, output->mutable_half_val()); in ConvertToTensorProto() 429 ConvertFloatElementsAttr(dense_attr, output->mutable_float_val(), in ConvertToTensorProto() 434 ConvertUIntElementsAttr<int, int8_t>(dense_attr, in ConvertToTensorProto() [all …]
|
/external/tensorflow/tensorflow/core/ir/importexport/ |
D | convert_tensor.cc | 404 auto dense_attr = attr.dyn_cast<DenseElementsAttr>(); in ConvertToTensorProto() local 405 if (!dense_attr) return InvalidArgument("Unsupported elements attr"); in ConvertToTensorProto() 409 ConvertElementsAttr(dense_attr, output->mutable_bool_val()); in ConvertToTensorProto() 412 ConvertBfloat16ElementsAttr(dense_attr, output->mutable_half_val()); in ConvertToTensorProto() 415 ConvertComplexElementsAttr(dense_attr, output->mutable_scomplex_val()); in ConvertToTensorProto() 418 ConvertComplexElementsAttr(dense_attr, output->mutable_dcomplex_val()); in ConvertToTensorProto() 421 ConvertFloatElementsAttr(dense_attr, output->mutable_double_val(), in ConvertToTensorProto() 425 ConvertHalfElementsAttr(dense_attr, output->mutable_half_val()); in ConvertToTensorProto() 428 ConvertFloatElementsAttr(dense_attr, output->mutable_float_val(), in ConvertToTensorProto() 433 ConvertUIntElementsAttr<int, int8_t>(dense_attr, in ConvertToTensorProto() [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/tfrt/python_tests/ |
D | python_test_attrs.cc | 99 auto dense_attr = attribute.getValue().dyn_cast<DenseIntElementsAttr>(); in verifyRegionArgAttribute() local 100 if (!dense_attr) { in verifyRegionArgAttribute() 106 if (dense_attr.getType() != arg_type) { in verifyRegionArgAttribute() 114 for (auto&& dim : dense_attr) { in verifyRegionArgAttribute()
|
/external/tensorflow/tensorflow/core/runtime_fallback/util/ |
D | attr_util.cc | 55 const DenseAttr& dense_attr, HostContext* host) { in DecodeDenseAttrToTfTensor() argument 57 tfrt::DeserializeDenseHostTensorFromDenseAttr(dense_attr, host); in DecodeDenseAttrToTfTensor() 242 auto dense_attr = attrs.GetAsserting<tfrt::DenseAttr>(entry.name); in FillAttrValueMapUsingScalar() local 244 DecodeDenseAttrToTfTensor(dense_attr, host); in FillAttrValueMapUsingScalar() 556 } else if (auto dense_attr = bef_attr.dyn_cast<tfrt::DenseAttr>()) { in SetUpScalarAttr() local 557 auto tf_tensor = CreateTfTensorFromDenseAttr(dense_attr); in SetUpScalarAttr() 595 void AddTensorToAttrList(tfrt::DenseAttr dense_attr, in AddTensorToAttrList() argument 597 auto tf_tensor = CreateTfTensorFromDenseAttr(dense_attr); in AddTensorToAttrList() 608 } else if (auto dense_attr = base.dyn_cast<tfrt::DenseAttr>()) { in SetUpListAttr() local 609 AddTensorToAttrList(dense_attr, list); in SetUpListAttr()
|
/external/tensorflow/tensorflow/compiler/mlir/quantization/tensorflow/passes/ |
D | convert_tf_quant_ops_to_mhlo.cc | 144 auto dense_attr = ElementsAttr(mlir::DenseElementsAttr::get( in matchAndRewrite() local 151 rhs_type, dense_attr); in matchAndRewrite()
|
/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/ |
D | optimize.cc | 405 const auto dense_attr = attr.dyn_cast_or_null<DenseElementsAttr>(); in GetNumElementsOrOne() local 406 int32_t num_elements = dense_attr ? dense_attr.getNumElements() : 1; in GetNumElementsOrOne() 473 const auto dense_attr = attr.dyn_cast_or_null<DenseIntElementsAttr>(); in IsOneHotIndexAttribute() local 474 if (!dense_attr) { in IsOneHotIndexAttribute() 477 auto index_type = dense_attr.getType(); in IsOneHotIndexAttribute() 485 const auto elems = dense_attr.value_begin<APInt>(); in IsOneHotIndexAttribute() 486 for (int i = 0; i < dense_attr.getNumElements(); ++i) { in IsOneHotIndexAttribute()
|
/external/tensorflow/tensorflow/core/runtime_fallback/runtime/ |
D | runtime_fallback_kernels.cc | 341 const DenseAttr& dense_attr, HostContext* host, in DecodeDenseAttrToTensorInterface() argument 344 tfrt::DeserializeDenseHostTensorFromDenseAttr(dense_attr, host); in DecodeDenseAttrToTensorInterface() 460 DenseAttr dense_attr = attrs.GetAsserting<DenseAttr>(entry.name); in PrepareAttributes() local 463 DecodeDenseAttrToTensorInterface(dense_attr, host, &interface); in PrepareAttributes()
|
/external/tensorflow/tensorflow/core/kernels/data/experimental/ |
D | parse_example_dataset_op.cc | 320 AttrValue dense_attr; in AsGraphDefInternal() local 321 b->BuildAttrValue(dense_types_, &dense_attr); in AsGraphDefInternal() 322 attrs.emplace_back("Tdense", dense_attr); in AsGraphDefInternal()
|
/external/tensorflow/tensorflow/compiler/mlir/xla/ |
D | mlir_hlo_to_hlo.cc | 1788 auto dense_attr = attr.dyn_cast<DenseElementsAttr>(); in CreateArrayLiteralFromAttr() local 1789 if (!dense_attr) in CreateArrayLiteralFromAttr() 1793 xla::Shape shape = xla::TypeToShape(dense_attr.getType()); in CreateArrayLiteralFromAttr() 1798 source_data.SetValues(dense_attr.getValues<cpp_type>()); \ in CreateArrayLiteralFromAttr()
|
/external/tensorflow/tensorflow/core/tfrt/eager/ |
D | c_api_tfrt.cc | 1763 DenseAttr dense_attr(buffer.data() + offset); in SetAttrTensor() local 1764 if (attrs_.Set(attr_name, dense_attr)) return ::tensorflow::OkStatus(); in SetAttrTensor()
|