Ⅰ 如何在vc6.0环境下进行cuda编程
nvcc现在支持的只有vs7.0和vs8.0 就是vc2003和vc2005
不过也可以试试VC6的:
例如一个编译选项这样的:
nvcc.exe -ccbin "C:\Program Files\Microsoft Visual Studio 8\VC\bin"
-deviceemu -link -D_DEBUG -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler
/EHsc,/W3,/nologo,/Wp64,/Od,/Zi,/RTC1,/MTd -IC:\CUDA\include -I./
-I"C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\common\inc"
-L"C:\CUDA\lib" -lcudart -L"C:\Program Files\NVIDIA Corporation\NVIDIA
CUDA SDK\common\lib" -lcutil32" simpleTexture.cu
or
nvcc.exe -ccbin "C:\Program Files\Microsoft Visual Studio 8\VC\bin"
-deviceemu -link -D_DEBUG -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler
/EHsc,/W3,/nologo,/Wp64,/Od,/Zi,/RTC1,/MTd -IC:\CUDA\include -I./
-I"C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\common\inc"
"C:\CUDA\lib/cudart.lib" "C:\Program Files\NVIDIA Corporation\NVIDIA
CUDA SDK\common\lib/cutil32.lib" simpleTexture.cu
你可以把vc的路径换成vc6的,试试,我没有vc6,所以不好给lz测试,见谅;
如果是模拟运行,就是把编译环境添加一个-deviceemu 编译选项就可以了。随便说一句,现在调试只能在模拟运行的debug模式下才行;
如果是正版问题,那lz可以看看linux;
Ⅱ cuda编程支持国产显卡吗
不支持。cuda编程目前只支持NVIDIA自己的显卡,连AMD的都没办法用更不用说国产的了。NVidia公司的显卡有GTXGeforce,Quadra和Tesla三个大系列。
Ⅲ NVIDIA显卡支持CUDA,什么是CUDA
关于CUDA:
CUDA(Compute Unified Device Architecture)是一个新的基础架构,这个架构可以使用GPU来解决商业、工业以及科学方面的复杂计算问题。它是一个完整的GPGPU解决方案,提供了硬件的直接访问接口,而不必像传统方式一样必须依赖图形API接口来实现GPU的访问。在架构上采用了一种全新的计算体系结构来使用GPU提供的硬件资源,从而给大规模的数据计算应用提供了一种比CPU更加强大的计算能力。CUDA采用C语言作为编程语言提供大量的高性能计算指令开发能力,使开发者能够在GPU的强大计算能力的基础上建立起一种效率更高的密集数据计算解决方案。
关于NVIDIA CUDA技术
NVIDIA CUDA技术是当今世界上唯一针对NVIDIA GPU(图形处理器)的C语言环境,为支持CUDA技术的NVIDIA GPU(图形处理器)带来无穷的图形计算处理性能。凭借NVIDIA CUDA技术,开发人员能够利用NVIDIA GPU(图形处理器)攻克极其复杂的密集型计算难题,应用到诸如石油与天然气的开发,金融风险管理,产品设计,媒体图像以及科学研究等领域。
CUDA™ 工具包是一种针对支持CUDA功能的GPU(图形处理器)的C语言开发环境。CUDA开发环境包括:
nvcc C语言编译器
适用于GPU(图形处理器)的CUDA FFT和BLAS库
分析器
适用于GPU(图形处理器)的gdb调试器(在2008年3月推出alpha版)
CUDA运行时(CUDA runtime)驱动程序(目前在标准的NVIDIA GPU驱动中也提供)
CUDA编程手册
CUDA开发者软件开发包(SDK)提供了一些范例(附有源代码),以帮助使用者开始CUDA编程。这些范例包括:
并行双调排序
矩阵乘法
矩阵转置
利用计时器进行性能评价
并行大数组的前缀和(扫描)
图像卷积
使用Haar小波的一维DWT
OpenGL和Direct3D图形互操作示例
CUDA BLAS和FFT库的使用示例
CPU-GPU C—和C++—代码集成
二项式期权定价模型
Black-Scholes期权定价模型
Monte-Carlo期权定价模型
并行Mersenne Twister(随机数生成)
并行直方图
图像去噪
Sobel边缘检测滤波器
MathWorks MATLAB® 插件 (点击这里下载)
新的基于1.1版CUDA的SDK 范例现在也已经发布了。要查看完整的列表、下载代码,请点击此处。
技术功能
在GPU(图形处理器)上提供标准C编程语言
为在支持CUDA的NVIDIA GPU(图形处理器)上进行并行计算而提供了统一的软硬件解决方案
CUDA兼容的GPU(图形处理器)包括很多:从低功耗的笔记本上用的GPU到高性能的,多GPU的系统。
支持CUDA的GPU(图形处理器)支持并行数据缓存和线程执行管理器
标准FFT(快速傅立叶变换)和BLAS(基本线性代数子程序)数值程序库
针对计算的专用CUDA驱动
经过优化的,从中央处理器(CPU)到支持CUDA的GPU(图形处理器)的直接上传、下载通道
CUDA驱动可与OpenGL和DirectX图形驱动程序实现互操作
支持Linux 32位/64位以及Windows XP 32位/64位 操作系统
为了研究以及开发语言的目的,CUDA提供对驱动程序的直接访问,以及汇编语言级的访问。
Ⅳ cuda编程问题 运行出错
Compiling CUDA source file ..\..\src\caffe\layers\bnll_layer.cu...
1>
1> D:\Caffe\WindowsCaffe_detect\Caffe_Windows_Detection-master\build\MSVC2013>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin\nvcc.exe" -gencode=arch=compute_20,code=\"sm_20,compute_20\" -gencode=arch=compute_35,code=\"sm_35,compute_35\" -gencode=arch=compute_52,code=\"sm_52,compute_52\" --use-local-env --cl-version 2013 -ccbin "D:\gzSoft\vs2013\VC\bin\x86_amd64" -I../../3rdparty/include -I../../src -I../../include -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\cuda\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\include" --keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart static --verbose --keep -Xcudafe "--diag_suppress=exception_spec_override_incompat --diag_suppress=useless_using_declaration --diag_suppress=field_without_dll_interface" -D_SCL_SECURE_NO_WARNINGS -DGFLAGS_DLL_DECL= -D_VARIADIC_MAX=10 -DWIN32 -D_DEBUG -D_CONSOLE -D_UNICODE -DUNICODE -Xcompiler "/EHsc /W1 /nologo /Od /Zi /RTC1 /MDd " -o Debug\bnll_layer.cu.obj "D:\Caffe\WindowsCaffe_detect\Caffe_Windows_Detection-master\src\caffe\layers\bnll_layer.cu"
1> #$ _SPACE_=
1> #$ _CUDART_=cudart
1> #$ _HERE_=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin
1> #$ _THERE_=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin
1> #$ _TARGET_SIZE_=
1> #$ _TARGET_DIR_=
1> #$ _TARGET_SIZE_=64
1> #$ _WIN_PLATFORM_=x64
1> #$ TOP=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin/..
1> #$ NVVMIR_LIBRARY_DIR=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin/../nvvm/libdevice
1> #$ PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin/../open64/bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin/../nvvm/bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin/../lib;D:\gzSoft\vs2013\VC\bin\x86_amd64;D:\gzSoft\vs2013\VC\bin;C:\Program Files (x86)\Windows Kits\8.1\bin\x86;;C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools;D:\gzSoft\vs2013\Common7\Tools\bin;D:\gzSoft\vs2013\Common7\tools;D:\gzSoft\vs2013\Common7\ide;C:\Program Files (x86)\HTML Help Workshop;;C:\Program Files (x86)\MSBuild\12.0\bin\;C:\Windows\Microsoft.NET\Framework\v4.0.30319\;;C:\Program Files\DahuaTech\MV Viewer\Runtime\x64\;C:\Program Files\DahuaTech\MV Viewer\Runtime\x64\GenICam_v2_4\bin\Win64_x64\;C:\Program Files\DahuaTech\MV Viewer\Runtime\Win32\;C:\Program Files\DahuaTech\MV Viewer\Runtime\Win32\GenICam_v2_4\bin\Win32_i86\;C:\Program Files\Basler\pylon 4\pylon\bin\x64;C:\Program Files\Basler\pylon 4\pylon\bin\Win32;C:\Program Files\Basler\pylon 4\genicam\Bin\Win64_x64;C:\Program Files\Basler\pylon 4\genicam\Bin\Win32_i86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;D:\gzSoft\opencv2.4.11\build_Sour\vc11\bin;D:\gzSoft\opencv2.4.10\build_Sour\vc10\bin;D:\gzSoft\qt5.2.1\5.2.1\msvc2012\bin;D:\MinGW\MinGW\bin;D:\gzSoft\vs2012\VC\bin;D:\gzSoft\javaTool\jdk1.7\bin;D:\gzSoft\javaTool\jdk1.7\jre\bin;D:\gzSoft\matlab\runtime\win64;D:\gzSoft\matlab\bin;D:\gzSoft\matlab\polyspace\bin;D:\software\eslib\bin;D:\gzSoft\lualib;D:\gzSoft\halcon12\bin\x86sse2-win32;D:\gzSoft\halcon12\FLEXlm\x86sse2-win32 ;C:\Program Files (x86)\Toshiba Teli\TeliCamSDK\TeliCamApi\bin\x86;C:\Program Files (x86)\CMake\bin\;D:\Program\opencv_pro\opencv-3.3.0\opencv-3.3.0\bulid\install\x86\vc11\bin;D:\gzSoft\doxygen\bin;D:\gzSoft\python2.7.10;D:\gzSoft\python2.7.10\Scripts;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;D:\Caffe\WindowsCaffeProject\caffe-master\Build\x64\Debug;
1> #$ INCLUDES="-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin/../include"
1> #$ LIBRARIES= "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin/../lib/x64"
1> #$ CUDAFE_FLAGS=--sdk_dir "C:\Program Files (x86)\Windows Kits\8.1"
1> #$ PTXAS_FLAGS=
1> bnll_layer.cu
1> nvcc fatal : Failed to create the host compiler response file 'x64/Debug/bnll_layer.compute_52.cpp1.ii.res'
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA 7.5.targets(604,9): error MSB3721: 命令“"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin\nvcc.exe" -gencode=arch=compute_20,code=\"sm_20,compute_20\" -gencode=arch=compute_35,code=\"sm_35,compute_35\" -gencode=arch=compute_52,code=\"sm_52,compute_52\" --use-local-env --cl-version 2013 -ccbin "D:\gzSoft\vs2013\VC\bin\x86_amd64" -I../../3rdparty/include -I../../src -I../../include -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\cuda\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\include" --keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart static --verbose --keep -Xcudafe "--diag_suppress=exception_spec_override_incompat --diag_suppress=useless_using_declaration --diag_suppress=field_without_dll_interface" -D_SCL_SECURE_NO_WARNINGS -DGFLAGS_DLL_DECL= -D_VARIADIC_MAX=10 -DWIN32 -D_DEBUG -D_CONSOLE -D_UNICODE -DUNICODE -Xcompiler "/EHsc /W1 /nologo /Od /Zi /RTC1 /MDd " -o Debug\bnll_layer.cu.obj "D:\Caffe\WindowsCaffe_detect\Caffe_Windows_Detection-master\src\caffe\layers\bnll_layer.cu"”已退出,返回代码为 1。
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
Ⅳ CUDA编程要安装的驱动、toolkit、SDK只能在NVIDIA显卡上么是不是对应NVIDIA的驱动文件等等
如果只是编程调试的话,不需要,debug选项中有一个项,具体我忘记了,意思是不用NVIDIA的显卡也可以执行。
但是如果要实测性能的话,就需要具体硬件支持了,这就是cuda的缺点。
Ⅵ 请问CUDA编程对显卡的要求是怎么样NVIDIA那些型号的显卡可以
显卡要求见此:http://www.nvidia.cn/object/cuda_gpus_cn.html 建议:双敏 G92核心的9600GSO 384MB 192bit,此卡远比同价位的其他NVIDIA图形卡好,特别是GPU运算能力,是同价位的GT220、9500GT的数倍。但是可能缺货,还有就是功耗较高。 如果你有500块的话,就可以考虑昂达G92核心的9600GSO 384MB 192bit 或 昂达GT240 512MB GDDR5
Ⅶ 如何使用CUDA 显卡编程
第一步 先确定你的显卡 是不是N卡(控制面板 》系统》设备管理器》显示适配器)
第二步 查看你的显卡 在不在 支持的显卡 行列 https://developer.nvidia.com/cuda-gpus点击打开链接
第三步 安装( windows电脑中 须是 vs2008 vs2005)
CUDA Development Tools https://developer.nvidia.com/cuda-downloads点击打开链接
NVIDIA CUDA Getting Started Guide for Microsoft Windows
Introction
CUDA™ is a parallel computing platform and programming model invented by NVIDIA. It enables dramatic increases in computing performance by harnessing the power of the graphics processing unit (GPU).
CUDA was developed with several design goals in mind:
Provide a small set of extensions to standard programming languages, like C, that enable a straightforward implementation of parallel algorithms. With CUDA C/C++, programmers can focus on the task of parallelization of the algorithms rather than spending time on their implementation.
Support heterogeneous computation where applications use both the CPU and GPU. Serial portions of applications are run on the CPU, and parallel portions are offloaded to the GPU. As such, CUDA can be incrementally applied to existing applications. The CPU and GPU are treated as separate devices that have their own memory spaces. This configuration also allows simultaneous computation on the CPU and GPU without contention for memory resources.
CUDA-capable GPUs have hundreds of cores that can collectively run thousands of computing threads. These cores have shared resources including a register file and a shared memory. The on-chip shared memory allows parallel tasks running on these cores to share data without sending it over the system memory bus.
This guide will show you how to install and check the correct operation of the CUDA development tools.
System Requirements
To use CUDA on your system, you will need the following:
CUDA-capable GPU
Microsoft Windows XP, Vista, 7, or 8 or Windows Server 2003 or 2008
NVIDIA CUDA Toolkit (available at no cost from http://www.nvidia.com/content/cuda/cuda-downloads.html)
Microsoft Visual Studio 2008 or 2010, or a corresponding version of Microsoft Visual C++ Express
About This Document
This document is intended for readers familiar with Microsoft Windows XP, Microsoft Windows Vista, or Microsoft Windows 7 operating systems and the Microsoft Visual Studio environment. You do not need previous experience with CUDA or experience with parallel computation.
Installing CUDA Development Tools
The installation of CUDA development tools on a system running the appropriate version of Windows consists of a few simple steps:
Verify the system has a CUDA-capable GPU.
Download the NVIDIA CUDA Toolkit.
Install the NVIDIA CUDA Toolkit.
Test that the installed software runs correctly and communicated with the hardware.