當前位置:首頁 » 挖礦知識 » 挖礦cudaerror

挖礦cudaerror

發布時間: 2024-05-10 10:45:59

Ⅰ 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"鈥濆凡閫鍑猴紝榪斿洖浠g爜涓 1銆
========== 鐢熸垚: 鎴愬姛 0 涓錛屽け璐 1 涓錛屾渶鏂 0 涓錛岃煩榪 0 涓 ==========

Ⅱ cuda error out of memory 怎麼解決

今天剛把伺服器搭建起來 結果程序就跑不起來 當時差點把自己嚇尿了
錯誤類型:CUDA_ERROE_OUT_OF_MEMORY
E tensorflow/stream_executor/cuda/cuda_driver.cc:924] failed to alloc 17179869184 bytes on host: CUDA_ERROR_OUT_OF_MEMORY
W ./tensorflow/core/common_runtime/gpu/pool_allocator.h:195] could not allocate pinned host memory of size: 17179869184
Killed

其實很容易理解 大致意思就是 伺服器的GPU大小為M
tensorflow只能申請N(N<M)
也就是tensorflow告訴你 不能申請到GPU的全部資源 然後就不幹了
解決方法:
找到代碼中Session
在session定義前 增加

config = tf.ConfigProto(allow_soft_placement=True)
#最多佔gpu資源的70%
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.7)
#開始不會給tensorflow全部gpu資源 而是按需增加
config.gpu_options.allow_growth = True
sess = tf.Session(config=config)
這樣就沒問題了

其實tensorflow 算是一個比較貪心的工具了
就算用device_id指定gpu 也會佔用別的GPU的顯存資源 必須在執行程序前
執行 export CUDA_VISIBLE_DEVICES=n(n為可見的伺服器編號)
再去執行Python 代碼.py 才不會佔用別的GPU資源
最近剛開始搞tensorflow 之前都是caffe
這周連續3天被實驗室的人 舉報 佔用過多伺服器資源 真是心累 只要用上面的方法
也就是執行代碼前 執行 export CUDA_VISIBLE_DEVICES=n
只讓1個或者個別GPU可見 其他GPU看不見 就行了

Ⅲ 瑙e喅錛欳UDA_ERROR_OUT_OF_MEMORY 闂棰

鍓嶈█錛氬湪鐢↘eras鎴栫洿鎺Tensorflow璁緇冨ぇ鍨嬬綉緇滄椂錛岀粡甯鎬細鎶ュ傞樼洰涓" 鏄懼瓨涓嶈凍 "涓嶈凍鐨勯敊璇銆傚叾瀹炵粷澶у氭暟鎯呭喌錛氬彧鏄痶ensorflow涓涓浜烘妸鎵鏈夌殑鏄懼瓨閮藉厛緇欏崰浜嗭紙紼嬪簭榛樿ょ殑錛夛紝瀵艱嚧鍏朵粬闇瑕佹樉瀛樼殑紼嬪簭閮ㄥ垎鎶ラ敊錛

瀹屾暣鐨勫勭悊寰堢畝鍗曪紝鍙鍒嗕笅闈㈢畝鍗曠殑3姝ワ細

鍏跺疄鎿嶄綔寰堢畝鍗曪紝鐪嬩笅闈㈢殑渚嬪瓙鍗沖彲錛氬亣瀹氱洿鎺ョ敤鐨凨eras

鍙﹀栵紝鏈夋椂batch_size鐨勫ぇ灝忎篃浼氬艱嚧鏄懼瓨闂棰橈紒涓鑸涓嶈佸お澶э紝涔熶笉瑕佸お灝忋

Ⅳ CUDA程序報錯 invalid argument

cudaSafeCall() Runtime API error in file...../matrix.cu,line 20: invalid argument 非法的值,數組出界
20行用的數組出界

Ⅳ CUDA程序出錯「no instance of overloaded function「,求解決辦法

cudaMallocPitch函數原型是下面這樣的:
cudaError_t cudaMallocPitch (void ** devPtr, size_t * pitch, size_t width, size_t height)
你的pitch是不是size_t類型的,看上面好像你寫成int了,改成size_t試試。再不行的話,把後面兩個參數也用size_t類型的試試。

Ⅵ 如何解決CUDA error的問題

cuda中有cudaError_t這個類別,可以記錄cuda錯誤。所有的cuda庫函數,幾乎都返回一個cudaError_t。
《GPU高性能編程》中使用HANDLE_ERROR宏函數,處理每個函數返回的cudaerror
static void HandleError( cudaError_t err,const char *file,int line ) {
if (err != cudaSuccess) {
printf( "%s in %s at line %d\n", cudaGetErrorString( err ), file, line );
exit( EXIT_FAILURE );
}
}

挖礦需要安裝cuda嗎

需要。根據查詢今日頭條得知,挖礦需要安裝cuda。CUDA,是顯卡廠商NVIDIA推出的運算平台。

熱點內容
yee和eth 發布:2024-05-21 00:57:27 瀏覽:396
泰國區塊鏈峰會6月25 發布:2024-05-21 00:50:08 瀏覽:496
挖萊特幣guiminer 發布:2024-05-21 00:20:40 瀏覽:286
trx轉以太坊 發布:2024-05-21 00:03:25 瀏覽:568
weblogic挖礦病毒 發布:2024-05-20 23:12:18 瀏覽:114
比特幣交易時間是多少 發布:2024-05-20 22:10:27 瀏覽:468
eth轉pos上限 發布:2024-05-20 21:52:21 瀏覽:588
小蜜桃區塊鏈靠譜 發布:2024-05-20 21:17:49 瀏覽:412
btc為何上漲 發布:2024-05-20 21:05:47 瀏覽:156
pec石油幣礦機如何運作 發布:2024-05-20 20:55:04 瀏覽:379