{"id":322607,"date":"2021-05-05T09:00:59","date_gmt":"2021-05-05T09:00:59","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=322607"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=322607","title":{"rendered":"\u041f\u0440\u0438\u0432\u044b\u0447\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u00ab\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u00bb \u0438\u043b\u0438 \u043a\u0430\u043a \u043c\u044b \u0437\u0430\u0441\u0443\u043d\u0443\u043b\u0438 CUDA \u0432 .vcxproj"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/98f\/e01\/893\/98fe01893ed765abcbde565f7931f2e4.jpg\" alt=\"image\"> <br \/>  <b><a href=\"https:\/\/ru.wikipedia.org\/wiki\/CUDA\" rel=\"nofollow noopener noreferrer\">CUDA<\/a><\/b><\/p>\n<h2>\u0410 \u0437\u0430\u0447\u0435\u043c?<\/h2>\n<p>  \u041f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u0432\u0435\u0447\u0443, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0434\u0435\u0440\u0436\u0430\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u0432\u0438\u0434\u0435 OpenSource, \u0442\u043e \u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u00ab\u0441\u043a\u0430\u0447\u0430\u043b \u043a\u043e\u0434, \u0441\u043e\u0431\u0440\u0430\u043b \u043e\u0434\u043d\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u043e\u0439\u00bb, \u043d\u043e \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 CUDA \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0441\u0442\u0430\u043b\u0430 \u0441\u043b\u043e\u0436\u043d\u0435\u0435\u2026 \u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438 \u043a\u0440\u0438\u0447\u0430\u043b\u0430, \u0447\u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 SDK \u043e\u043d\u0438 \u043d\u0435 \u0445\u043e\u0442\u044f\u0442. <a name=\"habracut\"><\/a><\/p>\n<h2>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f CUDA \u043f\u0440\u044f\u043c\u043e \u0432 .vcxproj<\/h2>\n<p>  \u0420\u0435\u0448\u0438\u043b\u0438 \u043c\u044b \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u0440\u043e\u0441\u0442\u043e: \u0437\u0430\u043f\u0438\u0445\u043d\u0443\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 CUDA \u0432 \u00ab\u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u0435\u0440\u0435\u0434 \u0441\u0431\u043e\u0440\u043a\u043e\u0439\u00bb, \u0430 \u0442\u0443\u043b\u0441\u0435\u0442 \u0432 SDK\/tools\/CUDA. <\/p>\n<h3>\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u0435\u0440\u0435\u0434 \u0441\u0431\u043e\u0440\u043a\u043e\u0439<\/h3>\n<p>  \u0421\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u0435\u0440\u0435\u0434 \u0441\u0431\u043e\u0440\u043a\u043e\u0439 \u2014 \u044d\u0442\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/p>\n<p>  <b>CMD \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 CUDA<\/b> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c&quot;  <\/p>\n<pre><code class=\"cmake\">nvcc.exe -gencode=arch=compute_30,code=\\&quot;sm_30,compute_30\\&quot; --use-local-env -x cu  -I..\\..\\engine.vc2008\\xrCore\\XMLCore -I..\/..\/sdk\/include\/dx\/ -I..\/..\/sdk\/include\/ -I..\\..\\engine.vc2008\\xrQSlim\\src -I..\/..\/sdk\/include\/optix\/ -I..\/..\/sdk\/include\/cuda\/ -I$(xrIncl)  -G   --keep-dir $(Platform)\\$(Configuration) -maxrregcount=0  --machine 64 --compile -cudart static  -g   -DFORCE_NO_EXCEPTIONS -D_USE_MATH_DEFINES -DWIN32 -DDEBUG -D_WINDOWS -D_USRDLL -DXRLC_LIGHT_EXPORTS -D_SECURE_SCL=0 -D_ITERATOR_DEBUG_LEVEL=0 -D_VC80_UPGRADE=0x0710 -DWIN32 -D_WINSOCK_DEPRECATED_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDLL -D_MBCS -Xcompiler &quot;\/EHsc \/W3 \/nologo \/Od \/FS \/Zi \/RTC1 \/MD &quot; -o $(IntermediateOutputPath)LightPoint.cu.obj &quot;$(ProjectDir)LightPoint.cu&quot;<\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f, \u0442.\u043a. \u043e\u043d \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0437 CMD \u043e\u0442 CUDA \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/p>\n<h3>\u0412\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c toolset<\/h3>\n<p>  \u041d\u0443, \u0442\u0443\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u0440\u043e\u0441\u0442: \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0441\u043e\u0431\u0440\u0430\u0442\u044c, \u043b\u043e\u0432\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u0434\u043e\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c .exe\/.dll <b>-&gt;<\/b> check again. \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0436\u0438\u0437\u043d\u0438:  <\/p>\n<ul>\n<li>nvcc.exe<\/li>\n<li>nvcc.profile<\/li>\n<li>nvlink.exe<\/li>\n<li>nvvm64_32_0.dll<\/li>\n<li>ptxas.exe<\/li>\n<li>cudafe++.exe<\/li>\n<li>fatbinary.exe<\/li>\n<li>cicc.exe<\/li>\n<li>bin2c.exe<\/li>\n<li>gpu-library-advisor.exe<\/li>\n<\/ul>\n<h3>\u041a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0430<\/h3>\n<p>  \u041d\u0443 \u0438 \u0441\u0430\u043c\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434 \u043a\u043e\u043d\u0435\u0446 \u2014 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 .cu \u0444\u0430\u0439\u043b \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0443: <b>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 -&gt; \u041a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u0449\u0438\u043a -&gt; \u041a\u043e\u043c\u0430\u043d\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430<\/b> \u0438 \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0446\u0438\u0438 <b>your_file_name.cu.obj<\/b>. <\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0443 \u043b\u044e\u0431\u043e\u0433\u043e \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u0435\u043b\u044f VS \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 CUDA SDK.<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/555802\/\"> https:\/\/habr.com\/ru\/post\/555802\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/98f\/e01\/893\/98fe01893ed765abcbde565f7931f2e4.jpg\" alt=\"image\"> <br \/>  <b><a href=\"https:\/\/ru.wikipedia.org\/wiki\/CUDA\" rel=\"nofollow noopener noreferrer\">CUDA<\/a><\/b><\/p>\n<h2>\u0410 \u0437\u0430\u0447\u0435\u043c?<\/h2>\n<p>  \u041f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u0432\u0435\u0447\u0443, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0434\u0435\u0440\u0436\u0430\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u0432\u0438\u0434\u0435 OpenSource, \u0442\u043e \u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u00ab\u0441\u043a\u0430\u0447\u0430\u043b \u043a\u043e\u0434, \u0441\u043e\u0431\u0440\u0430\u043b \u043e\u0434\u043d\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u043e\u0439\u00bb, \u043d\u043e \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 CUDA \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0441\u0442\u0430\u043b\u0430 \u0441\u043b\u043e\u0436\u043d\u0435\u0435\u2026 \u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438 \u043a\u0440\u0438\u0447\u0430\u043b\u0430, \u0447\u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 SDK \u043e\u043d\u0438 \u043d\u0435 \u0445\u043e\u0442\u044f\u0442. <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-322607","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/322607","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=322607"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/322607\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=322607"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=322607"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=322607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}