Visual Studio 2010 CUDA环境详细配置教程与驱动安装指南

2星 需积分: 33 8 下载量 128 浏览量 更新于2024-09-15 收藏 467KB DOCX 举报
本篇文档详细介绍了如何基于Visual Studio 2010进行CUDA环境的配置。首先,我们面对的是一个Windows 7 32位旗舰版系统,搭载了NVIDIA GeForce GT 330M显卡。CUDA环境配置主要包括以下几个关键步骤: 1. 软件准备 - Microsoft Visual Studio 2010:这是CUDA开发的基础IDE,用于编写和编译CUDA代码。 - Visual Assist X v10.6.1854.0:虽然非必需,但推荐安装这个插件,因为它能提升编程效率,尤其是在并行计算方面。 - NVIDIA 显卡驱动:选择最新版本驱动以确保与CUDA 4.0的兼容性,如devdriver_4.0_winvista-win7_32_275.33_notebook.exe。 - CUDA Toolkit v4.0:核心的CUDA开发工具,安装路径为C:\ProgramFiles\NVIDIA GPU Computing Toolkit\CUDA\v4.0。 - CUDA SDK v4.0:提供了更多高级功能和工具,安装路径为C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0。 - Parallel Nsight v2.0:用于调试和分析CUDA、OpenCL等GPU通用计算应用程序的IDE集成。 2. 安装步骤 - Visual Studio 2010及Visual Assist X:首先安装Visual Studio,然后安装Visual Assist X,两者顺序不可颠倒。 - 显卡驱动与开发工具包: - 安装显卡驱动,确保从NVIDIA官网获取最新驱动,如遇到安装问题,可尝试重启电脑重试。 - CUDAToolkit的安装路径要确认,它包含了CUDA的核心库和编译器。 - CUDASDK的安装同样重要,提供额外的工具和示例代码。 - Parallel Nsight是调试工具,能将GPU计算集成到Visual Studio中,方便程序调试和性能分析。 - 配置环境变量:尽管通常安装过程会自动设置环境变量,但为了确保无误,用户应手动检查或设置CUDA相关的系统环境变量,比如CUDA_PATH和CUDA_BIN_DIR等。 本文档为Windows 7环境下使用Visual Studio 2010进行CUDA开发提供了详尽的安装指南,包括必要的软件选择、安装顺序以及环境变量配置,这对于任何想要利用GPU进行高性能计算的开发者来说,是一份实用的参考资源。
2019-01-11 上传
自编译tensorflow: 1.python3.5,tensorflow1.12; 2.支持cuda10.0,cudnn7.3.1,TensorRT-5.0.2.6-cuda10.0-cudnn7.3; 3.无mkl支持; 软硬件硬件环境:Ubuntu16.04,GeForce GTX 1080 TI 配置信息: hp@dla:~/work/ts_compile/tensorflow$ ./configure WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown". You have bazel 0.19.1 installed. Please specify the location of python. [Default is /usr/bin/python]: /usr/bin/python3 Found possible Python library paths: /usr/local/lib/python3.5/dist-packages /usr/lib/python3/dist-packages Please input the desired Python library path to use. Default is [/usr/local/lib/python3.5/dist-packages] Do you wish to build TensorFlow with XLA JIT support? [Y/n]: XLA JIT support will be enabled for TensorFlow. Do you wish to build TensorFlow with OpenCL SYCL support? [y/N]: No OpenCL SYCL support will be enabled for TensorFlow. 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. Please specify the CUDA SDK version you want to use. [Leave empty to default to CUDA 10.0]: Please specify the location where CUDA 10.0 toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]: /usr/local/cuda-10.0 Please specify the cuDNN version you want to use. [Leave empty to default to cuDNN 7]: 7.3.1 Please specify the location where cuDNN 7 library is installed. Refer to README.md for more details. [Default is /usr/local/cuda-10.0]: Do you wish to build TensorFlow with TensorRT support? [y/N]: y TensorRT support will be enabled for TensorFlow. Please specify the location where TensorRT is installed. [Default is /usr/lib/x86_64-linux-gnu]://home/hp/bin/TensorRT-5.0.2.6-cuda10.0-cudnn7.3/targets/x86_64-linux-gnu Please specify the locally installed NCCL version you want to use. [Default is to use https://github.com/nvidia/nccl]: 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. Please note that each additional compute capability significantly increases your build time and binary size. [Default is: 6.1,6.1,6.1]: Do you want to use clang as CUDA compiler? [y/N]: nvcc will be used as CUDA compiler. Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]: Do you wish to build TensorFlow with MPI support? [y/N]: No MPI support will be enabled for TensorFlow. Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native -Wno-sign-compare]: 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=" to your build command. See .bazelrc for more details. --config=mkl # Build with MKL support. --config=monolithic # Config for mostly static monolithic build. --config=gdr # Build with GDR support. --config=verbs # Build with libverbs support. --config=ngraph # Build with Intel nGraph support. --config=dynamic_kernels # (Experimental) Build kernels into separate shared objects. Preconfigured Bazel build configs to DISABLE default on features: --config=noaws # Disable AWS S3 filesystem support. --config=nogcp # Disable GCP support. --config=nohdfs # Disable HDFS support. --config=noignite # Disable Apacha Ignite support. --config=nokafka # Disable Apache Kafka support. --config=nonccl # Disable NVIDIA NCCL support. Configuration finished 编译: bazel build --config=opt --verbose_failures //tensorflow/tools/pip_package:build_pip_package 卸载已有tensorflow: hp@dla:~/temp$ sudo pip3 uninstall tensorflow 安装自己编译的成果: hp@dla:~/temp$ sudo pip3 install tensorflow-1.12.0-cp35-cp35m-linux_x86_64.whl