AI-TensorFlow-Libtensorflow
view release on metacpan or search on metacpan
lib/AI/TensorFlow/Libtensorflow/Manual/CAPI.pod view on Meta::CPAN
=over 2
=back
/* From <tensorflow/c/eager/c_api_experimental.h> */
TF_CAPI_EXPORT extern bool TFE_CancellationManagerIsCancelled(
TFE_CancellationManager*);
=head2 TFE_CancellationManagerStartCancel
=over 2
=back
/* From <tensorflow/c/eager/c_api_experimental.h> */
TF_CAPI_EXPORT extern void TFE_CancellationManagerStartCancel(
TFE_CancellationManager*);
=head2 TFE_DeleteCancellationManager
=over 2
=back
/* From <tensorflow/c/eager/c_api_experimental.h> */
TF_CAPI_EXPORT extern void TFE_DeleteCancellationManager(
TFE_CancellationManager*);
=head2 TFE_OpSetCancellationManager
=over 2
=back
/* From <tensorflow/c/eager/c_api_experimental.h> */
TF_CAPI_EXPORT extern void TFE_OpSetCancellationManager(
TFE_Op* op, TFE_CancellationManager* cancellation_manager,
TF_Status* status);
=head2 TFE_NewExecutor
=over 2
Creates a new eager Executor. Nodes in one executor are guaranteed to be
executed in sequence. Assigning nodes to different executors allows executing
nodes in parallel.
in_flight_nodes_limit: when is_async is true, this value controls the
maximum number of in flight async nodes. Enqueuing of additional async ops
after the limit is reached blocks until some inflight nodes finishes.
The effect is bounding the memory held by inflight TensorHandles that are
referenced by the inflight nodes.
A recommended value has not been established.
A value of 0 removes the limit, which is the behavior of TensorFlow 2.11.
When is_async is false, the value is ignored.
=back
/* From <tensorflow/c/eager/c_api_experimental.h> */
TF_CAPI_EXPORT extern TFE_Executor* TFE_NewExecutor(
bool is_async, bool enable_streaming_enqueue, int in_flight_nodes_limit);
=head2 TFE_DeleteExecutor
=over 2
Deletes the eager Executor without waiting for enqueued nodes. Please call
TFE_ExecutorWaitForAllPendingNodes before calling this API if you want to
make sure all nodes are finished.
=back
/* From <tensorflow/c/eager/c_api_experimental.h> */
TF_CAPI_EXPORT extern void TFE_DeleteExecutor(TFE_Executor*);
=head2 TFE_ExecutorIsAsync
=over 2
Returns true if the executor is in async mode.
=back
/* From <tensorflow/c/eager/c_api_experimental.h> */
TF_CAPI_EXPORT extern bool TFE_ExecutorIsAsync(TFE_Executor*);
=head2 TFE_ExecutorWaitForAllPendingNodes
=over 2
Causes the calling thread to block till all ops dispatched in this executor
have been executed. Note that "execution" here refers to kernel execution /
scheduling of copies, etc. Similar to sync execution, it doesn't guarantee
that lower level device queues (like GPU streams) have been flushed.
This call may not block for execution of ops enqueued concurrently with this
call.
=back
/* From <tensorflow/c/eager/c_api_experimental.h> */
TF_CAPI_EXPORT extern void TFE_ExecutorWaitForAllPendingNodes(
TFE_Executor*, TF_Status* status);
=head2 TFE_ExecutorClearError
=over 2
When an error happens, any pending operations are discarded, and newly issued
ops return an error. This call clears the error state and re-enables
execution of newly issued ops.
Note that outputs of discarded ops remain in a corrupt state and should not
be used for future calls.
TODO(agarwal): mark the affected handles and raise errors if they are used.
=back
/* From <tensorflow/c/eager/c_api_experimental.h> */
TF_CAPI_EXPORT extern void TFE_ExecutorClearError(TFE_Executor*);
lib/AI/TensorFlow/Libtensorflow/Manual/CAPI.pod view on Meta::CPAN
Sets a custom Executor for the current thread. All nodes created by this
thread will be added to this Executor. It will override the current executor.
=back
/* From <tensorflow/c/eager/c_api_experimental.h> */
TF_CAPI_EXPORT extern void TFE_ContextSetExecutorForThread(TFE_Context*,
TFE_Executor*);
=head2 TFE_ContextGetExecutorForThread
=over 2
Returns the Executor for the current thread.
=back
/* From <tensorflow/c/eager/c_api_experimental.h> */
TF_CAPI_EXPORT extern TFE_Executor* TFE_ContextGetExecutorForThread(
TFE_Context*);
=head2 TFE_ContextUpdateServerDef
=over 2
Update an existing context with a new set of servers defined in a ServerDef
proto. Servers can be added to and removed from the list of remote workers
in the context. A New set of servers identified by the ServerDef must be up
when the context is updated.
This API is for experimental usage and may be subject to change.
=back
/* From <tensorflow/c/eager/c_api_experimental.h> */
TF_CAPI_EXPORT extern void TFE_ContextUpdateServerDef(TFE_Context* ctx,
int keep_alive_secs,
const void* proto,
size_t proto_len,
TF_Status* status);
=head2 TFE_ContextCheckAlive
=over 2
Checks whether a remote worker is alive or not. This will return true even if
the context doesn't exist on the remote worker.
=back
/* From <tensorflow/c/eager/c_api_experimental.h> */
TF_CAPI_EXPORT extern bool TFE_ContextCheckAlive(TFE_Context* ctx,
const char* worker_name,
TF_Status* status);
=head2 TFE_ContextAsyncWait
=over 2
Sync pending nodes in local executors (including the context default executor
and thread executors) and streaming requests to remote executors, and get the
combined status.
=back
/* From <tensorflow/c/eager/c_api_experimental.h> */
TF_CAPI_EXPORT extern void TFE_ContextAsyncWait(TFE_Context* ctx,
TF_Status* status);
=head2 TFE_TensorHandleDevicePointer
=over 2
This function will block till the operation that produces `h` has
completed. This is only valid on local TFE_TensorHandles. The pointer
returned will be on the device in which the TFE_TensorHandle resides (so e.g.
for a GPU tensor this will return a pointer to GPU memory). The pointer is
only guaranteed to be valid until TFE_DeleteTensorHandle is called on this
TensorHandle. Only supports POD data types.
=back
/* From <tensorflow/c/eager/c_api_experimental.h> */
TF_CAPI_EXPORT extern void* TFE_TensorHandleDevicePointer(TFE_TensorHandle*,
TF_Status*);
=head2 TFE_TensorHandleDeviceMemorySize
=over 2
This function will block till the operation that produces `h` has
completed. This is only valid on local TFE_TensorHandles. Returns the size in
bytes of the memory pointed to by the device pointer returned above.
=back
/* From <tensorflow/c/eager/c_api_experimental.h> */
TF_CAPI_EXPORT extern size_t TFE_TensorHandleDeviceMemorySize(TFE_TensorHandle*,
TF_Status*);
=head2 TFE_NewTensorHandleFromDeviceMemory
=over 2
Creates a new TensorHandle from memory residing in the physical device
device_name. Takes ownership of the memory, and will call deleter to release
it after TF no longer needs it or in case of error.
Custom devices must use TFE_NewCustomDeviceTensorHandle instead.
=back
/* From <tensorflow/c/eager/c_api_experimental.h> */
TF_CAPI_EXPORT extern TFE_TensorHandle* TFE_NewTensorHandleFromDeviceMemory(
TFE_Context* ctx, const char* device_name, TF_DataType, const int64_t* dims,
int num_dims, void* data, size_t len,
void (*deallocator)(void* data, size_t len, void* arg),
void* deallocator_arg, TF_Status* status);
=head2 TFE_HostAddressSpace
( run in 0.343 second using v1.01-cache-2.11-cpan-a5abf4f5562 )