zoukankan      html  css  js  c++  java
  • CUDA与cudatoolkit

    CUDA Toolkit是NVIDIA的CUDA工具包,包含了CUDA的全部工具。

    conda安装的cudatoolkit是CUDA的一个子包,包含了主要的二进制文件。

    一般conda安装的pytorch tensorflow会直接调用conda环境中的包,而如果使用pip安装的tensorflow不会自动接入conda中的cudatoolkit,进而会报

    ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory

    之类的错误。这种时候要么在本地安装CUDA Toolkit,要么在conda中安装对应版本的cudatoolkit,后者需要手动把cudatoolkit的lib路径(在pkgs对应的目录里)加入到LD_LIBRARY_PATH这个环境变量中。

    事实上cudatoolkit并不包含所有的CUDA Toolkit二进制文件,而是分布在了多个包里,比如cudnn cupy,如果有需要还需要进一步安装,并把对应的lib路径也加入到LD_LIBRARY_PATH。

    不然可能会报

    ImportError: libcudnn.5: cannot open shared object file: No such file or directory
    Attempting to fetch value instead of handling error Failed precondition: could not dlopen DSO: libcupti.so.9.0; dlerror: libcupti.so.9.0: cannot open shared object file: No such file or directory

    这类错误。

  • 相关阅读:
    libevent(十)bufferevent 2
    libevent(九)bufferevent
    maven本地库更新失败
    IDEA常用快捷键
    ELASTIC SEARCH 安装
    Hbase建模选择
    ElasticSearch关键概念
    Nginx+tomcat 负载均衡
    MapReduce (MRV1)设计理念与基本架构
    Kafka安装验证及其注意
  • 原文地址:https://www.cnblogs.com/LukeStepByStep/p/14998951.html
Copyright © 2011-2022 走看看