2018-12-14 17:46:49.410201: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
Device mapping:
/job:localhost/replica:0/task:0/device:XLA_CPU:0 -> device: XLA_CPU device
2018-12-14 17:46:49.415702: I tensorflow/core/common_runtime/direct_session.cc:307] Device mapping:
/job:localhost/replica:0/task:0/device:XLA_CPU:0 -> device: XLA_CPU device
结果:设备信息
add: (Add): /job:localhost/replica:0/task:0/device:CPU:0
2018-12-14 17:46:49.416609: I tensorflow/core/common_runtime/placer.cc:927] add: (Add)/job:localhost/replica:0/task:0/device:CPU:0
v1: (Const): /job:localhost/replica:0/task:0/device:CPU:0
2018-12-14 17:46:49.416649: I tensorflow/core/common_runtime/placer.cc:927] v1: (Const)/job:localhost/replica:0/task:0/device:CPU:0
v2: (Const): /job:localhost/replica:0/task:0/device:CPU:0
2018-12-14 17:46:49.416680: I tensorflow/core/common_runtime/placer.cc:927] v2: (Const)/job:localhost/replica:0/task:0/device:CPU:0
4.2 使用GPU
结果:提示信息
2018-12-14 18:09:48.631634: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2018-12-14 18:09:48.739205: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:892] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2018-12-14 18:09:48.739452: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties:
name: Tesla P4 major: 6 minor: 1 memoryClockRate(GHz): 1.1135
pciBusID: 0000:00:08.0
totalMemory: 7.43GiB freeMemory: 7.31GiB
2018-12-14 18:09:48.739482: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: Tesla P4, pci bus id: 0000:00:08.0, compute capability: 6.1)
Device mapping:
/job:localhost/replica:0/task:0/device:GPU:0 -> device: 0, name: Tesla P4, pci bus id: 0000:00:08.0, compute capability: 6.1
2018-12-14 18:09:48.816739: I tensorflow/core/common_runtime/direct_session.cc:299] Device mapping:
/job:localhost/replica:0/task:0/device:GPU:0 -> device: 0, name: Tesla P4, pci bus id: 0000:00:08.0, compute capability: 6.1
结果:设备信息
add: (Add): /job:localhost/replica:0/task:0/device:GPU:0
2018-12-14 18:09:48.817553: I tensorflow/core/common_runtime/placer.cc:874] add: (Add)/job:localhost/replica:0/task:0/device:GPU:0
v2: (Const): /job:localhost/replica:0/task:0/device:GPU:0
2018-12-14 18:09:48.817586: I tensorflow/core/common_runtime/placer.cc:874] v2: (Const)/job:localhost/replica:0/task:0/device:GPU:0
v1: (Const): /job:localhost/replica:0/task:0/device:GPU:0
2018-12-14 18:09:48.817602: I tensorflow/core/common_runtime/placer.cc:874] v1: (Const)/job:localhost/replica:0/task:0/device:GPU:0
基础:Tensorflow选择GPU&CPU计算与训练==11 默认模式1.0 默认CPU结果:计算结果CPU calculator result is : [250.]CPU calculator time consuming is: 0.0006909370422361.2 默认GPU结果:计算结果GPU calculator result is : [250...