Installation Guide Windows :: CUDA Toolkit Documentation

文章推薦指數: 80 %
投票人數:10人

CUDA Installation Guide for Microsoft Windows. The installation instructions for the CUDA Toolkit on MS-Windows systems. 1. Introduction. CUDA® ... CUDAToolkit v11.6.1 InstallationGuideWindows 1. Introduction 1.1. SystemRequirements 1.2. x8632-bitSupport 1.3. AboutThisDocument 2. InstallingCUDADevelopmentTools 2.1. VerifyYouHaveaCUDA-CapableGPU 2.2. DownloadtheNVIDIACUDAToolkit 2.3. InstalltheCUDASoftware 2.3.1. UninstallingtheCUDASoftware 2.4. UsingCondatoInstalltheCUDASoftware 2.4.1. CondaOverview 2.4.2. Installation 2.4.3. Uninstallation 2.4.4. InstallingPreviousCUDAReleases 2.5. UseaSuitableDriverModel 2.6. VerifytheInstallation 2.6.1. RunningtheCompiledExamples 3. PipWheels 4. CompilingCUDAPrograms 4.1. CompilingSampleProjects 4.2. SampleProjects 4.3. BuildCustomizationsforNewProjects 4.4. BuildCustomizationsforExistingProjects 5. AdditionalConsiderations SearchResults InstallationGuideWindows (PDF) - v11.6.1 (older) - LastupdatedFebruary22,2022 - SendFeedback CUDAInstallationGuideforMicrosoftWindows TheinstallationinstructionsfortheCUDAToolkitonMS-Windowssystems. 1. Introduction CUDA®isaparallelcomputingplatformandprogrammingmodelinventedbyNVIDIA.Itenablesdramaticincreasesincomputingperformance byharnessingthepowerofthegraphicsprocessingunit(GPU). CUDAwasdevelopedwithseveraldesigngoalsinmind: Provideasmallsetofextensionstostandardprogramminglanguages,likeC,thatenableastraightforwardimplementation ofparallelalgorithms.WithCUDAC/C++,programmerscanfocusonthetaskofparallelizationofthealgorithmsratherthan spendingtimeontheirimplementation. SupportheterogeneouscomputationwhereapplicationsuseboththeCPUandGPU.Serialportionsofapplicationsarerunon theCPU,andparallelportionsareoffloadedtotheGPU.Assuch,CUDAcanbeincrementallyappliedtoexistingapplications. TheCPUandGPUaretreatedasseparatedevicesthathavetheirownmemoryspaces.Thisconfigurationalsoallowssimultaneous computationontheCPUandGPUwithoutcontentionformemoryresources. CUDA-capableGPUshavehundredsofcoresthatcancollectivelyrunthousandsofcomputingthreads.Thesecoreshaveshared resourcesincludingaregisterfileandasharedmemory.Theon-chipsharedmemoryallowsparalleltasksrunningonthese corestosharedatawithoutsendingitoverthesystemmemorybus. ThisguidewillshowyouhowtoinstallandcheckthecorrectoperationoftheCUDAdevelopmenttools. 1.1. SystemRequirements TouseCUDAonyoursystem,youwillneedthefollowinginstalled: ACUDA-capableGPU AsupportedversionofMicrosoftWindows AsupportedversionofMicrosoftVisualStudio TheNVIDIACUDAToolkit(availableathttp://developer.nvidia.com/cuda-downloads) ThenexttwotableslistthecurrentlysupportedWindowsoperatingsystemsandcompilers. Table1.WindowsOperatingSystemSupportinCUDA11.6 OperatingSystem Nativex86_64 Cross(x86_32onx86_64) Windows11 YES NO Windows10 YES NO WindowsServer2022 YES NO WindowsServer2019 YES NO WindowsServer2016 YES NO Table2.WindowsCompilerSupportinCUDA11.6 Compiler* IDE Nativex86_64 Cross(x86_32onx86_64) MSVCVersion193x VisualStudio202217.0 YES YES MSVCVersion192x VisualStudio201916.x YES YES MSVCVersion191x VisualStudio201715.x(RTWandallupdates) YES YES *SupportforVisualStudio2015isdeprecatedinrelease11.1. x86_32supportislimited.Seethex8632-bit Supportsectionfordetails. FormoreinformationonMSVCversions,VisualStudioproductversions,visithttps://dev.to/yumetodo/list-of-mscver-and-mscfullver-8nd. 1.2. x8632-bitSupport NativedevelopmentusingtheCUDAToolkitonx86_32isunsupported.DeploymentandexecutionofCUDAapplicationsonx86_32 isstillsupported,butislimitedtousewithGeForceGPUs. Tocreate32-bitCUDAapplications,usethecross-developmentcapabilitiesoftheCUDAToolkitonx86_64. Supportfordevelopingandrunningx8632-bitapplicationsonx86_64Windowsislimitedtousewith: GeForceGPUs CUDADriver CUDARuntime(cudart) CUDAMathLibrary(math.h) CUDAC++Compiler(nvcc) CUDADevelopmentTools 1.3. AboutThisDocument ThisdocumentisintendedforreadersfamiliarwithMicrosoftWindowsoperatingsystemsandtheMicrosoftVisualStudioenvironment. YoudonotneedpreviousexperiencewithCUDAorexperiencewithparallelcomputation. 2. InstallingCUDADevelopmentTools BasicinstructionscanbefoundintheQuickStartGuide.Readonformoredetailedinstructions. ThesetupofCUDAdevelopmenttoolsonasystemrunningtheappropriateversionof Windowsconsistsofafewsimplesteps: VerifythesystemhasaCUDA-capableGPU. DownloadtheNVIDIACUDAToolkit. InstalltheNVIDIACUDAToolkit. Testthattheinstalledsoftwarerunscorrectlyandcommunicateswiththehardware. 2.1. VerifyYouHaveaCUDA-CapableGPU YoucanverifythatyouhaveaCUDA-capableGPUthroughtheDisplayAdapterssectionintheWindowsDeviceManager.Hereyouwillfindthevendornameandmodelofyourgraphicscard(s).IfyouhaveanNVIDIAcardthatislistedinhttp://developer.nvidia.com/cuda-gpus,thatGPUisCUDA-capable.TheReleaseNotesfortheCUDAToolkitalsocontainalistofsupportedproducts. TheWindowsDeviceManagercanbeopenedviathefollowingsteps: OpenarunwindowfromtheStartMenu Run: control/nameMicrosoft.DeviceManager 2.2. DownloadtheNVIDIACUDAToolkit TheNVIDIACUDAToolkitisavailableathttps://developer.nvidia.com/cuda-downloads.Choosetheplatformyouareusingandoneofthefollowinginstallerformats: NetworkInstaller:Aminimalinstallerwhichlaterdownloadspackagesrequiredforinstallation.Onlythepackagesselected duringtheselectionphaseoftheinstalleraredownloaded.Thisinstallerisusefulforuserswhowanttominimizedownload time. FullInstaller:AninstallerwhichcontainsallthecomponentsoftheCUDAToolkitanddoesnotrequireanyfurtherdownload. Thisinstallerisusefulforsystemswhichlacknetworkaccessandforenterprisedeployment. TheCUDAToolkitinstallstheCUDAdriverandtoolsneededtocreate,buildandruna CUDAapplicationaswellaslibraries,headerfiles,andotherresources. DownloadVerification ThedownloadcanbeverifiedbycomparingtheMD5checksumpostedathttps://developer.download.nvidia.com/compute/cuda/11.6.1/docs/sidebar/md5sum.txtwiththatofthedownloadedfile.Ifeitherofthechecksumsdiffer,thedownloadedfileiscorruptandneedstobedownloaded again. TocalculatetheMD5checksumofthedownloadedfile,followtheinstructionsathttps://support.microsoft.com/kb/889768. 2.3. InstalltheCUDASoftware Beforeinstallingthetoolkit,youshouldreadtheReleaseNotes,astheyprovidedetailsoninstallationandsoftwarefunctionality. Note:ThedriverandtoolkitmustbeinstalledforCUDAtofunction.Ifyouhavenotinstalledastand-alonedriver,installthe driverfromtheNVIDIACUDAToolkit. Note:TheinstallationmayfailifWindowsUpdatestartsaftertheinstallationhasbegun.WaituntilWindowsUpdateiscomplete andthentrytheinstallationagain. GraphicalInstallation InstalltheCUDASoftwarebyexecutingtheCUDAinstallerandfollowingtheon-screenprompts. SilentInstallation Theinstallercanbeexecutedinsilentmodebyexecutingthepackagewiththe-sflag. Additionalparameterscanbepassedwhichwillinstallspecificsubpackagesinsteadofallpackages. Seethetablebelowforalistofallthesubpackagenames. Table3.PossibleSubpackageNames SubpackageName SubpackageDescription ToolkitSubpackages(defaultstoC:\ProgramFiles\NVIDIAGPUComputingToolkit\CUDA\v11.6) cudart_11.6 CUDARuntimelibraries. cuobjdump_11.6 Extractsinformationfromcubinfiles. cupti_11.6 TheCUDAProfilingToolsInterfaceforcreatingprofilingand tracingtoolsthattargetCUDAapplications. cuxxfilt_11.6 TheCUDAcu++filtdemanglertool. demo_suite_11.6 PrebuiltdemoapplicationsusingCUDA. documentation_11.6 CUDAHTMLandPDFdocumentationfilesincludingtheCUDAC++ProgrammingGuide,CUDAC++BestPracticesGuide,CUDAlibrary documentation,etc. memcheck_11.6 Functionalcorrectnesscheckingsuite. nvcc_11.6 CUDAcompiler. nvdisasm_11.6 Extractsinformationfromstandalonecubinfiles. nvml_dev_11.6 NVMLdevelopmentlibrariesandheaders. nvprof_11.6 ToolforcollectingandviewingCUDAapplicationprofilingdatafromthecommand-line. nvprune_11.6 Pruneshostobjectfilesandlibrariestoonlycontaindevicecodeforthespecifiedtargets. nvrtc_11.6nvrtc_dev_11.6 NVRTCruntimelibraries. nvtx_11.6 NVTXonWindows. visual_profiler_11.6 VisualProfiler. sanitizer_11.6 ComputeSanitizerAPI. thrust_11.6 CUDAThrust. cublas_11.6cublas_dev_11.6 cuBLASruntimelibraries. cufft_11.6cufft_dev_11.6 cuFFTruntimelibraries. curand_11.6curand_dev_11.6 cuRANDruntimelibraries. cusolver_11.6cusolver_dev_11.6 cuSOLVERruntimelibraries. cusparse_11.6cusparse_dev_11.6 cuSPARSEruntimelibraries. npp_11.6npp_dev_11.6 NPPruntimelibraries. nvjpeg_11.6nvjpeg_dev_11.6 nvJPEGlibraries. nsight_compute_11.6 NsightCompute. nsight_nvtx_11.6 Olderv1.0versionofNVTX. nsight_systems_11.6 NsightSystems. nsight_vse_11.6 InstallstheNsightVisualStudioEditionplugininall VS. visual_studio_integration_11.6 InstallsCUDAprojectwizardandbuildscustomizationfilesin VS. occupancy_calculator_11.6 InstallstheCUDA_Occupancy_Calculator.xls tool. DriverSubpackages Display.Driver TheNVIDIADisplayDriver.RequiredtorunCUDAapplications. Forexample,toinstallonlythecompileranddrivercomponents: .exe-snvcc_11.6Display.Driver ExtractingandInspectingtheFilesManually Sometimesitmaybedesirabletoextractorinspecttheinstallablefilesdirectly,suchasinenterprisedeployment,orto browsethefilesbeforeinstallation.Thefullinstallationpackagecanbeextractedusingadecompressiontoolwhichsupports theLZMAcompressionmethod,suchas7-ziporWinZip. Onceextracted,theCUDAToolkitfileswillbeintheCUDAToolkit folder,andsimilarilyforCUDAVisualStudioIntegration.Withineachdirectoryis a.dlland.nvifilethatcanbeignoredastheyarenotpartoftheinstallable files. Note:Accessingthefilesinthismannerdoesnotsetupanyenvironmentsettings,suchasvariablesorVisualStudiointegration. Thisisintendedforenterprise-leveldeployment. 2.3.1. UninstallingtheCUDASoftware AllsubpackagescanbeuninstalledthroughtheWindowsControlPanelbyusingtheProgramsandFeatureswidget. 2.4. UsingCondatoInstalltheCUDASoftware ThissectiondescribestheinstallationandconfigurationofCUDAwhenusingtheConda installer.TheCondapackagesareavailableathttps://anaconda.org/nvidia. 2.4.1. CondaOverview TheCondainstallationinstallstheCUDAToolkit.Theinstallationstepsarelisted below. 2.4.2. Installation ToperformabasicinstallofallCUDAToolkitcomponentsusingConda,runthe followingcommand: condainstallcuda-cnvidia 2.4.3. Uninstallation TouninstalltheCUDAToolkitusingConda,runthefollowingcommand:condaremovecuda 2.4.4. InstallingPreviousCUDAReleases AllCondapackagesreleasedunderaspecificCUDAversionarelabeledwiththat releaseversion.Toinstallapreviousversion,includethatlabelinthe installcommandsuchas: condainstallcuda-cnvidia/label/cuda-11.3.0Note:SomeCUDAreleasesdonotmovetonewversionsofallinstallable components.Whenthisisthecasethesecomponentswillbemovedto thenewlabel,andyoumayneedtomodifytheinstallcommandto includebothlabelssuchas: condainstallcuda-cnvidia/label/cuda-11.3.0-cnvidia/label/cuda-11.3.1ThisexamplewillinstallallpackagesreleasedaspartofCUDA11.3.0. 2.5. UseaSuitableDriverModel OnWindows10andlater,theoperatingsystemprovidestwodrivermodels underwhichtheNVIDIADrivermayoperate: TheWDDMdrivermodelisusedfordisplaydevices. TheTeslaComputeCluster(TCC) modeoftheNVIDIADriverisavailablefornon-displaydevicessuchasNVIDIATesla GPUsandtheGeForceGTXTitanGPUs;itusestheWindowsWDMdriver model. TCCisenabledbydefaultonmostrecentNVIDIATeslaGPUs.To checkwhichdrivermodeisinuseand/ortoswitchdrivermodes, usethenvidia-smitoolthatisincludedwith theNVIDIADriverinstallation(seenvidia-smi-h fordetails). Note:KeepinmindthatwhenTCCmodeisenabledforaparticular GPU,thatGPUcannotbeusedasadisplaydevice. Note:NVIDIAGeForceGPUs(excludingGeForceGTXTitanGPUs)donotsupportTCCmode. 2.6. VerifytheInstallation Beforecontinuing,itisimportanttoverifythattheCUDAtoolkitcanfindandcommunicatecorrectlywiththeCUDA-capable hardware.Todothis,youneedtocompileandrunsomeoftheincludedsampleprograms. 2.6.1. RunningtheCompiledExamples TheversionoftheCUDAToolkitcanbecheckedbyrunningnvcc-Vina CommandPromptwindow.YoucandisplayaCommand Promptwindowbygoingto: Start>AllPrograms>Accessories>CommandPrompt CUDASamplesarelocatedinhttps://github.com/nvidia/cuda-samples.Tousethesamples,clonetheproject,buildthesamples,andrunthem usingtheinstructionsontheGithubpage. Toverifyacorrectconfigurationofthehardwareandsoftware,itishighlyrecommendedthat youbuildandrunthedeviceQuerysampleprogram.Thesamplecan bebuiltusingtheprovidedVSsolutionfilesinthedeviceQueryfolder. Thisassumesthatyouusedthedefaultinstallationdirectorystructure.IfCUDAisinstalledandconfiguredcorrectly,the outputshouldlooksimilartoFigure1. Figure1.ValidResultsfromdeviceQueryCUDASample Theexactappearanceandtheoutputlinesmightbedifferentonyoursystem.Theimportantoutcomesarethatadevicewas found,thatthedevice(s)matchwhatisinstalledinyoursystem,andthatthetestpassed. IfaCUDA-capabledeviceandtheCUDADriverareinstalledbutdeviceQueryreportsthatnoCUDA-capabledevicesarepresent,ensurethedeivceanddriverareproperlyinstalled. RunningthebandwidthTestprogram,locatedinthesamedirectoryasdeviceQueryabove,ensuresthatthesystemandtheCUDA-capabledeviceareabletocommunicatecorrectly.Theoutputshouldresemble Figure2. Figure2.ValidResultsfrombandwidthTestCUDASample Thedevicename(secondline)andthebandwidthnumbersvaryfromsystemtosystem.Theimportantitemsarethesecondline, whichconfirmsaCUDAdevicewasfound,andthesecond-to-lastline,whichconfirmsthatallnecessarytestspassed. Ifthetestsdonotpass,makesureyoudohaveaCUDA-capableNVIDIAGPUonyoursystemandmakesureitisproperlyinstalled. ToseeagraphicalrepresentationofwhatCUDAcando,runtheparticles sampleat https://github.com/NVIDIA/cuda-samples/tree/master/Samples/particles 3. PipWheels NVIDIAprovidesPythonWheels forinstallingCUDAthroughpip, primarilyforusingCUDAwithPython.Thesepackagesareintendedforruntimeuseanddo notcurrentlyincludedevelopertools(thesecanbeinstalledseparately). Pleasenotethatwiththisinstallationmethod,CUDAinstallationenvironmentismanaged viapipandadditionalcaremustbetakentosetupyourhostenvironmenttouseCUDA outsidethepipenvironment. Prerequisites ToinstallWheels,youmustfirstinstallthenvidia-pyindexpackage, whichisrequiredinordertosetupyourpipinstallationtofetchadditionalPython modulesfromtheNVIDIANGCPyPIrepo.IfyourpipandsetuptoolsPythonmodulesarenot up-to-date,thenusethefollowingcommandtoupgradethesePythonmodules.Ifthese Pythonmodulesareout-of-datethenthecommandswhichfollowlaterinthissectionmay fail.py-mpipinstall--upgradesetuptoolspipwheelYoushould nowbeabletoinstallthenvidia-pyindex module.py-mpipinstallnvidia-pyindexIfyourprojectisusinga requirements.txtfile,thenyoucanaddthefollowinglinetoyour requirements.txtfileasanalternativetoinstallingthe nvidia-pyindex package:--extra-index-urlhttps://pypi.ngc.nvidia.comProcedure InstalltheCUDAruntimepackage: py-mpipinstallnvidia-cuda-runtime-cu11 Optionally,installadditionalpackagesaslistedbelowusingthefollowing command:py-mpipinstallnvidia- Metapackages Thefollowingmetapackageswillinstallthelatestversionofthenamedcomponenton WindowsfortheindicatedCUDAversion."cu11"shouldbereadas"cuda11". nvidia-cuda-runtime-cu11 nvidia-cuda-cupti-cu11 nvidia-cuda-nvcc-cu11 nvidia-nvml-dev-cu11 nvidia-cuda-nvrtc-cu11 nvidia-nvtx-cu11 nvidia-cuda-sanitizer-api-cu11 nvidia-cublas-cu11 nvidia-cufft-cu11 nvidia-curand-cu11 nvidia-cusolver-cu11 nvidia-cusparse-cu11 nvidia-npp-cu11 nvidia-nvjpeg-cu11 Thesemetapackagesinstallthefollowingpackages: nvidia-nvml-dev-cu114 nvidia-cuda-nvcc-cu114 nvidia-cuda-runtime-cu114 nvidia-cuda-cupti-cu114 nvidia-cublas-cu114 nvidia-cuda-sanitizer-api-cu114 nvidia-nvtx-cu114 nvidia-cuda-nvrtc-cu114 nvidia-npp-cu114 nvidia-cusparse-cu114 nvidia-cusolver-cu114 nvidia-curand-cu114 nvidia-cufft-cu114 nvidia-nvjpeg-cu114 4. CompilingCUDAPrograms TheprojectfilesintheCUDASampleshavebeendesignedtoprovidesimple,one-click buildsoftheprogramsthatincludeallsourcecode.TobuildtheWindowsprojects(for releaseordebugmode),usetheprovided*.slnsolutionfilesfor MicrosoftVisualStudio2015(deprecatedinCUDA11.1),2017,2019,or2022.Youcanuse eitherthesolutionfileslocatedineachoftheexamplesdirectoriesin https://github.com/nvidia/cuda-samples 4.1. CompilingSampleProjects ThebandwidthTestprojectisagoodsampleprojecttobuildandrun.Itis locatedinhttps://github.com/NVIDIA/cuda-samples/tree/master/Samples/bandwidthTest. Ifyouelectedtousethedefaultinstallationlocation,theoutputisplacedinCUDASamples\v11.6\bin\win64\Release.Buildtheprogramusingtheappropriatesolutionfileandruntheexecutable.Ifallworkscorrectly,theoutputshould besimilartoFigure2. 4.2. SampleProjects Thesampleprojectscomeintwoconfigurations:debugandrelease(wherereleasecontainsnodebugginginformation)anddifferent VisualStudioprojects. Afewoftheexampleprojectsrequiresomeadditionalsetup. Thesesampleprojectsalsomakeuseofthe$CUDA_PATHenvironmentvariabletolocatewheretheCUDAToolkitandtheassociated .propsfilesare. TheenvironmentvariableissetautomaticallyusingtheBuildCustomizationCUDA11.6.props file,andisinstalledautomaticallyaspartoftheCUDAToolkitinstallationprocess. Table4.CUDAVisualStudio.propslocations VisualStudio CUDA11.6.propsfileInstallDirectory VisualStudio2015(deprecated) C:\ProgramFiles(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\BuildCustomizations VisualStudio2017 \Common7\IDE\VC\VCTargets\BuildCustomizations VisualStudio2019 C:\ProgramFiles(x86)\MicrosoftVisual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\BuildCustomizations VisualStudio2022 C:\ProgramFiles\MicrosoftVisual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\BuildCustomizations YoucanreferencethisCUDA11.6.propsfilewhenbuildingyourownCUDAapplications. 4.3. BuildCustomizationsforNewProjects WhencreatinganewCUDAapplication,theVisualStudioprojectfilemustbeconfiguredtoincludeCUDAbuildcustomizations. Toaccomplishthis,clickFile->New|Project...NVIDIA->CUDA->,thenselectatemplateforyourCUDAToolkitversion.For example,selectingthe"CUDA11.6Runtime"templatewillconfigureyourprojectforusewiththeCUDA11.6Toolkit.ThenewprojectistechnicallyaC++project(.vcxproj)thatispreconfiguredtouseNVIDIA'sBuildCustomizations. AllstandardcapabilitiesofVisualStudioC++projectswillbeavailable. TospecifyacustomCUDAToolkitlocation,underCUDAC/C++,selectCommon, andsettheCUDAToolkitCustomDirfieldasdesired.Notethattheselected toolkitmustmatchtheversionoftheBuildCustomizations. Note:Asupportedversionof MSVCmustbeinstalledtousethisfeature. 4.4. BuildCustomizationsforExistingProjects WhenaddingCUDAaccelerationtoexistingapplications,therelevantVisualStudio projectfilesmustbeupdatedtoincludeCUDAbuildcustomizations. Thiscanbedoneusingoneofthefollowingtwomethods: OpentheVisualStudioproject,rightclickontheprojectname,andselect BuildDependencies->BuildCustomizations..., thenselecttheCUDAToolkitversionyouwouldliketotarget. Alternatively,youcanconfigureyourprojectalwaystobuildwiththemost recentlyinstalledversionoftheCUDAToolkit.FirstaddaCUDAbuild customizationtoyourprojectasabove.Then,rightclickontheprojectname andselectProperties.UnderCUDA C/C++,selectCommon,andsetthe CUDAToolkitCustomDirfieldto $(CUDA_PATH).Notethatthe$(CUDA_PATH) environmentvariableissetbytheinstaller. WhileOption2willallowyourprojecttoautomaticallyuseanynewCUDAToolkitversion youmayinstallinthefuture,selectingthetoolkitversionexplicitlyasinOption1 isoftenbetterinpractice,becauseiftherearenewCUDAconfigurationoptionsadded tothebuildcustomizationrulesaccompanyingthenewertoolkit,youwouldnotseethose newoptionsusingOption2. Ifyouusethe$(CUDA_PATH)environmentvariabletotargetaversionof theCUDAToolkitforbuilding,andyouperformaninstallationoruninstallationofany versionoftheCUDAToolkit,youshouldvalidatethatthe$(CUDA_PATH) environmentvariablepointstothecorrectinstallationdirectoryoftheCUDAToolkitfor yourpurposes.Youcanaccessthevalueofthe$(CUDA_PATH)environment variableviathefollowingsteps: OpenarunwindowfromtheStartMenu Run:controlsysdm.cpl Selectthe"Advanced"tabatthetopofthewindow Click"EnvironmentVariables"atthebottomofthewindow FileswhichcontainCUDAcodemustbemarkedasaCUDAC/C++file.Thiscandonewhenaddingthefilebyrightclickingtheprojectyouwishtoaddthefileto,selectingAdd\NewItem,selectingNVIDIACUDA11.6\Code\CUDAC/C++File,andthenselectingthefileyouwishtoadd. Noteforadvancedusers:Ifyouwishtotrybuildingyourprojectagainstanewer CUDAToolkitwithoutmakingchangestoanyofyourprojectfiles,gototheVisual Studiocommandprompt,changethecurrentdirectorytothelocationofyour project,andexecuteacommandsuchasthefollowing: msbuild/t:Rebuild/p:CudaToolkitDir="drive:/path/to/new/toolkit/" 5. AdditionalConsiderations NowthatyouhaveCUDA-capablehardwareandtheNVIDIACUDAToolkitinstalled,youcanexamineandenjoythenumerousincluded programs.TobeginusingCUDAtoacceleratetheperformanceofyourownapplications,consulttheCUDA CProgrammingGuide,locatedintheCUDAToolkitdocumentationdirectory. AnumberofhelpfuldevelopmenttoolsareincludedintheCUDAToolkitorareavailablefordownloadfromtheNVIDIADeveloper ZonetoassistyouasyoudevelopyourCUDAprograms,suchasNVIDIA®Nsight™VisualStudioEdition,NVIDIAVisualProfiler,andcuda-memcheck. Fortechnicalsupportonprogrammingquestions,consultandparticipateinthedeveloperforumsathttp://developer.nvidia.com/cuda/. Notices Notice Thisdocumentisprovidedforinformation purposesonlyandshallnotberegardedasawarrantyofa certainfunctionality,condition,orqualityofaproduct. NVIDIACorporation(“NVIDIA”)makesnorepresentationsor warranties,expressedorimplied,astotheaccuracyor completenessoftheinformationcontainedinthisdocument andassumesnoresponsibilityforanyerrorscontained herein.NVIDIAshallhavenoliabilityfortheconsequences oruseofsuchinformationorforanyinfringementof patentsorotherrightsofthirdpartiesthatmayresult fromitsuse.Thisdocumentisnotacommitmenttodevelop, release,ordeliveranyMaterial(definedbelow),code,or functionality. NVIDIAreservestherighttomakecorrections,modifications, enhancements,improvements,andanyotherchangestothis document,atanytimewithoutnotice. Customershouldobtainthelatestrelevantinformationbefore placingordersandshouldverifythatsuchinformationis currentandcomplete. NVIDIAproductsaresoldsubjecttotheNVIDIAstandardtermsand conditionsofsalesuppliedatthetimeoforder acknowledgement,unlessotherwiseagreedinanindividual salesagreementsignedbyauthorizedrepresentativesof NVIDIAandcustomer(“TermsofSale”).NVIDIAhereby expresslyobjectstoapplyinganycustomergeneraltermsand conditionswithregardstothepurchaseoftheNVIDIA productreferencedinthisdocument.Nocontractual obligationsareformedeitherdirectlyorindirectlybythis document. NVIDIAproductsarenotdesigned,authorized,orwarrantedtobe suitableforuseinmedical,military,aircraft,space,or lifesupportequipment,norinapplicationswherefailureor malfunctionoftheNVIDIAproductcanreasonablybeexpected toresultinpersonalinjury,death,orpropertyor environmentaldamage.NVIDIAacceptsnoliabilityfor inclusionand/oruseofNVIDIAproductsinsuchequipmentor applicationsandthereforesuchinclusionand/oruseisat customer’sownrisk. NVIDIAmakesnorepresentationorwarrantythatproductsbasedon thisdocumentwillbesuitableforanyspecifieduse. Testingofallparametersofeachproductisnotnecessarily performedbyNVIDIA.Itiscustomer’ssoleresponsibilityto evaluateanddeterminetheapplicabilityofanyinformation containedinthisdocument,ensuretheproductissuitable andfitfortheapplicationplannedbycustomer,andperform thenecessarytestingfortheapplicationinordertoavoid adefaultoftheapplicationortheproduct.Weaknessesin customer’sproductdesignsmayaffectthequalityand reliabilityoftheNVIDIAproductandmayresultin additionalordifferentconditionsand/orrequirements beyondthosecontainedinthisdocument.NVIDIAacceptsno liabilityrelatedtoanydefault,damage,costs,orproblem whichmaybebasedonorattributableto:(i)theuseofthe NVIDIAproductinanymannerthatiscontrarytothis documentor(ii)customerproductdesigns. Nolicense,eitherexpressedorimplied,isgrantedunderanyNVIDIA patentright,copyright,orotherNVIDIAintellectual propertyrightunderthisdocument.Informationpublishedby NVIDIAregardingthird-partyproductsorservicesdoesnot constitutealicensefromNVIDIAtousesuchproductsor servicesorawarrantyorendorsementthereof.Useofsuch informationmayrequirealicensefromathirdpartyunder thepatentsorotherintellectualpropertyrightsofthe thirdparty,oralicensefromNVIDIAunderthepatentsor otherintellectualpropertyrightsofNVIDIA. Reproductionofinformationinthisdocumentispermissibleonlyif approvedinadvancebyNVIDIAinwriting,reproducedwithout alterationandinfullcompliancewithallapplicableexport lawsandregulations,andaccompaniedbyallassociated conditions,limitations,andnotices. THISDOCUMENTANDALLNVIDIADESIGNSPECIFICATIONS,REFERENCE BOARDS,FILES,DRAWINGS,DIAGNOSTICS,LISTS,ANDOTHER DOCUMENTS(TOGETHERANDSEPARATELY,“MATERIALS”)AREBEING PROVIDED“ASIS.”NVIDIAMAKESNOWARRANTIES,EXPRESSED, IMPLIED,STATUTORY,OROTHERWISEWITHRESPECTTOTHE MATERIALS,ANDEXPRESSLYDISCLAIMSALLIMPLIEDWARRANTIESOF NONINFRINGEMENT,MERCHANTABILITY,ANDFITNESSFORA PARTICULARPURPOSE.TOTHEEXTENTNOTPROHIBITEDBYLAW,IN NOEVENTWILLNVIDIABELIABLEFORANYDAMAGES,INCLUDING WITHOUTLIMITATIONANYDIRECT,INDIRECT,SPECIAL, INCIDENTAL,PUNITIVE,ORCONSEQUENTIALDAMAGES,HOWEVER CAUSEDANDREGARDLESSOFTHETHEORYOFLIABILITY,ARISING OUTOFANYUSEOFTHISDOCUMENT,EVENIFNVIDIAHASBEEN ADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGES.Notwithstanding anydamagesthatcustomermightincurforanyreason whatsoever,NVIDIA’saggregateandcumulativeliability towardscustomerfortheproductsdescribedhereinshallbe limitedinaccordancewiththeTermsofSaleforthe product. OpenCL OpenCLisatrademarkofAppleInc.usedunderlicensetotheKhronosGroupInc. Trademarks NVIDIAandtheNVIDIAlogoaretrademarksorregisteredtrademarksofNVIDIACorporation intheU.S.andothercountries.Othercompanyandproductnamesmaybetrademarksof therespectivecompanieswithwhichtheyareassociated. Copyright ©2009-2022NVIDIACorporation& affiliates.Allrightsreserved. ThisproductincludessoftwaredevelopedbytheSyncroSoftSRL(http://www.sync.ro/).



請為這篇文章評分?