cuda.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:LIE 作者: EmbraceLife 项目源码 文件源码
def _init(cls):
        if cls._dll is None:
            logger.trace('Loading NVIDIA ML library.')
            try:
                cls._dll = ctypes.CDLL(cls.NVIDIA_ML)
            except OSError:
                raise CudaError('Failed to find NVIDIA ML library.')

        if not cls._ref:
            logger.trace('Initializing NVIDIA ML.')
            init = cls._get_ptr('nvmlInit_v2')
            if init():
                raise CudaError('Failed to initialize NVIDIA ML.')

        cls._ref += 1

    ###########################################################################
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号