M4Singer CUDA error: no kernel image is available for execution on the device

news2024/11/15 18:22:58

操作系统Ubuntu 22.04 + 2060 上整合好的M4Singer,拷贝到Ubuntu 22.04 + 4060ti16G上运行报错

Traceback (most recent call last):
  File "data_gen/tts/bin/binarize.py", line 20, in <module>
    binarize()
  File "data_gen/tts/bin/binarize.py", line 15, in binarize
    binarizer_cls().process()
  File "/home/yeqiang/下载/ai/M4Singer/code/data_gen/singing/binarize.py", line 98, in process
    self.process_data('valid')
  File "/home/yeqiang/下载/ai/M4Singer/code/data_gen/tts/base_binarizer.py", line 131, in process_data
    voice_encoder = VoiceEncoder().cuda()
  File "/home/yeqiang/下载/ai/M4Singer/code/venv3712/lib/python3.7/site-packages/resemblyzer/voice_encoder.py", line 40, in __init__
    self.to(device)
  File "/home/yeqiang/下载/ai/M4Singer/code/venv3712/lib/python3.7/site-packages/torch/nn/modules/module.py", line 607, in to
    return self._apply(convert)
  File "/home/yeqiang/下载/ai/M4Singer/code/venv3712/lib/python3.7/site-packages/torch/nn/modules/module.py", line 354, in _apply
    module._apply(fn)
  File "/home/yeqiang/下载/ai/M4Singer/code/venv3712/lib/python3.7/site-packages/torch/nn/modules/rnn.py", line 161, in _apply
    self.flatten_parameters()
  File "/home/yeqiang/下载/ai/M4Singer/code/venv3712/lib/python3.7/site-packages/torch/nn/modules/rnn.py", line 151, in flatten_parameters
    self.batch_first, bool(self.bidirectional))
RuntimeError: CUDA error: no kernel image is available for execution on the device
 

单独测试torch

$ python
Python 3.7.12 | packaged by conda-forge | (default, Oct 26 2021, 06:08:21) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_avaliable()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'torch.cuda' has no attribute 'is_avaliable'
>>> torch.cuda.is_available()
True
>>> torch.zeros(1).cuda()
/home/yeqiang/下载/ai/M4Singer/code/venv3712/lib/python3.7/site-packages/torch/cuda/__init__.py:125: UserWarning: 
NVIDIA GeForce RTX 4060 Ti with CUDA capability sm_89 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70 sm_75.
If you want to use the NVIDIA GeForce RTX 4060 Ti GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

  warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/yeqiang/下载/ai/M4Singer/code/venv3712/lib/python3.7/site-packages/torch/tensor.py", line 153, in __repr__
    return torch._tensor_str._str(self)
  File "/home/yeqiang/下载/ai/M4Singer/code/venv3712/lib/python3.7/site-packages/torch/_tensor_str.py", line 371, in _str
    return _str_intern(self)
  File "/home/yeqiang/下载/ai/M4Singer/code/venv3712/lib/python3.7/site-packages/torch/_tensor_str.py", line 351, in _str_intern
    tensor_str = _tensor_str(self, indent)
  File "/home/yeqiang/下载/ai/M4Singer/code/venv3712/lib/python3.7/site-packages/torch/_tensor_str.py", line 241, in _tensor_str
    formatter = _Formatter(get_summarized_data(self) if summarize else self)
  File "/home/yeqiang/下载/ai/M4Singer/code/venv3712/lib/python3.7/site-packages/torch/_tensor_str.py", line 89, in __init__
    nonzero_finite_vals = torch.masked_select(tensor_view, torch.isfinite(tensor_view) & tensor_view.ne(0))
RuntimeError: CUDA error: no kernel image is available for execution on the device
 

2060主机正常

$ python
Python 3.7.12 | packaged by conda-forge | (default, Oct 26 2021, 06:08:21) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
True
>>> torch.zeros(1).cuda()
tensor([0.], device='cuda:0')
>>> 
 

尝试安装nvidia-cuda-toolkit(2060主机未安装这个包)

apt install nvidia-cuda-toolkit

故障依旧,于此无关?

尝试升级torch

采用aliyun源

(venv3712) (python3.7.12) yeqiang@yeqiang-Default-string:~/Downloads/ai/M4Singer/code$ pip install --upgrade torch
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Collecting torch
  Downloading http://mirrors.aliyun.com/pypi/packages/00/86/77a9eddbf46f1bca2468d16a401911f58917f95b63402d6a7a4522521e5d/torch-1.13.1-cp37-cp37m-manylinux1_x86_64.whl (887.5 MB)
     |████████████████████████████████| 887.5 MB 3.2 MB/s 
Collecting nvidia-cublas-cu11==11.10.3.66; platform_system == "Linux"
  Downloading http://mirrors.aliyun.com/pypi/packages/ce/41/fdeb62b5437996e841d83d7d2714ca75b886547ee8017ee2fe6ea409d983/nvidia_cublas_cu11-11.10.3.66-py3-none-manylinux1_x86_64.whl (317.1 MB)
     |████████████████████████████████| 317.1 MB 2.7 MB/s 
Collecting nvidia-cudnn-cu11==8.5.0.96; platform_system == "Linux"
  Downloading http://mirrors.aliyun.com/pypi/packages/dc/30/66d4347d6e864334da5bb1c7571305e501dcb11b9155971421bb7bb5315f/nvidia_cudnn_cu11-8.5.0.96-2-py3-none-manylinux1_x86_64.whl (557.1 MB)
     |████████████████████████████████| 557.1 MB 3.2 MB/s 
Requirement already satisfied, skipping upgrade: typing-extensions in ./venv3712/lib/python3.7/site-packages (from torch) (4.7.1)
Collecting nvidia-cuda-nvrtc-cu11==11.7.99; platform_system == "Linux"
  Downloading http://mirrors.aliyun.com/pypi/packages/ef/25/922c5996aada6611b79b53985af7999fc629aee1d5d001b6a22431e18fec/nvidia_cuda_nvrtc_cu11-11.7.99-2-py3-none-manylinux1_x86_64.whl (21.0 MB)
     |████████████████████████████████| 21.0 MB 3.6 MB/s 
Collecting nvidia-cuda-runtime-cu11==11.7.99; platform_system == "Linux"
  Downloading http://mirrors.aliyun.com/pypi/packages/36/92/89cf558b514125d2ebd8344dd2f0533404b416486ff681d5434a5832a019/nvidia_cuda_runtime_cu11-11.7.99-py3-none-manylinux1_x86_64.whl (849 kB)
     |████████████████████████████████| 849 kB 4.1 MB/s 
Requirement already satisfied, skipping upgrade: wheel in ./venv3712/lib/python3.7/site-packages (from nvidia-cublas-cu11==11.10.3.66; platform_system == "Linux"->torch) (0.41.2)
Requirement already satisfied, skipping upgrade: setuptools in ./venv3712/lib/python3.7/site-packages (from nvidia-cublas-cu11==11.10.3.66; platform_system == "Linux"->torch) (47.1.0)
ERROR: torchvision 0.7.0 has requirement torch==1.6.0, but you'll have torch 1.13.1 which is incompatible.
ERROR: torchaudio 0.6.0 has requirement torch==1.6.0, but you'll have torch 1.13.1 which is incompatible.
Installing collected packages: nvidia-cublas-cu11, nvidia-cudnn-cu11, nvidia-cuda-nvrtc-cu11, nvidia-cuda-runtime-cu11, torch
  Attempting uninstall: torch
    Found existing installation: torch 1.6.0
    Uninstalling torch-1.6.0:
      Successfully uninstalled torch-1.6.0
Successfully installed nvidia-cublas-cu11-11.10.3.66 nvidia-cuda-nvrtc-cu11-11.7.99 nvidia-cuda-runtime-cu11-11.7.99 nvidia-cudnn-cu11-8.5.0.96 torch-1.13.1
WARNING: You are using pip version 20.1.1; however, version 23.2.1 is available.
You should consider upgrading via the '/home/yeqiang/下载/ai/M4Singer/code/venv3712/bin/python3 -m pip install --upgrade pip' command.
(venv3712) (python3.7.12) yeqiang@yeqiang-Default-string:~/Downloads/ai/M4Singer/code$ pip install --upgrade torch torchvision torchaudio
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Requirement already up-to-date: torch in ./venv3712/lib/python3.7/site-packages (1.13.1)
Collecting torchvision
  Downloading http://mirrors.aliyun.com/pypi/packages/8a/88/e83d51deb96de0847884fddb82ac0958fdc06f814c846878489aa5857a91/torchvision-0.14.1-cp37-cp37m-manylinux1_x86_64.whl (24.2 MB)
     |████████████████████████████████| 24.2 MB 2.0 MB/s 
Collecting torchaudio
  Downloading http://mirrors.aliyun.com/pypi/packages/f6/d4/5e898f626c73f5e9a2ae15be92186e2bb090fa7441c5c00f45549a8cb13d/torchaudio-0.13.1-cp37-cp37m-manylinux1_x86_64.whl (4.2 MB)
     |████████████████████████████████| 4.2 MB 2.2 MB/s 
Requirement already satisfied, skipping upgrade: nvidia-cublas-cu11==11.10.3.66; platform_system == "Linux" in ./venv3712/lib/python3.7/site-packages (from torch) (11.10.3.66)
Requirement already satisfied, skipping upgrade: typing-extensions in ./venv3712/lib/python3.7/site-packages (from torch) (4.7.1)
Requirement already satisfied, skipping upgrade: nvidia-cudnn-cu11==8.5.0.96; platform_system == "Linux" in ./venv3712/lib/python3.7/site-packages (from torch) (8.5.0.96)
Requirement already satisfied, skipping upgrade: nvidia-cuda-nvrtc-cu11==11.7.99; platform_system == "Linux" in ./venv3712/lib/python3.7/site-packages (from torch) (11.7.99)
Requirement already satisfied, skipping upgrade: nvidia-cuda-runtime-cu11==11.7.99; platform_system == "Linux" in ./venv3712/lib/python3.7/site-packages (from torch) (11.7.99)
Requirement already satisfied, skipping upgrade: requests in ./venv3712/lib/python3.7/site-packages (from torchvision) (2.25.1)
Requirement already satisfied, skipping upgrade: pillow!=8.3.*,>=5.3.0 in ./venv3712/lib/python3.7/site-packages (from torchvision) (8.0.1)
Requirement already satisfied, skipping upgrade: numpy in ./venv3712/lib/python3.7/site-packages (from torchvision) (1.19.4)
Requirement already satisfied, skipping upgrade: setuptools in ./venv3712/lib/python3.7/site-packages (from nvidia-cublas-cu11==11.10.3.66; platform_system == "Linux"->torch) (47.1.0)
Requirement already satisfied, skipping upgrade: wheel in ./venv3712/lib/python3.7/site-packages (from nvidia-cublas-cu11==11.10.3.66; platform_system == "Linux"->torch) (0.41.2)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in ./venv3712/lib/python3.7/site-packages (from requests->torchvision) (2020.12.5)
Requirement already satisfied, skipping upgrade: urllib3<1.27,>=1.21.1 in ./venv3712/lib/python3.7/site-packages (from requests->torchvision) (1.26.2)
Requirement already satisfied, skipping upgrade: idna<3,>=2.5 in ./venv3712/lib/python3.7/site-packages (from requests->torchvision) (2.10)
Requirement already satisfied, skipping upgrade: chardet<5,>=3.0.2 in ./venv3712/lib/python3.7/site-packages (from requests->torchvision) (4.0.0)
Installing collected packages: torchvision, torchaudio
  Attempting uninstall: torchvision
    Found existing installation: torchvision 0.7.0
    Uninstalling torchvision-0.7.0:
      Successfully uninstalled torchvision-0.7.0
  Attempting uninstall: torchaudio
    Found existing installation: torchaudio 0.6.0
    Uninstalling torchaudio-0.6.0:
      Successfully uninstalled torchaudio-0.6.0
Successfully installed torchaudio-0.13.1 torchvision-0.14.1
WARNING: You are using pip version 20.1.1; however, version 23.2.1 is available.
You should consider upgrading via the '/home/yeqiang/下载/ai/M4Singer/code/venv3712/bin/python3 -m pip install --upgrade pip' command.
 

跑起来了

参考资料

CUDA Toolkit Archive | NVIDIA Developer

深度学习RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling `cublasSgemm( handle, opa,-CSDN博客

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1074855.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

UDP协议(UDP协议特点 UDP的报文格式 UDP的服务端和客户端代码(简单的步骤))

目录 端口号 UDP协议 UDP协议特点 UDP 无连接 UDP 面向数据报 UDP 全双工 UDP 的报文格式 什么是校验和&#xff1f; 如何基于校验和来完成数据校验呢&#xff1f; CRC算法&#xff08;循环冗余算法&#xff09; MD5算法/SHA算法&#xff08;这里只介绍MD5算…

智能AI创作系统ChatGPT详细搭建教程/AI绘画系统/支持GPT联网提问/支持Prompt应用/支持国内AI模型

一、智能AI创作系统 SparkAi创作系统是基于OpenAI很火的ChatGPT进行开发的Ai智能问答系统&#xff0c;支持OpenAI GPT全模型国内AI全模型。本期针对源码系统整体测试下来非常完美&#xff0c;可以说SparkAi是目前国内一款的ChatGPT对接OpenAI软件系统。那么如何搭建部署AI创作…

JavaScript Web APIs第五天笔记

Web APIs - 第5天笔记 目标&#xff1a; 能够利用JS操作浏览器,具备利用本地存储实现学生就业表的能力 BOM操作综合案例 js组成 JavaScript的组成 ECMAScript: 规定了js基础语法核心知识。比如&#xff1a;变量、分支语句、循环语句、对象等等 Web APIs : DOM 文档对象模型&…

ElementUI--数据表格增删改查与表单验证

一、CRUD实现 1.1 后台CRUD编写 package com.zking.ssm.controller;import com.zking.ssm.model.Book; import com.zking.ssm.service.IBookService; import com.zking.ssm.util.JsonResponseBody; import com.zking.ssm.util.PageBean; import com.zking.ssm.vo.BookFileVo;…

arm 点灯实验代码以及现象(c语言版本)

.led.h #ifndef __LED_H__ #define __LED_H__ //构建寄存器组织结构体 typedef struct {unsigned int moder; unsigned int otyper; unsigned int ospeedr;unsigned int pupdr;unsigned int idr;unsigned int odr; }gpio_t;#define GPIOE (*(gpio_t*)0x50006000) #define G…

全图化在线系统设计

Pillars是什么 Pillars是一个Serverless全图化业务托管平台。Pillars应用全图化开发模型,提供丰富的运行时组件,支持CI/CD全生命周期项目管理,具备主动式资源优化能力。 Pillars解决什么问题 当前广告系统架构采用分布式微服务的设计理念,通过服务分治实现各组织间开发、…

java基础 API Calendar类

Calendar日历类 &#xff1a; package daysreplace;import com.sun.jdi.IntegerValue;import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Arrays; import java.util.Calendar; import java.util.Date;public class Test {public static v…

关于AAPT2 error: check logs for details 的问题分析定位与排查解决方法

关于AAPT2 error: check logs for details 的问题分析定位与排查解决方法 现象描述1、排查2、定位3、解决 现象描述 在android studio的项目开发过程中&#xff0c;经常会遇到关于AAPT2 error: check logs for details 这种类似的问题。一般都是jar包冲突导致的&#xff0c;尤其…

无声的世界,精神科用药并结合临床的一些分析及笔记(四)

目录 关于镇静催眠药 第二代与第三代药物的主要区别 第二代镇静催眠药物 如何简单的识别 适用性 第三代镇静催眠药物 如何简单的识别 适用性 关于成瘾性 为什么会变胖&#xff1f; “开源” “节流” 哪种催眠药“劲儿”大? 第二代 BZDs 第三代 non-BZDs 用药…

【数据结构】算法效率的度量方法

&#x1f984;个人主页:修修修也 &#x1f38f;所属专栏:数据结构 ⚙️操作环境:Visual Studio 2022 目录 &#x1f38f;事后统计方法 &#x1f38f;事前分析估算方法 &#x1f38f;函数的渐进式增长 结语 在上篇文章中我们提到了算法的设计要求中我们要尽量满足时间效率高…

Zabbix第二部分:基于Proxy分布式部署实现Web监控和Zabbix HA集群的搭建

代理和高可用 一、基于zabbix-proxy的分布式监控1.1 分布式监控的作用1.2 数据流向1.3 构成组件 二、部署zabbix代理服务器Step1 前置准备Step2 设置 zabbix 的下载源&#xff0c;安装 zabbix-proxyStep3 部署数据库并将zabbix相关文件导入Step4 修改zabbix-proxy的配置文件&am…

【NLTK系列01】:nltk库介绍

一、说明 NLTK是个啥&#xff1f;它是个复杂的应用库&#xff0c;可以实现基本预料库操作&#xff0c;比如&#xff0c;、将文章分词成独立token&#xff0c;等操作。从词统计、标记化、词干提取、词性标记&#xff0c;停用词收集&#xff0c;包括语义索引和依赖关系解析等。 …

ntlm哈希传递

哈希传递就是ntlm哈希 概念 早期SMB协议铭⽂在⽹络上传输数据&#xff0c;后来诞⽣了LM验证机制&#xff0c;LM机制由于过于简 单&#xff0c;微软提出了WindowsNT挑战/响应机制&#xff0c;这就是NTLM LM NTLM 哈希传递攻击是针对相同密码的用户认证直接发起攻击&#xff0c…

Flex 布局中避免子元素高度被撑高

Flex 布局中避免子元素高度被撑高 Flex 布局中子元素高度容易被最高元素撑高&#xff0c;使用 align-self 可避免。 之前&#xff1a; 之后&#xff1a; /* 此处是居中对齐&#xff0c;也可使用 flex-start 顶部对齐 */ align-self: center;

SuperMap iServer 影像服务自动守护能力

作者&#xff1a;Carlo 目录 一、监控目录能力1、影像服务创建后&#xff0c;在添加影像集合时配置自动追加2、配置集合基本信息3、开启自动追加4、效果展示 二、静默切片支持计划任务1、配置影像集合静默切片任务2、配置瓦片方案3、配置静默切片计划任务4、效果展示 背景&…

leetCode 15.三数之和 双指针解法

给你一个整数数组 nums &#xff0c;判断是否存在三元组 [nums[i], nums[j], nums[k]] 满足 i ! j、i ! k 且 j ! k &#xff0c;同时还满足 nums[i] nums[j] nums[k] 0 。请你返回所有和为 0 且不重复的三元组。 注意&#xff1a;答案中不可以包含重复的三元组。 示例 1&…

日常学习记录随笔-大数据之日志(hadoop)收集实战

数据收集(nginx)--->数据分析---> 数据清洗--->数据聚合计算---数据展示 可能涉及到zabix 做任务调度我们的项目 电商日志分析 比如说我们现在有一个系统,我们的数仓建立也要有一个主题 我这个项目是什么我要干什么定义方向 对用户进行分析,用户信息 要懂整个数据的流…

【c++】new一个新数组时数组地址变化的现象

若new生成数组的时候&#xff0c;无论每一行的行数组大小是否相同&#xff0c;其一维指针与实际元素存放的地址完全不同。 #include<iostream> using namespace std;int main(void) {int** dp new int* [5 1];for (int i 0; i < 5; i) {dp[i] new int[i];//初始化…

java基础API date日期

package daysreplace; import com.sun.jdi.IntegerValue;import java.text.SimpleDateFormat; import java.util.Arrays; import java.util.Date;public class Test {public static void main(String[] args) {Date date new Date();System.out.println(date);//输出不为内存地…

乐鑫 ESP-Mesh-Lite在windows下的开发环境搭建(二)

上一篇文章的只能在例程文件夹内进行编译&#xff0c;一旦将示例程序复制到其他文件夹&#xff0c;清理后再编译时会出现编译错误。今天发现了一种的开发环境部署方法&#xff0c;实际上esp-mesh-lite文件夹里就有介绍&#xff0c;只是我还不熟悉IDF的操作&#xff0c;到今天才…