Home
last modified time | relevance | path

Searched refs:dense_attr (Results 1 – 10 of 10) sorted by relevance

/external/tensorflow/tensorflow/compiler/mlir/tensorflow/utils/
Dconvert_tensor.cc405 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/
Dconvert_tensor.cc404 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/
Dpython_test_attrs.cc99 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/
Dattr_util.cc55 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/
Dconvert_tf_quant_ops_to_mhlo.cc144 auto dense_attr = ElementsAttr(mlir::DenseElementsAttr::get( in matchAndRewrite() local
151 rhs_type, dense_attr); in matchAndRewrite()
/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/
Doptimize.cc405 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/
Druntime_fallback_kernels.cc341 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/
Dparse_example_dataset_op.cc320 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/
Dmlir_hlo_to_hlo.cc1788 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/
Dc_api_tfrt.cc1763 DenseAttr dense_attr(buffer.data() + offset); in SetAttrTensor() local
1764 if (attrs_.Set(attr_name, dense_attr)) return ::tensorflow::OkStatus(); in SetAttrTensor()