基本参照我的这篇文章:《Windows下编译带CUDA 10.2的TensorFlow 2.2(Python3.8.2,附编译结果下载)》,有些地方有所改动,现列出来:
D:\tensorflow-2.3.0>python ./configure.py
You have bazel 3.4.1 installed.
Please specify the location of python. [Default is C:\Python38\python.exe]:
Found possible Python library paths:
C:\Python38\lib\site-packages
Please input the desired Python library path to use. Default is [C:\Python38\lib\site-packages]
Do you wish to build TensorFlow with ROCm support? [y/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.
Found CUDA 11.0 in:
D:/CUDA11/lib/x64
D:/CUDA11/include
Found cuDNN 8 in:
D:/CUDA11/lib/x64
D:/CUDA11/include
Please specify a list of comma-separated CUDA compute capabilities you want to build with.
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus. Each capability can be specified as "x.y" or "compute_xy" to include both virtual and binary GPU code, or as "sm_xy" to only include the binary code.
Please note that each additional compute capability significantly increases your build time and binary size, and that TensorFlow only supports compute capabilities >= 3.5 [Default is: 3.5,7.0]: 3.5,3.7,5.0,5.2,6.0,6.1,7.0,7.5,8.0
Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is /arch:AVX]: /arch:AVX2
Would you like to override eigen strong inline for some C++ compilation to reduce the compilation time? [Y/n]:
Eigen strong inline overridden.
Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]:
Not configuring the WORKSPACE for Android builds.
Preconfigured Bazel build configs. You can use any of the below by adding "--config&#61;<>" to your build command. See .bazelrc for more details.
--config&#61;mkl # Build with MKL support.
--config&#61;monolithic # Config for mostly static monolithic build.
--config&#61;ngraph # Build with Intel nGraph support.
--config&#61;numa # Build with NUMA support.
--config&#61;dynamic_kernels # (Experimental) Build kernels into separate shared objects.
--config&#61;v2 # Build TensorFlow 2.x instead of 1.x.
Preconfigured Bazel build configs to DISABLE default on features:
--config&#61;noaws # Disable AWS S3 filesystem support.
--config&#61;nogcp # Disable GCP support.
--config&#61;nohdfs # Disable HDFS support.
--config&#61;nonccl # Disable NVIDIA NCCL support.
编译命令稍后补充&#xff0c;先甩成品链接&#xff1a;
pip安装包&#xff1a;tensorflow-2.3.0-cp38-cp38-win_amd64.whl
pip安装包流量管家版&#xff1a;tensorflow-2.3.0-cp38-cp38-win_amd64.rar
pip安装包&#xff08;MKL&#xff09;&#xff1a;tensorflow-mkl-2.3.0-cp38-cp38-win_amd64.whl
pip安装包流量管家版&#xff1a;&#xff08;MKL&#xff09;&#xff1a;tensorflow-mkl-2.3.0-cp38-cp38-win_amd64.rar
pip安装包的流量管家版&#xff0c;解压后再用ZIP打包&#xff0c;改后缀为“whl”即可正常安装。
C库&#xff1a;libtensorflow-2.3.0.rar
C库&#xff08;MKL&#xff09;&#xff1a;libtensorflow-2.3.0-mkl.rar