AI-TensorFlow-Libtensorflow

 view release on metacpan or  search on metacpan

lib/AI/TensorFlow/Libtensorflow/Manual/CAPI.pod  view on Meta::CPAN


=head1 NAME

AI::TensorFlow::Libtensorflow::Manual::CAPI - List of functions exported by TensorFlow C API

=head1 DESCRIPTION

The following a list of functions exported by the TensorFlow C API with their
associated documentation from the upstream TensorFlow project. It has been
converted to POD for easy reference.

=begin Pod::Coverage




=end Pod::Coverage

=head1 FUNCTIONS

=head2 TF_Version

=over 2

  TF_Version returns a string describing version information of the
  TensorFlow library. TensorFlow uses semantic versioning.

=back

  /* From <tensorflow/c/c_api.h> */
  TF_CAPI_EXPORT extern const char* TF_Version(void);

=head2 TF_TensorFromProto

=over 2

  Parsing a serialized TensorProto into a TF_Tensor.

=back

  /* From <tensorflow/c/c_api.h> */
  TF_CAPI_EXPORT extern void TF_TensorFromProto(const TF_Buffer* from,
                                                TF_Tensor* to, TF_Status* status);

=head2 TF_NewSessionOptions

=over 2

  Return a new options object.

=back

  /* From <tensorflow/c/c_api.h> */
  TF_CAPI_EXPORT extern TF_SessionOptions* TF_NewSessionOptions(void);

=head2 TF_SetTarget

=over 2

  Set the target in TF_SessionOptions.options.
  target can be empty, a single entry, or a comma separated list of entries.
  Each entry is in one of the following formats :
  "local"
  ip:port
  host:port

=back

  /* From <tensorflow/c/c_api.h> */
  TF_CAPI_EXPORT extern void TF_SetTarget(TF_SessionOptions* options,
                                          const char* target);

=head2 TF_SetConfig

=over 2

  Set the config in TF_SessionOptions.options.
  config should be a serialized tensorflow.ConfigProto proto.
  If config was not parsed successfully as a ConfigProto, record the
  error information in *status.

=back

  /* From <tensorflow/c/c_api.h> */
  TF_CAPI_EXPORT extern void TF_SetConfig(TF_SessionOptions* options,
                                          const void* proto, size_t proto_len,
                                          TF_Status* status);

=head2 TF_DeleteSessionOptions

=over 2

  Destroy an options object.

=back

  /* From <tensorflow/c/c_api.h> */
  TF_CAPI_EXPORT extern void TF_DeleteSessionOptions(TF_SessionOptions*);

=head2 TF_NewGraph

=over 2

  Return a new graph object.

=back

  /* From <tensorflow/c/c_api.h> */
  TF_CAPI_EXPORT extern TF_Graph* TF_NewGraph(void);

=head2 TF_DeleteGraph

=over 2

  Destroy an options object. Graph will be deleted once no more
  TFSession's are referencing it.

=back

  /* From <tensorflow/c/c_api.h> */
  TF_CAPI_EXPORT extern void TF_DeleteGraph(TF_Graph*);

lib/AI/TensorFlow/Libtensorflow/Manual/CAPI.pod  view on Meta::CPAN

  /* From <tensorflow/c/eager/c_api_experimental.h> */
  TF_CAPI_EXPORT void TFE_ContextSetRunEagerOpAsFunction(TFE_Context* ctx,
                                                         unsigned char enable,
                                                         TF_Status* status);

=head2 TFE_ContextSetJitCompileRewrite

=over 2

  Enables rewrite jit_compile functions.

=back

  /* From <tensorflow/c/eager/c_api_experimental.h> */
  TF_CAPI_EXPORT void TFE_ContextSetJitCompileRewrite(TFE_Context* ctx,
                                                      unsigned char enable,
                                                      TF_Status* status);

=head2 TFE_TensorHandleDeviceType

=over 2

  Returns the device type of the operation that produced `h`.

=back

  /* From <tensorflow/c/eager/c_api_experimental.h> */
  TF_CAPI_EXPORT extern const char* TFE_TensorHandleDeviceType(
      TFE_TensorHandle* h, TF_Status* status);

=head2 TFE_TensorHandleDeviceID

=over 2

  Returns the device ID of the operation that produced `h`.

=back

  /* From <tensorflow/c/eager/c_api_experimental.h> */
  TF_CAPI_EXPORT extern int TFE_TensorHandleDeviceID(TFE_TensorHandle* h,
                                                     TF_Status* status);

=head2 TFE_TensorHandleGetStatus

=over 2

  Returns the status for the tensor handle. In TFRT, a tensor handle can carry
  error info if error happens. If so, the status will be set with the error
  info. If not, status will be set as OK.

=back

  /* From <tensorflow/c/eager/c_api_experimental.h> */
  TF_CAPI_EXPORT extern void TFE_TensorHandleGetStatus(TFE_TensorHandle* h,
                                                       TF_Status* status);

=head2 TFE_GetExecutedOpNames

=over 2

  Get a comma-separated list of op names executed in graph functions dispatched
  to `ctx`. This feature is currently only enabled for TFRT debug builds, for
  performance and simplicity reasons.

=back

  /* From <tensorflow/c/eager/c_api_experimental.h> */
  TF_CAPI_EXPORT extern void TFE_GetExecutedOpNames(TFE_Context* ctx,
                                                    TF_Buffer* buf,
                                                    TF_Status* status);

=head2 TFE_SetLogicalCpuDevices

=over 2

  Set logical devices to the context's device manager.
  If logical devices are already configured at context initialization
  through TFE_ContextOptions, this method should not be called.

=back

  /* From <tensorflow/c/eager/c_api_experimental.h> */
  TF_CAPI_EXPORT extern void TFE_SetLogicalCpuDevices(TFE_Context* ctx,
                                                      int num_cpus,
                                                      const char* prefix,
                                                      TF_Status* status);

=head2 TFE_InsertConfigKeyValue

=over 2

  Set configuration key and value using coordination service.
  If coordination service is enabled, the key-value will be stored on the
  leader and become accessible to all workers in the cluster.
  Currently, a config key can only be set with one value, and subsequently
  setting the same key will lead to errors.
  
  Note that the key-values are only expected to be used for cluster
  configuration data, and should not be used for storing a large amount of data
  or being accessed very frequently.

=back

  /* From <tensorflow/c/eager/c_api_experimental.h> */
  TF_CAPI_EXPORT extern void TFE_InsertConfigKeyValue(TFE_Context* ctx,
                                                      const char* key,
                                                      const char* value,
                                                      TF_Status* status);

=head2 TFE_GetConfigKeyValue

=over 2

  Get configuration key and value using coordination service.
  The config key must be set before getting its value. Getting value of
  non-existing config keys will result in errors.

=back

  /* From <tensorflow/c/eager/c_api_experimental.h> */
  TF_CAPI_EXPORT extern void TFE_GetConfigKeyValue(TFE_Context* ctx,



( run in 1.194 second using v1.01-cache-2.11-cpan-2e0ccfb7a10 )