Deprecate `DeviceBase::GetStepAllocator()` and replace with calls to `GetAllocator()`.
authorDerek Murray <mrry@google.com>
Thu, 24 May 2018 18:14:17 +0000 (11:14 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Thu, 24 May 2018 18:17:19 +0000 (11:17 -0700)
commitf8438342466a323add1363bbac85a410b340ac57
tree7c2c35c5db4d75d4261e940940f04578315c2c75
parent677b4cf7539af0cf5741d12dfe7e142c586d4567
Deprecate `DeviceBase::GetStepAllocator()` and replace with calls to `GetAllocator()`.

The `GetStepAllocator()` API relied on the existence of a "step resource manager",
which is no longer a concept in the runtime (it was replaced by "step containers").
Since the additional flexibility does not appear to be used in the codebase, the
`GetScopedAllocator()` seems to provide a similar extension point (based on step IDs),
and the `OpKernelContext::get_allocator()` method is called frequently, this change
simplifies the implementation somewhat.

The `GetStepAllocator()` method is retained as a non-virtual stub that forwards to
`GetAllocator()`, because at least one third-party library (libxsmm) calls this
interface directly.

PiperOrigin-RevId: 197922154
tensorflow/contrib/nccl/kernels/nccl_manager_test.cc
tensorflow/core/common_runtime/renamed_device.h
tensorflow/core/framework/device_base.h
tensorflow/core/framework/op_kernel.cc