tf_1.8_xla_doc
|
Namespaces | |
tfcompile | |
Namespace of tfcompile. | |
Classes | |
class | XlaCompiler |
class | XlaOpRegistry |
Functions | |
Status | ConvertGraphDefToXla (const GraphDef &graph_def, const tf2xla::Config &config, xla::Client *client, xla::Computation *computation) |
Convert tensorflow graph_def to XLA UserComputation. More... | |
Status | ValidateConfig (const tf2xla::Config &config) |
Status | AddPlaceholdersForFeeds (const tf2xla::Config &config, const OpRegistryInterface *op_registry, std::unordered_map< string, string > *feed_remapping, GraphDef *graph_def) |
Generate corresponding placeholder for each feed tensor. Traverse each inputs of each nodes. Replace feeds to corresponding placeholders. More... | |
Status | PruneGraphDefInto (const tf2xla::Config &config, const GraphDef &in, GraphDef *out) |
Remove source nodes of feed tensor. Because they are removed at tensorflow::AddPlaceholdersForFeeds More... | |
Status | AddDefaultAttrsToGraphDef (GraphDef *graph_def, const OpRegistryInterface &op_registry, int node_offset) |
Assign each NodeDefs of GraphDef default values. More... | |
Status | ConvertGraphDefToGraph (const GraphConstructorOptions &opts, const GraphDef &gdef, Graph *g) |
Convert GraphDef defined protobuf to type Graph More... | |
Namespace of tensorflow
namespace of tensorflow
Status tensorflow::AddDefaultAttrsToGraphDef | ( | GraphDef * | graph_def, |
const OpRegistryInterface & | op_registry, | ||
int | node_offset | ||
) |
Assign each NodeDefs
of GraphDef
default values.
Google Docs:
Adds default attributes to NodeDefs in 'graph_def' starting from the 'node_offset' node in 'graph_def'.
Default attributes are defined by 'op_registry'.
Returns OK on success, an error if 'graph_def' has a NodeDef that cannot be found in 'op_registry'.
REQUIRES: 'graph_def' and 'op_registry' are not nullptr.
Status tensorflow::AddPlaceholdersForFeeds | ( | const tf2xla::Config & | config, |
const OpRegistryInterface * | op_registry, | ||
std::unordered_map< string, string > * | feed_remapping, | ||
GraphDef * | graph_def | ||
) |
Generate corresponding placeholder for each feed tensor. Traverse each inputs of each nodes. Replace feeds to corresponding placeholders.
Modifies <graph_def> to include placeholders for each fed tensor, and update references to the fed tensors to refer to the placeholders. The existing nodes referenced by the feeds are not removed or modified (except where their input edges are modified by the replacement of other feeds).
Status tensorflow::ConvertGraphDefToGraph | ( | const GraphConstructorOptions & | opts, |
const GraphDef & | gdef, | ||
Graph * | g | ||
) |
Convert GraphDef
defined protobuf to type Graph
As brief
Status tensorflow::ConvertGraphDefToXla | ( | const GraphDef & | graph_def, |
const tf2xla::Config & | config, | ||
xla::Client * | client, | ||
xla::Computation * | computation | ||
) |
Convert tensorflow graph_def to XLA UserComputation.
tensorflow::anonymous_namespace{tf2xla.cc}::InitGraph
tensorflow::anonymous_namespace{tf2xla.cc}::ConvertGraphToXla
Status tensorflow::PruneGraphDefInto | ( | const tf2xla::Config & | config, |
const GraphDef & | in, | ||
GraphDef * | out | ||
) |
Remove source nodes of feed tensor. Because they are removed at tensorflow::AddPlaceholdersForFeeds
Returns in <out> a copy of <in>, pruned to only include fetches from <config>.
Status tensorflow::ValidateConfig | ( | const tf2xla::Config & | config | ) |
Check settings of input config(feed & fetch). For example, if id
, shape
are legal, duplicated names...