Blas xGEMV launch failed : a.shape=[1,2048000,50], b.shape=[1,50,1], m=2048000, n=1, k=50

发布时间 2023-09-12 14:55:39作者: 风和雨滴

Blas xGEMV launch failed : a.shape=[1,2048000,50], b.shape=[1,50,1], m=2048000, n=1, k=50

  • 问题描述:使用tensorflow2运行模型时报错:

    2 root error(s) found.
      (0) Internal:  Blas xGEMV launch failed : a.shape=[1,2048000,50], b.shape=[1,50,1], m=2048000, n=1, k=50
             [[node DIN/attention_layer/dense_2/Tensordot/MatMul (defined at /data/moto/moto_feed_recommendation/src/ranking/DIN/modules.py:28) ]]
             [[assert_greater_equal/Assert/AssertGuard/pivot_f/_3/_125]]
      (1) Internal:  Blas xGEMV launch failed : a.shape=[1,2048000,50], b.shape=[1,50,1], m=2048000, n=1, k=50
             [[node DIN/attention_layer/dense_2/Tensordot/MatMul (defined at /data/moto/moto_feed_recommendation/src/ranking/DIN/modules.py:28) ]]
    0 successful operations.
    0 derived errors ignored. [Op:__inference_train_function_12265]
    

    其中a和b相乘从数据维度来看是没问题的。

  • 解决方案:

    tensorflow-gpu的版本为2.6.0

    cudatoolkit的版本为11.2

    11.2版本的cuda中有bug,将cuda升级一下:

    conda insatll cudnn
    

    其中可以指定cudnn的版本,不指定的话就是最新的(cudnn=8.9, cudatoolkit=11.8)可以解决以上问题。

  • 其他可参考连接: