当前位置: 首页 > news >正文

网站查询ip地址wordpress学院主题

网站查询ip地址,wordpress学院主题,wordpress添加统计代码,吉林网络seo文章目录 GPU、NVIDIA Graphics Drivers、CUDA、CUDA Toolkit和cuDNN的关系使用情形判断仅仅使用PyTorch使用torch的第三方子模块 安装NVIDIA Graphics Drivers#xff08;可跳过#xff09;前言Linux法一#xff1a;图形化界面安装#xff08;推荐#xff09;法二#x… 文章目录 GPU、NVIDIA Graphics Drivers、CUDA、CUDA Toolkit和cuDNN的关系使用情形判断仅仅使用PyTorch使用torch的第三方子模块 安装NVIDIA Graphics Drivers可跳过前言Linux法一图形化界面安装推荐法二手动下载文件后命令行安装不推荐 windows法一GeForce Experience自动安装法二手动安装 检验安装 安装CUDA Toolkit查看显卡驱动版本情况LinuxWindows检验安装版本切换LinuxWindows Linux卸载CUDA Toolkit 安装PyTorch查看显卡驱动的CUDA支持版本情况下载pytorch 安装cuDNNLinux法一下载tar压缩包解压推荐法二下载deb包安装不推荐 Windows检验安装 GPU、NVIDIA Graphics Drivers、CUDA、CUDA Toolkit和cuDNN的关系 GPU物理显卡。NVIDIA Graphics Drivers物理显卡驱动。CUDA一种由NVIDIA推出的通用并行计算架构是一种并行计算平台和编程模型该架构使GPU能够解决复杂的计算问题。在安装NVIDIA Graphics Drivers时CUDA已经捆绑安装无需另外安装。CUDA Toolkit包含了CUDA的runtime API、CUDA代码的编译器nvccCUDA也有自己的语言代码需要编译才能执行和debug工具等。简单言之可以将CUDA Toolkit视为开发CUDA程序的工具包。需要自己下载安装。此外在安装CUDA Toolkit时还可以选择是否捆绑安装NVIDIA Graphics Drivers显卡驱动因此就可以简略我们的步骤。cuDNN基于CUDA Toolkit专门针对深度神经网络中的基础操作而设计基于GPU的加速库。需要自己下载安装其实所谓的安装就是移动几个库文件到指定路径。 使用情形判断 仅仅使用PyTorch 在只使用torch的情况下不需要安装CUDA Toolkit和cuDNN只需要显卡驱动conda或者pip会为我们安排好一切。 安装顺序应该是NVIDIA Graphics Drivers-PyTorch 使用torch的第三方子模块 需要安装CUDA Toolkit。 在安装一些基于torch的第三方子模块时譬如tiny-cuda-nn、nvdiffrast、simple-knn。如果没有安装CUDA Toolkittorch/utils/cpp_extension.py会报错如下 File ....../torch/utils/cpp_extension.py, line 1076, in CUDAExtensionlibrary_dirs library_paths(cudaTrue) File ....../torch/utils/cpp_extension.py, line 1203, in library_pathsif (not os.path.exists(_join_cuda_home(lib_dir)) and File ....../torch/utils/cpp_extension.py, line 2416, in _join_cuda_homeraise OSError(CUDA_HOME environment variable is not set. OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.这个报错的意思是找不到CUDA的环境变量路径。这个环境变量是只有安装了CUDA Toolkit之后才会设置的。 这个报错在仅仅使用pytorch时没有影响因为pytorch在安装时已经准备好了一切不需要CUDA环境变量。但是我们现在需要安装其他子模块就必须要解决这个问题了。 对于做深度学习的研究者使用其他子模块是经常会碰到的因此笔者建议直接安装CUDA Toolkit在安装CUDA Toolkit的时候捆绑安装显卡驱动。 因此安装顺序应该是NVIDIA Graphics Drivers可跳过在安装CUDA Toolkit的时候捆绑安装-CUDA Toolkit-PyTorch-cuDNN 安装NVIDIA Graphics Drivers可跳过 前言 在安装CUDA Toolkit的时候可以选择捆绑安装NVIDIA Graphics Drivers显卡驱动。因此这一步完全可以跳过但笔者依旧先写出来。 Linux 法一图形化界面安装推荐 换好源之后更新升级。必须要升级。否则安装的n卡驱动是无法生效的而且下次重启进入Linux之后连图形化界面都不会出现 sudo apt update sudo apt upgrade安装必要依赖。必须要安装gcc、g、cmake。否则安装的n卡驱动是无法生效的而且下次重启进入Linux之后连图形化界面都不会出现 sudo apt install gcc cmake sudo apt install g然后直接下载安装即可 法二手动下载文件后命令行安装不推荐 笔者没有使用过此方法也不推荐此方法。在能用图形化界面的情况下就不要多此一举了。 windows 法一GeForce Experience自动安装 去NVIDIA官网下载GeForce Experience安装好GeForce Experience之后可以在这个应用里面直接下载最新的驱动。 法二手动安装 在同样的页面手动搜索对应型号的显卡驱动下载安装。 检验安装 nvidia-smi如果有类似下面的输出那么NVIDIA Graphics Drivers就已经安装了 Sat Jan 27 14:35:37 2024 ----------------------------------------------------------------------------- | NVIDIA-SMI 525.147.05 Driver Version: 525.147.05 CUDA Version: 12.0 | |--------------------------------------------------------------------------- | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | || | 0 NVIDIA GeForce ... Off | 00000000:01:00.0 On | N/A | | N/A 35C P5 23W / 115W | 1320MiB / 8192MiB | 13% Default | | | | N/A | -------------------------------------------------------------------------------------------------------------------------------------------------------- | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | || | 0 N/A N/A 3719 G /usr/lib/xorg/Xorg 489MiB | | 0 N/A N/A 3889 G /usr/bin/gnome-shell 53MiB | | 0 N/A N/A 4218 CG fantascene-dynamic-wallpaper 406MiB | | 0 N/A N/A 8052 G gnome-control-center 2MiB | | 0 N/A N/A 8397 G ...--variations-seed-version 282MiB | | 0 N/A N/A 13242 G ...RendererForSitePerProcess 59MiB | | 0 N/A N/A 47273 G ...--variations-seed-version 18MiB | -----------------------------------------------------------------------------安装CUDA Toolkit 查看显卡驱动版本情况 CUDA Toolkit对刚刚安装的显卡驱动有版本要求具体可以去此处查询。2024.1查询的关系如下 如果你跳过了安装显卡驱动的步骤那么你就下载一个最新的CUDA Toolkit好了它会捆绑安装适配的显卡驱动。 如果你已经安装了显卡驱动那么可以键入如下指令查询自己的显卡驱动版本 nvidia-smi可以在下面看到我的版本是525.147.05 Sat Jan 27 14:35:37 2024 ----------------------------------------------------------------------------- | NVIDIA-SMI 525.147.05 Driver Version: 525.147.05 CUDA Version: 12.0 | |--------------------------------------------------------------------------- | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | || | 0 NVIDIA GeForce ... Off | 00000000:01:00.0 On | N/A | | N/A 35C P5 23W / 115W | 1320MiB / 8192MiB | 13% Default | | | | N/A | -------------------------------------------------------------------------------------------------------------------------------------------------------- | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | || | 0 N/A N/A 3719 G /usr/lib/xorg/Xorg 489MiB | | 0 N/A N/A 3889 G /usr/bin/gnome-shell 53MiB | | 0 N/A N/A 4218 CG fantascene-dynamic-wallpaper 406MiB | | 0 N/A N/A 8052 G gnome-control-center 2MiB | | 0 N/A N/A 8397 G ...--variations-seed-version 282MiB | | 0 N/A N/A 13242 G ...RendererForSitePerProcess 59MiB | | 0 N/A N/A 47273 G ...--variations-seed-version 18MiB | -----------------------------------------------------------------------------Linux 进入官网选择合适的版本。然后根据自己的设备一步步选择安装即可。 完成选择之后应该有类似界面。根据官网的步骤一步一步来即可。 根据官网步骤可以看到给出了三种安装方式。笔者在安装的时候先尝试了第二种官网步骤如下 wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb sudo dpkg -i cuda-keyring_1.0-1_all.deb sudo apt-get update sudo apt-get -y install cuda然后在第三步报错如下 hanASUS-TUF-Gaming-F15-FX507ZR:~$ sudo apt-get -y install cuda Reading package lists... Done Building dependency tree... Done Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:The following packages have unmet dependencies:libnvidia-common-525 : Conflicts: libnvidia-commonlibnvidia-common-545 : Conflicts: libnvidia-commonnvidia-kernel-common-525 : Conflicts: nvidia-kernel-commonnvidia-kernel-common-545 : Conflicts: nvidia-kernel-common E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.根据提示信息是因为我现在已经有libnvidia-common-525和nvidia-kernel-common-525无法再安装libnvidia-common和nvidia-kernel-common需要更换现有的软件包。理论上这个问题有两个解决方案 替换软件包 sudo apt-get remove libnvidia-common-525 nvidia-kernel-common-525 sudo apt-get install libnvidia-common nvidia-kernel-common放弃apt使用aptitude安装 sudo aptitude install cuda笔者这里都没有尝试而是改成了官网的另外一种安装方式 wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run sudo sh cuda_11.8.0_520.61.05_linux.run执行这个run程序之后会解压一段时间要有一些耐心然后就会有安装引导一路yes之后来到这里 注意点1如果跳过了显卡驱动安装的这里就勾选第一个Driver。笔者已经安装了显卡驱动自然就不用再勾选Driver了。然后安装即可。注意点2如果这里勾选Kernel Objects会导致安装不成功。笔者暂时不清楚原因可能是因为已经安装了显卡驱动的原因。总之这里不要勾选Kernel Objects。 笔者在选择Install之后的安装过程中还出现dkms未安装报错于是sudo apt install dkms再次尝试安装就成功了然后出现 Summary Driver: Not Selected Toolkit: Installed in /usr/local/cuda-11.8/Please make sure that- PATH includes /usr/local/cuda-11.8/bin- LD_LIBRARY_PATH includes /usr/local/cuda-11.8/lib64, or, add /usr/local/cuda-11.8/lib64 to /etc/ld.so.conf and run ldconfig as rootTo uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-11.8/bin ***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 520.00 is required for CUDA 11.8 functionality to work. To install the driver using this installer, run the following command, replacing CudaInstaller with the name of this run file:sudo CudaInstaller.run --silent --driverLogfile is /var/log/cuda-installer.log根据提示我们添加环境变量。请读者根据自己的安装的版本自行修改以下命令的版本号 echo export LD_LIBRARY_PATH/usr/local/cuda-11.8/lib64:\$LD_LIBRARY_PATH ~/.bashrc echo export PATH/usr/local/cuda-11.8/bin:\$PATH ~/.bashrc 然后安装就完成了。 Windows win系统下比较简单进入官网选择合适的版本直接下载exe可执行程序进入引导安装即可。 注意点同样根据自己是否安装过显卡驱动来勾选要不要装显卡驱动。 环境变量会自动设置好不需要手动设置。安装程序会自动添加以下CUDA_PATH_V11_8和CUDA_PATH这2个环境变量 CUDA_PATH_V11_8C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8 CUDA_PATHC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8安装程序还会自动在Path环境变量中添加以下2项 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\libnvvp检验安装 重新打开一个终端查看 nvcc -V应该有如下类似的输出 nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:33:58_PDT_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0版本切换 Linux cuda的软链接位于/usr/local/输入如下命令查看 ls -l /usr/local/应该有类似如下的输出 hanASUS-TUF-Gaming-F15-FX507ZR:~$ ls -l /usr/local/ total 40 lrwxrwxrwx 1 root root 21 1月 27 16:43 cuda - /usr/local/cuda-11.8/ drwxr-xr-x 17 root root 4096 1月 27 16:44 cuda-11.8 drwxr-xr-x 2 root root 4096 8月 9 2022 etc drwxr-xr-x 2 root root 4096 8月 9 2022 games drwxr-xr-x 2 root root 4096 8月 9 2022 include drwxr-xr-x 2 root root 4096 1月 27 16:38 kernelobjects drwxr-xr-x 3 root root 4096 1月 22 15:26 lib lrwxrwxrwx 1 root root 9 1月 22 14:10 man - share/man drwxr-xr-x 3 root root 4096 1月 23 21:52 Qt-5.6.3 drwxr-xr-x 2 root root 4096 8月 9 2022 sbin drwxr-xr-x 8 root root 4096 1月 23 22:09 share drwxr-xr-x 2 root root 4096 8月 9 2022 src可以看到现在的cuda是链接到了我刚刚安装的cuda-11.8.一台设备可以安装不同的CUDA Toolkit版本想要切换版本只需要改变这个软链接即可。 假如我还有一个CUDA Toolkit12.0可以用如下指令切换 ls -snf /usr/local/cuda-12.0/ /usr/local/cudaWindows 修改之前自动添加的CUDA_PATH环境变量到对应目录 CUDA_PATHC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0修改之前自动添加到Path环境变量下的那两个项目 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\bin C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\libnvvpLinux卸载CUDA Toolkit 再次回顾安装完成后的summary Summary Driver: Not Selected Toolkit: Installed in /usr/local/cuda-11.8/Please make sure that- PATH includes /usr/local/cuda-11.8/bin- LD_LIBRARY_PATH includes /usr/local/cuda-11.8/lib64, or, add /usr/local/cuda-11.8/lib64 to /etc/ld.so.conf and run ldconfig as rootTo uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-11.8/bin ***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 520.00 is required for CUDA 11.8 functionality to work. To install the driver using this installer, run the following command, replacing CudaInstaller with the name of this run file:sudo CudaInstaller.run --silent --driverLogfile is /var/log/cuda-installer.log可以知道只需要输入类似的指令自行更改版本号 sudo /usr/local/cuda-11.8/bin/cuda-uninstaller安装PyTorch 查看显卡驱动的CUDA支持版本情况 同样是这个指令 nvidia-smi可以在下面看到我的最大支持的CUDA版本是12.0 Sat Jan 27 14:35:37 2024 ----------------------------------------------------------------------------- | NVIDIA-SMI 525.147.05 Driver Version: 525.147.05 CUDA Version: 12.0 | |--------------------------------------------------------------------------- | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | || | 0 NVIDIA GeForce ... Off | 00000000:01:00.0 On | N/A | | N/A 35C P5 23W / 115W | 1320MiB / 8192MiB | 13% Default | | | | N/A | -------------------------------------------------------------------------------------------------------------------------------------------------------- | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | || | 0 N/A N/A 3719 G /usr/lib/xorg/Xorg 489MiB | | 0 N/A N/A 3889 G /usr/bin/gnome-shell 53MiB | | 0 N/A N/A 4218 CG fantascene-dynamic-wallpaper 406MiB | | 0 N/A N/A 8052 G gnome-control-center 2MiB | | 0 N/A N/A 8397 G ...--variations-seed-version 282MiB | | 0 N/A N/A 13242 G ...RendererForSitePerProcess 59MiB | | 0 N/A N/A 47273 G ...--variations-seed-version 18MiB | -----------------------------------------------------------------------------下载pytorch 打开pytorch的官网输入对应自己设备环境的pytorch安装指令即可。着重注意刚刚安装的显卡驱动的可支持CUDA的最高版本我们选择的pytorch的CUDA版本要低于显卡驱动的可支持CUDA的最高版本。例如我刚刚查询到我的显卡驱动可支持CUDA最高版本为12.0那么我就选择11.8如下图这样 当然也可以选择conda安装。 安装cuDNN cuDNN对已经安装的CUDA版本有要求。进入官网选择合适的版本界面如下 下载即可。安装的官方文档在这里。 Linux 按官方文档先安装依赖 sudo apt-get install zlib1g法一下载tar压缩包解压推荐 下载好之后解压缩 tar -xvf cudnn-linux-*-archive.tar.xz然后复制文件并赋予权限就完成了 sudo cp cudnn-*-archive/include/cudnn*.h /usr/local/cuda/include sudo cp -P cudnn-*-archive/lib/libcudnn* /usr/local/cuda/lib64 sudo chmod ar /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*法二下载deb包安装不推荐 deb包安装反而要复杂一些。 下载好之后dpkg安装一下 sudo dpkg -i cudnn-local-repo-*.deb导入GPG key并更新 sudo apt-get install libcudnn8x.x.x.x-1cudaX.Y这里的x和y根据自己的版本自己调整 再安装几个依赖 sudo apt-get install libcudnn8x.x.x.x-1cudaX.Y sudo apt-get install libcudnn8-devx.x.x.x-1cudaX.Y sudo apt-get install libcudnn8-samplesx.x.x.x-1cudaX.Y这里的x和y也自己的版本略微调整 Windows Windows只有解压缩安装的方式。下载并解压缩好zip文件然后复制库文件如下 复制bin\cudnn*.dll到C:\Program Files\NVIDIA\CUDNN\v8.x\bin。复制include\cudnn*.h到C:\Program Files\NVIDIA\CUDNN\v8.x\include。复制lib\cudnn*.lib到C:\Program Files\NVIDIA\CUDNN\v8.x\lib。 然后修改PATH环境变量在其中添加一个项目 C:\Program Files\NVIDIA\CUDNN\v8.x\bin检验安装 执行/usr/local/cuda/extras/demo_suite/deviceQuery应该有以下类似输出 ./deviceQuery Starting...CUDA Device Query (Runtime API) version (CUDART static linking)Detected 1 CUDA Capable device(s)Device 0: NVIDIA GeForce RTX 3070 Laptop GPUCUDA Driver Version / Runtime Version 12.0 / 11.8CUDA Capability Major/Minor version number: 8.6Total amount of global memory: 7952 MBytes (8337752064 bytes)(40) Multiprocessors, (128) CUDA Cores/MP: 5120 CUDA CoresGPU Max Clock rate: 1560 MHz (1.56 GHz)Memory Clock rate: 7001 MhzMemory Bus Width: 256-bitL2 Cache Size: 4194304 bytesMaximum Texture Dimension Size (x,y,z) 1D(131072), 2D(131072, 65536), 3D(16384, 16384, 16384)Maximum Layered 1D Texture Size, (num) layers 1D(32768), 2048 layersMaximum Layered 2D Texture Size, (num) layers 2D(32768, 32768), 2048 layersTotal amount of constant memory: 65536 bytesTotal amount of shared memory per block: 49152 bytesTotal number of registers available per block: 65536Warp size: 32Maximum number of threads per multiprocessor: 1536Maximum number of threads per block: 1024Max dimension size of a thread block (x,y,z): (1024, 1024, 64)Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535)Maximum memory pitch: 2147483647 bytesTexture alignment: 512 bytesConcurrent copy and kernel execution: Yes with 2 copy engine(s)Run time limit on kernels: YesIntegrated GPU sharing Host Memory: NoSupport host page-locked memory mapping: YesAlignment requirement for Surfaces: YesDevice has ECC support: DisabledDevice supports Unified Addressing (UVA): YesDevice supports Compute Preemption: YesSupports Cooperative Kernel Launch: YesSupports MultiDevice Co-op Kernel Launch: YesDevice PCI Domain ID / Bus ID / location ID: 0 / 1 / 0Compute Mode: Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) deviceQuery, CUDA Driver CUDART, CUDA Driver Version 12.0, CUDA Runtime Version 11.8, NumDevs 1, Device0 NVIDIA GeForce RTX 3070 Laptop GPU Result PASS 执行/usr/local/cuda/extras/demo_suite/bandwidthTest应该有以下类似输出 [CUDA Bandwidth Test] - Starting... Running on...Device 0: NVIDIA GeForce RTX 3070 Laptop GPUQuick ModeHost to Device Bandwidth, 1 Device(s)PINNED Memory TransfersTransfer Size (Bytes) Bandwidth(MB/s)33554432 12499.4Device to Host Bandwidth, 1 Device(s)PINNED Memory TransfersTransfer Size (Bytes) Bandwidth(MB/s)33554432 12843.0Device to Device Bandwidth, 1 Device(s)PINNED Memory TransfersTransfer Size (Bytes) Bandwidth(MB/s)33554432 384586.5Result PASSNOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.
http://www.zqtcl.cn/news/916229/

相关文章:

  • 哪个网站好网站赚钱的方式
  • 班级网站建设开题报告在线音乐网站开发摘要
  • 昆山装饰公司网站建设wordpress olve
  • 重庆哪个区最繁华百度seo排名规则
  • 长春火车站高清图片网站商城微信支付宝支付宝支付接口
  • 市场体系建设司在官方网站支付宝手机网站支付
  • dedecms 模版网站网站图标下载
  • 余姚 做网站北京南站
  • 腾讯建设网站视频视频视频中国建筑信息平台
  • 关于政务网站建设的调查问卷搜狗网页版
  • 网站开发工程师优势宁波seo网站
  • 做网站用什么编程软件php网站中水印怎么做
  • p2网站模板做视频官方网站
  • 网站建设季度考核评价工作php做网站有哪些优点
  • 设计某网站的登录和注册程序凡科建站添加文章
  • wordpress 批量打印wordpress 数据库优化
  • 购物网站开发设计类图网络架构指什么
  • 学校网站建设方法wordpress 调用用户名
  • 深圳创建网站公司哈尔滨全员核酸检测
  • 网站开发实施计划宠物网站 html模板
  • 在线生成手机网站商城网站平台怎么做
  • 深圳专业企业网站制作哪家好写作网站新手
  • 福建泉州曾明军的网站桥梁建设期刊的投稿网站
  • 国内设计网站公司wordpress电视主题下载
  • 自贡网站开发河南省建设网站首页
  • 昆明网站推广优化服务器代理
  • wordpress 网站统计插件福建省建设工程职业注册网站
  • 手机移动端网站是什么上海网站设计服务商
  • 多语言网站建设推广孝感门户网
  • 外贸soho 网站建设旅游电子商务网站建设调查问卷