这不是Warning呀,哪里都没出现warning这个词,只是给你一些information而已。
请问你解决这个问题了吗?我也遇到了相同的问题
据我所知第一个warning如果要解决的话,需要从github下载tensorflow的源代码,用bazel重新编译。这个挺复杂的。具体可参考https://tensorflow.google.cn/install/source(我自己因为是使用gpu版本,所以没必要解决这个问题)
第二个warning我还没弄明白,需要好好看看XLA部分的讲解。
你好,请问跑训练代码出现下面两个信息是什么意思?
1、None of the MLIR Optimization Passes are enabled
2、Couldn’t invoke ptxas.exe --version
代码是链接里的示例代码:कनवल्शनल न्यूरल नेटवर्क (सीएनएन) | TensorFlow Core
看起来是能用GPU训练,但是总感觉速度有问题。。跟机器用的是AMD的CPU有关系吗,CPU是5800x,显卡是3080ti,环境是tensorflow-gpu 2.5.0,python=3.8,cudatoolkit=11.3,cudnn=8.2。
具体信息如下:
2021-09-12 17:35:28.302826: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:176] None of the MLIR Optimization Passes are enabled (registered 2)
Epoch 1/10
2021-09-12 17:35:28.528250: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudnn64_8.dll
2021-09-12 17:35:28.954801: I tensorflow/stream_executor/cuda/cuda_dnn.cc:359] Loaded cuDNN version 8201
2021-09-12 17:35:29.577930: E tensorflow/core/platform/windows/subprocess.cc:287] Call to CreateProcess failed. Error code: 2
2021-09-12 17:35:29.578036: W tensorflow/stream_executor/gpu/asm_compiler.cc:56] Couldn’t invoke ptxas.exe --version
2021-09-12 17:35:29.582453: E tensorflow/core/platform/windows/subprocess.cc:287] Call to CreateProcess failed. Error code: 2
2021-09-12 17:35:29.582966: W tensorflow/stream_executor/gpu/redzone_allocator.cc:314] Internal: Failed to launch ptxas
Relying on driver to perform ptx compilation.
Modify $PATH to customize ptxas location.
This message will be only logged once.
2021-09-12 17:35:29.620691: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cublas64_11.dll
2021-09-12 17:35:30.122407: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cublasLt64_11.dll
2021-09-12 17:35:30.155622: I tensorflow/stream_executor/cuda/cuda_blas.cc:1838] TensorFloat-32 will be used for the matrix multiplication. This will only be logged once.
1563/1563 [==============================] - 7s 3ms/step - loss: 1.5276 - accuracy: 0.4408 - val_loss: 1.2432 - val_accuracy: 0.5580
Epoch 2/10
1563/1563 [==============================] - 4s 3ms/step - loss: 1.1622 - accuracy: 0.5898 - val_loss: 1.1072 - val_accuracy: 0.6117
我也不太确定原因,或许可以参考 python - Tensorflow 2.4.1 - Couldn't invoke ptxas.exe - Stack Overflow ,换个tf和cuda的版本组合看看
您好,想请问按照您的方法和顺序在conda里安装tensorflow和cuda之后,是直接可以使用GPU运行的么?
我按照上面出现了检测不到GPU的情况,并且好像没有缺少什么文件的报错。CPU正常。
print(tf.test.gpu_device_name())有错误信息,输出大概这样。
[] [PhysicalDevice(name=’/physical_device:CPU:0’, device_type=‘CPU’)]
2022-02-18 19:55:37.195693: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: SSE4.1 SSE4.2 AVX AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
版本是
cudatoolkit 11.3.1 h2bc3f7f_2
cudnn 8.2.1 cuda11.3_0
tensorboard 2.6.0 py_1
tensorboard-data-server 0.6.0 py37hca6d32c_0
tensorboard-plugin-wit 1.6.0 py_0
tensorflow 2.6.0 mkl_py37h9d15365_0
tensorflow-base 2.6.0 mkl_py37h3d85931_0
tensorflow-estimator 2.6.0 pyh7b7c402_0
各种重装都试了比较头大,想请问有无这种情况出现过?
这里的输出也没报错呀,哪一行说检测不到gpu?