aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/pywrap_tfe.i
diff options
context:
space:
mode:
authorGravatar Akshay Modi <nareshmodi@google.com>2018-10-01 13:46:31 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-10-01 13:57:32 -0700
commitec900f15e352e4b203b1f0678f7d2ff042df57d5 (patch)
tree2d7a7ffc0f17cb28801c7a9937b6f4e3777592c7 /tensorflow/python/pywrap_tfe.i
parent3039a4694e22674b502257ae34b0a5b614a631f3 (diff)
Minor speed improvements to defun.
- EncodeArg in C instead of python. - Also caches parsed device specs, and device spec hashes - Adds a common way to register python types in C. - Fastpath canonicalize function inputs when no kwargs are passed - Set the func name attr directly instead of creating an op to wrap it. - Rewrite IsAttrsHelper without caching Before: entry { name: "MicroBenchmarks.benchmark_defun_matmul_2_by_2_CPU" iters: 30000 wall_time: 101.803263028 extras { key: "examples_per_sec" value { double_value: 9822.86785562 } } } After: entry { name: "MicroBenchmarks.benchmark_defun_matmul_2_by_2_CPU" iters: 30000 wall_time: 47.2899993261 extras { key: "examples_per_sec" value { double_value: 21146.1199884 } } } PiperOrigin-RevId: 215272962
Diffstat (limited to 'tensorflow/python/pywrap_tfe.i')
-rwxr-xr-xtensorflow/python/pywrap_tfe.i1
1 files changed, 1 insertions, 0 deletions
diff --git a/tensorflow/python/pywrap_tfe.i b/tensorflow/python/pywrap_tfe.i
index c411a58b70..61e0abbfcb 100755
--- a/tensorflow/python/pywrap_tfe.i
+++ b/tensorflow/python/pywrap_tfe.i
@@ -67,6 +67,7 @@ limitations under the License.
%rename("%s") TFE_ContextStartStep;
%rename("%s") TFE_ContextEndStep;
%rename("%s") TFE_Py_RegisterVSpace;
+%rename("%s") TFE_Py_EncodeArg;
%{
#include "tensorflow/python/eager/pywrap_tfe.h"