提交 07bd48db authored 作者: Ricardo Vieira's avatar Ricardo Vieira 提交者: Ricardo Vieira

Conditionally disable caching of `to_tuple` helper due to failure in Python 3.10

上级 c7152952
import sys
from typing import cast from typing import cast
from numba.core.extending import overload from numba.core.extending import overload
...@@ -60,7 +61,10 @@ def numba_funcify_Blockwise(op: BlockwiseWithCoreShape, node, **kwargs): ...@@ -60,7 +61,10 @@ def numba_funcify_Blockwise(op: BlockwiseWithCoreShape, node, **kwargs):
src, src,
"to_tuple", "to_tuple",
global_env={"to_fixed_tuple": to_fixed_tuple}, global_env={"to_fixed_tuple": to_fixed_tuple},
) ),
# cache=True leads to a numba.cloudpickle dump failure in Python 3.10
# May be fine in Python 3.11, but I didn't test. It was fine in 3.12
cache=sys.version_info >= (3, 12),
) )
def blockwise_wrapper(*inputs_and_core_shapes): def blockwise_wrapper(*inputs_and_core_shapes):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论