Commit c0b8a077 authored by Derek Murray's avatar Derek Murray Committed by TensorFlower Gardener
Browse files

[tf.contrib.data.map_and_batch()] Parallelize the destruction of old invocation results.

For map functions with a large number of return values, resetting each InvocationResult to an initialized state led to running `Tensor::~Tensor()` a large number of times in series. This change moves that destruction to each invocation's callback, which effectively parallelizes it. A future optimization could involve moving the tensor (and its content) into the batch.

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