久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <tfoot id='b0HSC'></tfoot>
    • <bdo id='b0HSC'></bdo><ul id='b0HSC'></ul>

  • <small id='b0HSC'></small><noframes id='b0HSC'>

    <i id='b0HSC'><tr id='b0HSC'><dt id='b0HSC'><q id='b0HSC'><span id='b0HSC'><b id='b0HSC'><form id='b0HSC'><ins id='b0HSC'></ins><ul id='b0HSC'></ul><sub id='b0HSC'></sub></form><legend id='b0HSC'></legend><bdo id='b0HSC'><pre id='b0HSC'><center id='b0HSC'></center></pre></bdo></b><th id='b0HSC'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='b0HSC'><tfoot id='b0HSC'></tfoot><dl id='b0HSC'><fieldset id='b0HSC'></fieldset></dl></div>
    <legend id='b0HSC'><style id='b0HSC'><dir id='b0HSC'><q id='b0HSC'></q></dir></style></legend>

      1. 如何在 Visual Studio 2010 中啟動 CUDA 應(yīng)用程序?

        How do I start a CUDA app in Visual Studio 2010?(如何在 Visual Studio 2010 中啟動 CUDA 應(yīng)用程序?)
          <legend id='GPZWz'><style id='GPZWz'><dir id='GPZWz'><q id='GPZWz'></q></dir></style></legend>
        • <i id='GPZWz'><tr id='GPZWz'><dt id='GPZWz'><q id='GPZWz'><span id='GPZWz'><b id='GPZWz'><form id='GPZWz'><ins id='GPZWz'></ins><ul id='GPZWz'></ul><sub id='GPZWz'></sub></form><legend id='GPZWz'></legend><bdo id='GPZWz'><pre id='GPZWz'><center id='GPZWz'></center></pre></bdo></b><th id='GPZWz'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='GPZWz'><tfoot id='GPZWz'></tfoot><dl id='GPZWz'><fieldset id='GPZWz'></fieldset></dl></div>

          <tfoot id='GPZWz'></tfoot>

              1. <small id='GPZWz'></small><noframes id='GPZWz'>

                  <bdo id='GPZWz'></bdo><ul id='GPZWz'></ul>
                    <tbody id='GPZWz'></tbody>
                  本文介紹了如何在 Visual Studio 2010 中啟動 CUDA 應(yīng)用程序?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時送ChatGPT賬號..

                  直接問題:如何在 Visual Studio 2010 中創(chuàng)建一個簡單的 hello world CUDA 項目?

                  背景:我寫過 CUDA 內(nèi)核.我非常熟悉 Visual Studio 2005 中的 .vcproj 文件——手動調(diào)整了幾個.在 VS 2005 中,如果我想構(gòu)建一個 CUDA 內(nèi)核,我會添加一個自定義構(gòu)建規(guī)則,然后顯式定義 nvcc 調(diào)用來構(gòu)建文件.

                  我已遷移到 Win 7 和 VS 2010,因為我真的很想試用 nSight.我安裝了 nSight 1.5.但這就是我完全迷失的地方.如果我像以前一樣繼續(xù),nvcc 報告它只支持 msvc 8.0 &9.0.但該網(wǎng)站明確表示支持VS 2010.

                  我在其他地方讀到我需要安裝 VS 2008 (msvc 9.0)——我的話.現(xiàn)在就這樣做.

                  但我猜我的問題至少有一部分源于本土的定制構(gòu)建工具規(guī)范.幾個 網(wǎng)站談添加*.rules文件到構(gòu)建中,但我收集到這僅適用于 VS 2008.在構(gòu)建自定義"下,我看到 CUDA 3.1 和 3.2,但是當(dāng)我向項目添加內(nèi)核時,它們并沒有構(gòu)建.另一個網(wǎng)站宣稱關(guān)鍵是三個文件:Cuda.props Cuda.xml Cuda.targets,但它沒有說明如何或在哪里添加這些文件——或者更確切地說,我會賭我只是不明白網(wǎng)站上引用的注釋.

                  所以 有誰知道如何在 VS 2010 中創(chuàng)建一個簡單的項目來構(gòu)建 CUDA 內(nèi)核——使用 nSight 1.5 設(shè)置或隨附的 NvCudaRuntimeApi.v3.2.rules 文件CUDA 3.2 RC?

                  提前致謝!我會提供賞金,但我總共只有 65 分.

                  解決方案

                  CUDA TOOLKIT 4.0 及更高版本

                  構(gòu)建自定義文件(安裝到 Program FilesMSBuildMicrosoft.Cppv4.0BuildCustomizations 目錄中)教"Visual Studio 如何編譯和鏈接您的任何 .cu 文件項目到您的應(yīng)用程序.如果您選擇跳過安裝自定義,或者如果您在 CUDA 之后安裝了 VS2010,您可以稍后按照 Program FilesNVIDIA GPU Computing ToolkitCUDAv4.0extrasvisual_studio_integration.

                  • 使用標(biāo)準(zhǔn) MS 向?qū)?chuàng)建一個新項目(例如一個空的控制臺項目)
                  • 在 .c 或 .cpp 文件中實現(xiàn)您的主機(串行)代碼
                  • 添加 NVIDIA 構(gòu)建自定義(右鍵單擊項目,構(gòu)建自定義,勾選相關(guān)的 CUDA 框)
                  • 如果使用 CUDA 4.0,請參閱注釋 1
                  • 在 .cu 文件中實現(xiàn)包裝器和內(nèi)核
                  • 如果您在構(gòu)建自定義之前添加了 .cu 文件,那么您需要將 .cu 文件的類型設(shè)置為 CUDA C/C++(右擊文件,Properties,設(shè)置Item Type)
                  • 添加 CUDA 運行時庫(右鍵單擊項目并選擇 Properties,然后在 Linker -> Input 中添加 cudart.lib附加依賴項)
                  • 然后只需構(gòu)建您的項目,.cu 文件將被編譯為 .obj 并自動添加到鏈接中

                  順便說一句,如果可能的話,我會提倡避免cutil,而是自己進(jìn)行檢查.Cutil 不受 NVIDIA 支持,它只是用來嘗試使 SDK 中的示例專注于實際程序和算法設(shè)計,并避免在每個示例中重復(fù)相同的事情(例如命令行解析).如果您自己編寫,那么您將有更好的控制權(quán),并且會知道發(fā)生了什么.例如,如果函數(shù)失敗,cutilSafeCall 包裝器會調(diào)用 exit() - 真正的應(yīng)用程序(而不是示例)可能應(yīng)該更優(yōu)雅地處理失敗!

                  <小時>

                  注意

                  1. 僅對于 CUDA 4.0,您可能需要將此修復(fù)應(yīng)用到建立自定義.此補丁修復(fù)了以下消息:

                  <塊引用>

                  計算元素中AssemblyFile"屬性的值$(CudaBuildTasksPath)"的結(jié)果"無效

                  Direct Question: How do I create a simple hello world CUDA project within visual studio 2010?

                  Background: I've written CUDA kernels. I'm intimately familiar with the .vcproj files from Visual Studio 2005 -- tweaked several by hand. In VS 2005, if I want to build a CUDA kernel, I add a custom build rule and then explicitly define the nvcc call to build the files.

                  I have migrated to Win 7, and VS 2010 because I really want to try out nSight. I have nSight 1.5 installed. But this is where I'm totally lost. If I proceed as before, nvcc reports that it only supports msvc 8.0 & 9.0. But the website clearly states that it supports VS 2010.

                  I read somewhere else that I need to have VS 2008 (msvc 9.0) also installed -- my word. Doing so now.

                  But I'm guessing that at least part of my problems stem from the homegrown custom build tool specifications. Several websites talk about adding a *.rules file to the build, but I've gathered that this is only applicable to VS 2008. Under "Build Customizations" I see CUDA 3.1 and 3.2, but when I add kernels to the project they aren't built. Another website proclaims that the key is three files: Cuda.props Cuda.xml Cuda.targets, but it doesn't say how or where to add these files -- or rather I'll gamble that I just don't understand the notes referenced in the website.

                  So does anyone know how to create a simple project in VS 2010 which builds a CUDA kernel -- using either the nSight 1.5 setup or the NvCudaRuntimeApi.v3.2.rules file which ships with the CUDA 3.2 RC?

                  Thanks in advance! I'd offer a bounty, but I only have 65 points total.

                  解決方案

                  CUDA TOOLKIT 4.0 and later

                  The build customisations file (installed into the Program FilesMSBuildMicrosoft.Cppv4.0BuildCustomizations directory) "teaches" Visual Studio how to compile and link any .cu files in your project into your application. If you chose to skip installing the customisations, or if you installed VS2010 after CUDA, you can add them later by following the instructions in Program FilesNVIDIA GPU Computing ToolkitCUDAv4.0extrasvisual_studio_integration.

                  • Create a new project using the standard MS wizards (e.g. an empty console project)
                  • Implement your host (serial) code in .c or .cpp files
                  • Add the NVIDIA build customisation (right click on the project, Build customizations, tick the relevant CUDA box)
                  • See note 1 if using CUDA 4.0
                  • Implement your wrappers and kernels in .cu files
                  • If you added .cu files before the build customisations, then you'll need to set the type of the .cu files to CUDA C/C++ (right-click on the file, Properties, set Item Type)
                  • Add the CUDA runtime library (right click on the project and choose Properties, then in Linker -> Input add cudart.lib to the Additional Dependencies)
                  • Then just build your project and the .cu files will be compiled to .obj and added to the link automatically

                  Incidentally I would advocate avoiding cutil if possible, instead roll your own checking. Cutil is not supported by NVIDIA, it's just used to try to keep the examples in the SDK focussed on the actual program and algorithm design and avoid repeating the same things in every example (e.g. command line parsing). If you write your own then you will have much better control and will know what is happening. For example, the cutilSafeCall wrapper calls exit() if the function fails - a real application (as opposed to a sample) should probably handle the failure more elegantly!


                  NOTE

                  1. For CUDA 4.0 only you may need to apply this fix to the build customisations. This patch fixes the following message:

                  The result "" of evaluating the value "$(CudaBuildTasksPath)" of the "AssemblyFile" attribute in the element is not valid

                  這篇關(guān)于如何在 Visual Studio 2010 中啟動 CUDA 應(yīng)用程序?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Why do two functions have the same address?(為什么兩個函數(shù)的地址相同?)
                  Why the initializer of std::function has to be CopyConstructible?(為什么 std::function 的初始化程序必須是可復(fù)制構(gòu)造的?)
                  mixing templates with polymorphism(混合模板與多態(tài)性)
                  When should I use the keyword quot;typenamequot; when using templates(我什么時候應(yīng)該使用關(guān)鍵字“typename?使用模板時)
                  Dependent name resolution amp; namespace std / Standard Library(依賴名稱解析命名空間 std/標(biāo)準(zhǔn)庫)
                  gcc can compile a variadic template while clang cannot(gcc 可以編譯可變參數(shù)模板,而 clang 不能)
                    <tbody id='O56lV'></tbody>

                    <small id='O56lV'></small><noframes id='O56lV'>

                    1. <i id='O56lV'><tr id='O56lV'><dt id='O56lV'><q id='O56lV'><span id='O56lV'><b id='O56lV'><form id='O56lV'><ins id='O56lV'></ins><ul id='O56lV'></ul><sub id='O56lV'></sub></form><legend id='O56lV'></legend><bdo id='O56lV'><pre id='O56lV'><center id='O56lV'></center></pre></bdo></b><th id='O56lV'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='O56lV'><tfoot id='O56lV'></tfoot><dl id='O56lV'><fieldset id='O56lV'></fieldset></dl></div>

                      • <bdo id='O56lV'></bdo><ul id='O56lV'></ul>

                        <legend id='O56lV'><style id='O56lV'><dir id='O56lV'><q id='O56lV'></q></dir></style></legend>

                          • <tfoot id='O56lV'></tfoot>
                            主站蜘蛛池模板: 成人亚洲精品久久久久软件 | 午夜精品一区二区三区三上悠亚 | 日本免费一区二区三区 | 国内91在线 | 欧美成人免费在线视频 | 日本在线中文 | 国产日韩欧美在线 | 日日骚网 | 浮生影院免费观看中文版 | 日本免费一区二区三区 | 999久久久精品 | 国产视频中文字幕 | 久久国产亚洲 | 成人中文字幕在线 | 91视频网 | 精品九九九 | 久免费视频| 天天射中文 | 午夜小影院 | 日韩精品久久久久久 | 亚洲成人毛片 | 97久久超碰 | 国产极品车模吞精高潮呻吟 | 中国毛片免费 | 人人做人人澡人人爽欧美 | 亚洲欧洲国产视频 | 亚洲成人www| 91一区二区三区 | 午夜精品久久久久久不卡欧美一级 | 色综合一区二区三区 | 亚洲国产一区二区三区在线观看 | 国产精品视频一二三区 | 亚洲天堂一区 | 日韩视频在线一区 | 久久精品在线免费视频 | 国产一区二区久久久 | 在线视频中文字幕 | 国产高清一区二区三区 | 久久在线| 久久久久久久国产 | 欧美日韩综合精品 |