2017-06-05 3 views
-1

私はテンソルフローを約2年間使ってきましたが、これは見たことがありません。新しいUbuntuボックスには、virtualenvにテンソルフローを新しくインストールしました。サンプルコードを実行すると、無効なデバイスエラーが発生しました。 tf.Session()が呼び出されたときに発生しました。テンソルの流れ異常なCUDA関連のエラー

WARNING:tensorflow:From full_code.py:27: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02. 
Instructions for updating: 
Use `tf.global_variables_initializer` instead. 
2017-06-05 11:01:55.853842: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. 
2017-06-05 11:01:55.853867: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. 
2017-06-05 11:01:55.853876: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. 
2017-06-05 11:01:55.853886: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations. 
2017-06-05 11:01:55.853893: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations. 
2017-06-05 11:01:55.937978: I tensorflow/core/common_runtime/gpu/gpu_device.cc:887] Found device 0 with properties: 
name: GeForce GTX 660 Ti 
major: 3 minor: 0 memoryClockRate (GHz) 1.0455 
pciBusID 0000:04:00.0 
Total memory: 2.95GiB 
Free memory: 2.91GiB 
2017-06-05 11:01:55.938063: W tensorflow/stream_executor/cuda/cuda_driver.cc:485] creating context when one is currently active; existing: 0x19e5370 
2017-06-05 11:01:56.014220: E tensorflow/core/common_runtime/direct_session.cc:137] Internal: failed initializing StreamExecutor for CUDA device ordinal 1: Internal: failed call to cuDevicePrimaryCtxRetain: CUDA_ERROR_INVALID_DEVICE 

ここは完全な仕様です。

Ubuntu 14.04 
CUDA 8.0 
GeForce GTX 660 Ti 
python 3.4.3 
+0

CUDAのインストールを検証しましたか? –

+0

@RobertCrovellaどのようにわからないのですか? – horaceT

+0

CUDA Linuxのインストールガイドを確認してください –

答えて

1

Googleからのおかげで何がうまくいかなかったのか分かりました。このDellボックスには、2つのNvidiaグラフィックカードがあります。最初のものはメーカーに付属し、NVS 310カードです。私が知る限り、これには計算機能はなく、私は決してその多くを使うつもりはありません。

次に、2番目のカードであるGTX 660 TiとIを、すべての計算に使用することを意図して追加しました。

Tensorflowが呼び出されると、デフォルトでDevice 0(NVS 310)に設定されます。もちろん、無効なエラーが発生します。

私はこれを行う

CUDA_VISIBLE_DEVICES = 1つのpython myscript.py

それが動作

+0

解決策は、あなたの質問に言及することを完全に無視しましたか? – talonmies

+0

@talonmies全く悪いです。私は、複数のGPUがある場合でもCUDAの動作についてさらに多くの発見をしています。 – horaceT

関連する問題