failed to run cuBLAS routine cublasSgemm_v2: CUBLAS_STATUS_EXECUTION_FAILED Blas GEMM launch failed

项目场景:

一个命名实体识别模型,BERT+BiGRU+CRF。


问题描述:

在以前的笔记本上面,显卡2060,python3.7,tensorflow1.13,cuda10.0,cudnn7.4一直运行无错。
把模型弄到台式机上面来,3060显卡,装了python3.7,tensorflw1.13,cuda10.0,cudnn7.4,显示以下错误:

failed to run cuBLAS routine cublasSgemm_v2: CUBLAS_STATUS_EXECUTION_FAILED
Traceback (most recent call last):
在这里插入图片描述
tensorflow.python.framework.errors_impl.InternalError: Blas GEMM launch failed : a.shape=(1536, 2), b.shape=(2, 768), m=1536, n=768, k=2
[[{{node bert/embeddings/MatMul}}]]
[[{{node crf_loss/Mean}}]]
在这里插入图片描述


原因分析:

网上解决方案没用,包括
①:设置显存

import os
os.environ["CUDA_VISIBLE_DEVICES"] = '0' #use GPU with ID=0
config = tf.ConfigProto()
config.gpu_options.per_process_gpu_memory_fraction = 0.5 # maximun alloc gpu50% of MEM
# config.gpu_options.allow_growth = True #allocate dynamically

③显存占用,关闭其他占用显存程序
②重启

解决方案:

原因其实很简单,3060等30系显卡不支持cuda11以下版本,等死吧你

  • 6
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 11
    评论
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

我是狮子搏兔

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值