Commit f8e9bf40 authored by Akshay Modi's avatar Akshay Modi Committed by TensorFlower Gardener
Browse files

Reducing op overhead for eager.

Benchmarks:
(new) tfe_py_fastpath_execute_matmul: 7.86213080088 walltime
(old) gen_math_ops_matmul: 11.2566947937 walltime

(The slowdown is due to adding the record_gradient callback)

This will be a 3-step process:

1. (This CL) Add a function that allows execution of an op on the fastpath.
2. Update python generation code to create 2 new python functions
(_op/_op_gradient_callback and _op_slowpath_fallback):
   -- first function (_op) checks if it is in graph mode, if so, do the normal
      thing, else call out to the function added in step 1.
   -- second function does the else part similar to today (calling out to
   args_to_matching_eager etc.)
3. Rename the first function generated above to be the canonical _op function.

PiperOrigin-RevId: 182791741
parent 7ac2511d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment