Commit 913a96bc authored by Igor Ganichev's avatar Igor Ganichev Committed by TensorFlower Gardener
Browse files

Optimize tf.split for eager mode

In eager mode, we know the shapes of input tensors and can use
more efficient methods for retrieving shape and rank. This change
reduces SPINN training time by about 1%. While 1% is not a lot, it is
a small localized change to a very commonly used op.

Also:
  - Adapt split_op_test to run in both modes
  - Decrease the number of splits in _testHugeNumberOfTensorsVariable
    from 10k to 1k. I don't see much value in having such large
    operations in a unit test. This reduces the total testing time
    of split_test_op from 40 seconds to 4.6 seconds.
  - Change TensorFlowTestCase.evaluate() to create a session if no default
    session is setup.
PiperOrigin-RevId: 174349642
parent 65fa68b1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment