在一个全新的LambdaLabs GPU示例上,我安装了带有Bazelisk的Bazel:
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.8.1/bazelisk-linux-amd64
chmod +x bazelisk-linux-amd64
sudo mv bazelisk-linux-amd64 /usr/local/bin/bazel
然后我下载TF来源:
git clone https://github.com/tensorflow/tensorflow.git
cd tensorflow
git checkout r2.11
然后运行config:
./configure
结果是:
ubuntu@*********:~/tensorflow$ ./configure
You have bazel 5.3.0 installed.
Please specify the location of python. [Default is /usr/bin/python3]:
Found possible Python library paths:
/usr/lib/python3/dist-packages
/usr/local/lib/python3.8/dist-packages
Please input the desired Python library path to use. Default is [/usr/lib/python3/dist-packages]
Do you wish to build TensorFlow with ROCm support? [y/N]: n
No ROCm support will be enabled for TensorFlow.
Do you wish to build TensorFlow with CUDA support? [y/N]: y
CUDA support will be enabled for TensorFlow.
Do you wish to build TensorFlow with TensorRT support? [y/N]: y
TensorRT support will be enabled for TensorFlow.
Inconsistent CUDA toolkit path: /usr vs /usr/lib
Asking for detailed CUDA configuration...
Please specify the CUDA SDK version you want to use. [Leave empty to default to CUDA 11]:
Please specify the cuDNN version you want to use. [Leave empty to default to cuDNN 2]:
Please specify the TensorRT version you want to use. [Leave empty to default to TensorRT 6]:
Please specify the locally installed NCCL version you want to use. [Leave empty to use http://github.com/nvidia/nccl]:
Please specify the comma-separated list of base paths to look for CUDA libraries and headers. [Leave empty to use the default]:
Inconsistent CUDA toolkit path: /usr vs /usr/lib
Asking for detailed CUDA configuration...
我不知道如何告诉编译器使用哪个CUDA工具包路径,甚至哪个是正确的路径。我只是试图用TFRT支持重建TF。
谢谢
编辑:
当我检查CUDA的安装位置时:
locate cuda | grep /cuda$
/home/ubuntu/tensorflow/tensorflow/compiler/xla/stream_executor/cuda
/home/ubuntu/tensorflow/tensorflow/stream_executor/cuda
/home/ubuntu/tensorflow/third_party/gpus/cuda
/usr/include/cuda
/usr/include/thrust/system/cuda
/usr/lib/cuda
/usr/lib/python3/dist-packages/pycuda/cuda
/usr/lib/python3/dist-packages/tensorflow/include/tensorflow/stream_executor/cuda
/usr/lib/python3/dist-packages/theano/sandbox/cuda
/usr/lib/python3/dist-packages/torch/cuda
/usr/lib/python3/dist-packages/torch/backends/cuda
/usr/lib/python3/dist-packages/torch/include/ATen/cuda
/usr/lib/python3/dist-packages/torch/include/ATen/native/cuda
/usr/lib/python3/dist-packages/torch/include/c10/cuda
/usr/lib/python3/dist-packages/torch/include/torch/csrc/cuda
/usr/lib/python3/dist-packages/torch/include/torch/csrc/jit/cuda
/usr/lib/python3/dist-packages/torch/include/torch/csrc/jit/codegen/cuda
/usr/lib/python3/dist-packages/torch/include/torch/csrc/jit/codegen/fuser/cuda
/usr/share/doc/libthrust-dev/examples/cuda
显然,正确的路径是/usr/lib/
,但我不知道如何告诉编译器使用该路径。
1条答案
按热度按时间kd3sttzy1#
你能运行这些命令吗!?**如果看到版本,然后用Bazel构建看到任何错误!?**我的环境没有什么不同,我在Windows 10上运行没有模拟,但作为警告消息,他们将不允许在GPU支持的下一个版本(实际上他们警告了很多次,但我仍然使用Windows 10作为许多用户)
〈〈需求和期望、用户和应用程序在低级别标准水平上满足的匹配〉〉
C:\WINDOWS\system32〉nvdisasm --版本nvdisasm:NVIDIA(R)CUDA反汇编器版权所有(c)2005-2021 NVIDIA Corporation构建于2021年8月15日21:12:33太平洋夏令时Cuda编译工具,版本11. 4,V11. 4. 120构建cuda_11. 4. r11. 4/compiler. 30300941_0
如果您有任何问题,请单击“下一步”。NVIDIA(R)Cuda编译器驱动程序版权所有(c)2005-2021 NVIDIA Corporation构建于2021年8月15日21:18:57 Cuda编译工具,版本11. 4,V11. 4. 120构建cuda_11. 4. r11. 4/compiler. 30300941_0
2022年11月8日星期二00:34:17| NVIDIA-SMI 512.15驱动程序版本:512.15 CUDA版本:11.6||-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|GPU名称TCC/WDDM|业务标识显示A|易失性不一致ECC||风扇温度性能功率:使用/容量|内存使用|GPU实用程序计算M.||||米格M.||===============================+======================+======================||0 NVIDIA ® GeForce ®显卡... WDDM|00000000:01:00.0日期| 不适用||0% 45摄氏度P8 9瓦/120瓦|1026百万字节/6144百万字节|2%默认值||||不适用|******************************************************************************************************************************************************************************************************
您configure.py已经安装了bazel 6.0.0-pre.20221020.1。请指定python的位置。[默认为C:\python310\python.exe]:
找到可能的Python库路径:C:\Python310\lib\站点包\Python310\object_detection\models请输入要使用的Python库路径。默认为[C:\Python310\lib\站点包]
是否要构建具有ROCm支持的TensorFlow?[y/N]:n不会为TensorFlow启用ROCm支持。
警告:无法在Windows上构建CUDA支持。从TF 2.11开始,CUDA构建不支持Windows。要在Windows上使用TensorFlow GPU,您需要在WSL 2中构建/安装TensorFlow。
指定bazel选项“--config=opt”时,请指定编译期间要使用的最佳化旗标[预设为/arch:AVX]:
是否要为某些C++编译重写特征强内联以减少编译时间?[Y/n]:y本征强内联覆盖。
是否要以交互方式为Android构建配置./WORKSPACE?[y/N]:n不为Android构建配置工作空间。
第一次