首页 > 解决方案 > python numba 变量 $116setup_with.2 未定义

问题描述

我尝试使用 numba 来使用 cuda 核心,但我遇到了一个错误,我无法解决。另外,我在网上没有找到解决此错误的方法。任何人都可以帮助我吗?

from numba import *
    
@jit()
def gpu():
    a = 2**16
    print('hello!')

gpu()

错误开始:

    .........Python\Python39\lib\site-packages\numba\core\ir.py", line 267, in get
    return self._con[name]
KeyError: '$116setup_with.2'
...

错误结束:

...
    numba.core.errors.NotDefinedError: Failed in object mode pipeline (step: analyzing bytecode)
    [1mThe compiler failed to analyze the bytecode. Variable '$116setup_with.2' is not defined.[0m

标签: pythonnumba

解决方案


推荐阅读