AI-TensorFlow-Libtensorflow
view release on metacpan or search on metacpan
lib/AI/TensorFlow/Libtensorflow/Manual/CAPI.pod view on Meta::CPAN
TF_ConcreteFunctionList* list);
=head2 TF_SignatureDefParamListSize
=over 2
Returns the size of `list`.
=back
/* From <tensorflow/c/experimental/saved_model/public/signature_def_param_list.h> */
TF_CAPI_EXPORT extern size_t TF_SignatureDefParamListSize(
const TF_SignatureDefParamList* list);
=head2 TF_SignatureDefParamListGet
=over 2
Returns the `i`th TF_SignatureDefParam in the list.
=back
/* From <tensorflow/c/experimental/saved_model/public/signature_def_param_list.h> */
TF_CAPI_EXPORT extern const TF_SignatureDefParam* TF_SignatureDefParamListGet(
const TF_SignatureDefParamList* list, int i);
=head2 TF_SignatureDefFunctionMetadataArgs
=over 2
Retrieves the arguments of the SignatureDefFunction. The caller is not
responsible for freeing the returned pointer.
=back
/* From <tensorflow/c/experimental/saved_model/public/signature_def_function_metadata.h> */
TF_CAPI_EXPORT extern const TF_SignatureDefParamList*
TF_SignatureDefFunctionMetadataArgs(
const TF_SignatureDefFunctionMetadata* list);
=head2 TF_SignatureDefFunctionMetadataReturns
=over 2
Retrieves the returns of the SignatureDefFunction. The caller is not
responsible for freeing the returned pointer.
=back
/* From <tensorflow/c/experimental/saved_model/public/signature_def_function_metadata.h> */
TF_CAPI_EXPORT extern const TF_SignatureDefParamList*
TF_SignatureDefFunctionMetadataReturns(
const TF_SignatureDefFunctionMetadata* list);
=head2 TF_EnableXLACompilation
=over 2
When `enable` is true, set
tensorflow.ConfigProto.OptimizerOptions.global_jit_level to ON_1, and also
set XLA flag values to prepare for XLA compilation. Otherwise set
global_jit_level to OFF.
This and the next API are syntax sugar over TF_SetConfig(), and is used by
clients that cannot read/write the tensorflow.ConfigProto proto.
TODO: Migrate to TF_CreateConfig() below.
=back
/* From <tensorflow/c/c_api_experimental.h> */
TF_CAPI_EXPORT extern void TF_EnableXLACompilation(TF_SessionOptions* options,
unsigned char enable);
=head2 TF_SetXlaEnableLazyCompilation
=over 2
Set XLA's internal BuildXlaOpsPassFlags.tf_xla_enable_lazy_compilation to the
value of 'enabled'. Also returns the original value of that flag.
Use in tests to allow XLA to fallback to TF classic. This has global effect.
=back
/* From <tensorflow/c/c_api_experimental.h> */
TF_CAPI_EXPORT unsigned char TF_SetXlaEnableLazyCompilation(
unsigned char enable);
=head2 TF_SetTfXlaCpuGlobalJit
=over 2
=back
/* From <tensorflow/c/c_api_experimental.h> */
TF_CAPI_EXPORT unsigned char TF_SetTfXlaCpuGlobalJit(unsigned char enable);
=head2 TF_SetXlaAutoJitMode
=over 2
Sets XLA's auto jit mode according to the specified string, which is parsed
as if passed in XLA_FLAGS. This has global effect.
=back
/* From <tensorflow/c/c_api_experimental.h> */
TF_CAPI_EXPORT void TF_SetXlaAutoJitMode(const char* mode);
=head2 TF_GetXlaAutoJitEnabled
=over 2
Returns whether the single GPU or general XLA auto jit optimizations are
enabled through MarkForCompilationPassFlags.
=back
/* From <tensorflow/c/c_api_experimental.h> */
TF_CAPI_EXPORT unsigned char TF_GetXlaAutoJitEnabled();
=head2 TF_SetXlaMinClusterSize
=over 2
Sets XLA's minimum cluster size. This has global effect.
=back
/* From <tensorflow/c/c_api_experimental.h> */
TF_CAPI_EXPORT void TF_SetXlaMinClusterSize(int size);
=head2 TF_GetXlaConstantFoldingDisabled
=over 2
Gets/Sets TF/XLA flag for whether(true) or not(false) to disable constant
folding. This is for testing to ensure that XLA is being tested rather than
Tensorflow's CPU implementation through constant folding.
=back
/* From <tensorflow/c/c_api_experimental.h> */
TF_CAPI_EXPORT unsigned char TF_GetXlaConstantFoldingDisabled();
=head2 TF_SetXlaConstantFoldingDisabled
=over 2
=back
/* From <tensorflow/c/c_api_experimental.h> */
TF_CAPI_EXPORT void TF_SetXlaConstantFoldingDisabled(
unsigned char should_enable);
=head2 TF_CreateConfig
=over 2
Create a serialized tensorflow.ConfigProto proto, where:
a) ConfigProto.optimizer_options.global_jit_level is set to ON_1 if
`enable_xla_compilation` is non-zero, and OFF otherwise.
b) ConfigProto.gpu_options.allow_growth is set to `gpu_memory_allow_growth`.
c) ConfigProto.device_count is set to `num_cpu_devices`.
=back
/* From <tensorflow/c/c_api_experimental.h> */
TF_CAPI_EXPORT extern TF_Buffer* TF_CreateConfig(
unsigned char enable_xla_compilation, unsigned char gpu_memory_allow_growth,
unsigned int num_cpu_devices);
=head2 TF_CreateRunOptions
=over 2
Create a serialized tensorflow.RunOptions proto, where RunOptions.trace_level
is set to FULL_TRACE if `enable_full_trace` is non-zero, and NO_TRACE
otherwise.
=back
/* From <tensorflow/c/c_api_experimental.h> */
TF_CAPI_EXPORT extern TF_Buffer* TF_CreateRunOptions(
unsigned char enable_full_trace);
=head2 TF_GraphDebugString
=over 2
Returns the graph content in a human-readable format, with length set in
`len`. The format is subject to change in the future.
The returned string is heap-allocated, and caller should call free() on it.
=back
( run in 1.801 second using v1.01-cache-2.11-cpan-98e64b0badf )