Python 是否使用cuda从源代码构建tensorflow?

Python 是否使用cuda从源代码构建tensorflow?,python,tensorflow,Python,Tensorflow,我按照官方指示,在macOS上为python从源代码构建了具有GPU支持的tensorflow。然而,当我导入tensorflow时,我并没有得到使用pip版本(如下所示)时的典型CUDA加载消息 然而,当我用我的构建运行我的测试程序时,我确实看到GPU正在被发现和使用(我想) ~/Drive/thesis/image\u keras$python3 demo.py 使用TensorFlow后端。 找到了2125张属于2类的图片。 找到了属于2个类的832张图像。 demo.py:64:User

我按照官方指示,在macOS上为python从源代码构建了具有GPU支持的tensorflow。然而,当我导入tensorflow时,我并没有得到使用pip版本(如下所示)时的典型CUDA加载消息

然而,当我用我的构建运行我的测试程序时,我确实看到GPU正在被发现和使用(我想)

~/Drive/thesis/image\u keras$python3 demo.py
使用TensorFlow后端。
找到了2125张属于2类的图片。
找到了属于2个类的832张图像。
demo.py:64:UserWarning:更新对Keras 2 API的'fit_generator'调用:'fit_generator(……)-ETA:18s-损失:0.7352-附件:0.5166
它看起来像是在使用GPU,但没有CUDA加载,我不确定。如果它有什么不同,我将使用
cuDNN-8.0-v5.1运行
CUDA-8.0

tensorflow.test.is_gpu_available()
tensorflow.test.is_built_with_cuda()
如果您运行这些代码,并且Tensorflow是用CUDA构建的,那么这两个函数都应该返回True

我必须使用它,因为正如前面的回答中所给出的,即使我使用的是pip版本,我也没有得到如图所示打印的“成功打开CUDA库”行的输出。 我使用Tensorflow 1.4.0

~/Drive/thesis/image_keras$ python3 demo.py 
Using TensorFlow backend.
Found 2125 images belonging to 2 classes.
Found 832 images belonging to 2 classes.
demo.py:64: UserWarning: Update your `fit_generator` call to the Keras 2 API: `fit_generator(<keras.pre..., validation_data=<keras.pre..., steps_per_epoch=128, epochs=25, validation_steps=832)`
  nb_val_samples=nb_validation_samples)
Epoch 1/25
2017-04-13 08:39:24.542434: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:865] OS X does not support NUMA - returning NUMA node zero
2017-04-13 08:39:24.542538: I tensorflow/core/common_runtime/gpu/gpu_device.cc:887] Found device 0 with properties: 
name: GeForce GT 750M
major: 3 minor: 0 memoryClockRate (GHz) 0.9255
pciBusID 0000:01:00.0
Total memory: 2.00GiB
Free memory: 1.77GiB
2017-04-13 08:39:24.542551: I tensorflow/core/common_runtime/gpu/gpu_device.cc:908] DMA: 0 
2017-04-13 08:39:24.542557: I tensorflow/core/common_runtime/gpu/gpu_device.cc:918] 0:   Y 
2017-04-13 08:39:24.542566: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GT 750M, pci bus id: 0000:01:00.0)
 49/128 [==========>...................] - ETA: 18s - loss: 0.7352 - acc: 0.5166 
tensorflow.test.is_gpu_available()
tensorflow.test.is_built_with_cuda()