diff options
Diffstat (limited to 'tensorflow/python/client/tf_session.i')
-rw-r--r-- | tensorflow/python/client/tf_session.i | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/python/client/tf_session.i b/tensorflow/python/client/tf_session.i index 985cb90436..1cdd8e0b6a 100644 --- a/tensorflow/python/client/tf_session.i +++ b/tensorflow/python/client/tf_session.i @@ -138,6 +138,11 @@ tensorflow::ImportNumpy(); $result = PyLong_FromLongLong($1); } +// Convert TF_DeviceListIncarnation uint64_t output to Python integer +%typemap(out) uint64_t { + $result = PyLong_FromUnsignedLongLong($1); +} + // We use TF_OperationGetControlInputs_wrapper instead of // TF_OperationGetControlInputs %ignore TF_OperationGetControlInputs; |