aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/pywrap_tfe.i
diff options
context:
space:
mode:
authorGravatar Alexandre Passos <apassos@google.com>2017-08-16 11:14:42 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-08-16 11:18:33 -0700
commit4738e700ba88f46c139793c8a0ce48dc68c2d50e (patch)
tree225d8a5fadbf791c7b13a7f87e4cef28103eb77d /tensorflow/python/pywrap_tfe.i
parentcf2961dda3f6f82d258ef6ad9f3502a018dda5a6 (diff)
Initial tests for gradient code.
PiperOrigin-RevId: 165467540
Diffstat (limited to 'tensorflow/python/pywrap_tfe.i')
-rw-r--r--tensorflow/python/pywrap_tfe.i16
1 files changed, 16 insertions, 0 deletions
diff --git a/tensorflow/python/pywrap_tfe.i b/tensorflow/python/pywrap_tfe.i
index ffa6d10cfa..07e715ede6 100644
--- a/tensorflow/python/pywrap_tfe.i
+++ b/tensorflow/python/pywrap_tfe.i
@@ -61,6 +61,22 @@ limitations under the License.
}
}
+%typemap(in) const char* serialized_function_def {
+ $1 = TFE_GetPyThonString($input);
+}
+
+%typemap(in) const char* device_name {
+ if ($input == Py_None) {
+ $1 = nullptr;
+ } else {
+ $1 = TFE_GetPyThonString($input);
+ }
+}
+
+%typemap(in) const char* op_name {
+ $1 = TFE_GetPyThonString($input);
+}
+
%include "tensorflow/c/eager/c_api.h"
%typemap(in) TFE_InputTensorHandles* inputs (TFE_InputTensorHandles temp) {