GetProducer

Applicability

Product

Supported or Not

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Header File/Library File

  • Header file: #include <ge/es_tensor_holder.h>
  • Library files: libeager_style_graph_builder_base.so and libeager_style_graph_builder_base_static.a

Function Usage

Obtains the graph node that generates the tensor.

Prototype

1
GNode *GetProducer() const

Parameters

None

Returns

Parameter

Type

Description

-

GNode *

Pointer to the graph node.

Constraints

None

Examples

1
2
3
  auto builder = std::make_unique<ge::EsGraphBuilder>("graph");  
  auto tensor0 = builder->CreateInput(0);
  GNode *data0 = tensor0.GetProducer(); // Obtain node data0 of output tensor0.