2

我正在尝试遵循NumbaPro 快速入门指南,但在遵循说明时出现错误。

这是我的情况:

  • Python 2.7.6
  • cuda编译工具 v5.5.0
  • 康达 3.4.1
  • 加速 1.5.0
  • 视窗 7 专业版
  • 英伟达 GeForce 卡

我的代码:

from numbapro import vectorize, float32
@vectorize([float32(float32, float32)], target=’gpu’)
def sum(a, b):
    return a + bnnn

我收到以下错误:

UnboundLocalError: Local varriable 'CudaSupportError' referenced before assignment

知道如何解决这个问题吗?

4

1 回答 1

0

你的脚本在我的电脑上没问题,我的情况:

  • 加速-1.8
  • cudatoolkit-6
  • numbapro-0.16.0-np19py27_p0
  • numbapro_cudalib-0.1-0

似乎您的 conda 需要更新。尝试:

conda update conda
conda install accelerate

然后再次运行它。

于 2014-11-28T10:53:10.797 回答