diff options
author | James Keeling <jtkeeling@google.com> | 2018-07-23 07:56:46 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-23 08:00:32 -0700 |
commit | 8647db865ce41361413a2eb4c3b4d0ba404dd4e0 (patch) | |
tree | 97eafd2fd44fa322dc5b91bd676c324059612be8 /tensorflow/c/c_api.h | |
parent | 7aef462279657517377e0da15b90b3f3f5be16e1 (diff) |
Add C API for kernel info
This is part of the work to make available kernels possible to query, to support Swift For TensorFlow. There are also a number of github issues asking for the functionality.
PiperOrigin-RevId: 205660862
Diffstat (limited to 'tensorflow/c/c_api.h')
-rw-r--r-- | tensorflow/c/c_api.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tensorflow/c/c_api.h b/tensorflow/c/c_api.h index fddc09d45e..c5035e0e41 100644 --- a/tensorflow/c/c_api.h +++ b/tensorflow/c/c_api.h @@ -1610,6 +1610,18 @@ TF_CAPI_EXPORT extern TF_Buffer* TF_ApiDefMapGet(TF_ApiDefMap* api_def_map, size_t name_len, TF_Status* status); +// -------------------------------------------------------------------------- +// Kernel definition information. + +// Returns a serialized KernelList protocol buffer containing KernelDefs for all +// registered kernels. +TF_CAPI_EXPORT extern TF_Buffer* TF_GetAllRegisteredKernels(TF_Status* status); + +// Returns a serialized KernelList protocol buffer containing KernelDefs for all +// kernels registered for the operation named `name`. +TF_CAPI_EXPORT extern TF_Buffer* TF_GetRegisteredKernelsForOp( + const char* name, TF_Status* status); + #ifdef __cplusplus } /* end extern "C" */ #endif |