0

我需要使用 numpy 将大小为 25x25、25x60 和 60x60 的三个二维矩阵相乘以得到大小为 25x60 的结果。对于快速乘法,我想使用from numpy.linalg import multi_dot并尝试使用@jit(nopython=True)指令在 GPU 中并行执行它。

但是,在我的程序中,我收到以下 numba 错误。

TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Untyped global name 'multi_dot': cannot determine Numba type of <class 'function'>

当我不使用@jit(nopython=True)函数定义上方的命令时,不会发生此错误,即按顺序对我来说工作正常。

4

0 回答 0