aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/common_runtime/gpu/gpu_device_factory.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-04-13 02:35:33 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-04-13 03:48:00 -0700
commit7d4aaddaad9343fea73dbc0e100e8c5d726f45d6 (patch)
treeeb73e8bca859ad6a5ad50b7256d5ac2ba8c1b315 /tensorflow/core/common_runtime/gpu/gpu_device_factory.cc
parentb4396632f78624057eefc79721e5081254068d48 (diff)
Automated rollback of change 153039058
Change: 153045639
Diffstat (limited to 'tensorflow/core/common_runtime/gpu/gpu_device_factory.cc')
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_device_factory.cc16
1 files changed, 4 insertions, 12 deletions
diff --git a/tensorflow/core/common_runtime/gpu/gpu_device_factory.cc b/tensorflow/core/common_runtime/gpu/gpu_device_factory.cc
index d9fa5a6b96..94143a55d5 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_device_factory.cc
+++ b/tensorflow/core/common_runtime/gpu/gpu_device_factory.cc
@@ -31,16 +31,12 @@ class GPUDevice : public BaseGPUDevice {
Allocator* cpu_allocator)
: BaseGPUDevice(options, name, memory_limit, locality, gpu_id,
physical_device_desc, gpu_allocator, cpu_allocator,
- false /* sync every op */, 1 /* max_streams */) {
- if (options.config.has_gpu_options()) {
- force_gpu_compatible_ = options.config.gpu_options.force_gpu_compatible;
- }
- }
+ false /* sync every op */, 1 /* max_streams */) {}
Allocator* GetAllocator(AllocatorAttributes attr) override {
if (attr.on_host()) {
ProcessState* ps = ProcessState::singleton();
- if (attr.gpu_compatible() || force_gpu_compatible_) {
+ if (attr.gpu_compatible()) {
return ps->GetCUDAHostAllocator(0);
} else {
return cpu_allocator_;
@@ -75,16 +71,12 @@ class GPUCompatibleCPUDevice : public ThreadPoolDevice {
GPUCompatibleCPUDevice(const SessionOptions& options, const string& name,
Bytes memory_limit, const DeviceLocality& locality,
Allocator* allocator)
- : ThreadPoolDevice(options, name, memory_limit, locality, allocator) {
- if (options.config.has_gpu_options()) {
- force_gpu_compatible_ = options.config.gpu_options.force_gpu_compatible;
- }
- }
+ : ThreadPoolDevice(options, name, memory_limit, locality, allocator) {}
~GPUCompatibleCPUDevice() override {}
Allocator* GetAllocator(AllocatorAttributes attr) override {
ProcessState* ps = ProcessState::singleton();
- if (attr.gpu_compatible() || force_gpu_compatible_) {
+ if (attr.gpu_compatible()) {
return ps->GetCUDAHostAllocator(0);
} else {
// Call the parent's implementation.