導航:首頁 > 編程語言 > nvidiacuda編程

nvidiacuda編程

發布時間:2022-11-08 01:43:55

Ⅰ 如何在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.

閱讀全文

與nvidiacuda編程相關的資料

熱點內容
軟通動力程序員節2021 瀏覽:845
安卓系統如何卸載安裝包 瀏覽:870
簡訊刪除助手文件夾 瀏覽:688
java辦公自動化 瀏覽:340
php中超鏈接 瀏覽:253
linux默認路由設置 瀏覽:36
linux如何掛載iso 瀏覽:432
vs程序換文件夾後不能編譯 瀏覽:557
安卓源碼編譯輸入腳本沒反應 瀏覽:47
phpmysql自增 瀏覽:167
把ppt保存為pdf 瀏覽:533
汽車密封件加密配件 瀏覽:887
黑馬程序員15天基礎班 瀏覽:560
java調整格式 瀏覽:521
香港雲伺服器租用價 瀏覽:78
linuxsublime3 瀏覽:560
imac混合硬碟命令 瀏覽:279
沈陽用什麼app租房車 瀏覽:858
00後高中生都用什麼app 瀏覽:239
戴爾塔式伺服器怎麼打開獨立顯卡 瀏覽:808