diff options
author | 2018-05-24 11:14:17 -0700 | |
---|---|---|
committer | 2018-05-24 11:17:19 -0700 | |
commit | f8438342466a323add1363bbac85a410b340ac57 (patch) | |
tree | 7c2c35c5db4d75d4261e940940f04578315c2c75 /tensorflow/contrib/nccl | |
parent | 677b4cf7539af0cf5741d12dfe7e142c586d4567 (diff) |
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
Diffstat (limited to 'tensorflow/contrib/nccl')
-rw-r--r-- | tensorflow/contrib/nccl/kernels/nccl_manager_test.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tensorflow/contrib/nccl/kernels/nccl_manager_test.cc b/tensorflow/contrib/nccl/kernels/nccl_manager_test.cc index 4d8d922cb4..5144f7c38c 100644 --- a/tensorflow/contrib/nccl/kernels/nccl_manager_test.cc +++ b/tensorflow/contrib/nccl/kernels/nccl_manager_test.cc @@ -171,8 +171,7 @@ class NcclManagerTest : public ::testing::Test { private: static Allocator* GpuAllocator(BaseGPUDevice* device) { - return device->GetStepAllocator(AllocatorAttributes(), - nullptr /* step_resource_manager */); + return device->GetAllocator(AllocatorAttributes()); } static se::DeviceMemory<Scalar> AsDeviceMemory(const Scalar* cuda_memory) { |