提交 df2ffe4b authored 作者: Ricardo Vieira's avatar Ricardo Vieira 提交者: Ricardo Vieira

Add mode for rewrites needed when executing function in Python mode

上级 4ed8767a
...@@ -262,6 +262,7 @@ optdb.register( ...@@ -262,6 +262,7 @@ optdb.register(
# final pass just to make sure # final pass just to make sure
optdb.register("merge3", MergeOptimizer(), "fast_run", "merge", position=100) optdb.register("merge3", MergeOptimizer(), "fast_run", "merge", position=100)
optdb.register("py_only", EquilibriumDB(), "fast_compile", position=100)
_tags: Union[Tuple[str, str], Tuple] _tags: Union[Tuple[str, str], Tuple]
...@@ -439,11 +440,17 @@ class Mode: ...@@ -439,11 +440,17 @@ class Mode:
# FunctionMaker, the Mode will be taken from this dictionary using the # FunctionMaker, the Mode will be taken from this dictionary using the
# string as the key # string as the key
# Use VM_linker to allow lazy evaluation by default. # Use VM_linker to allow lazy evaluation by default.
FAST_COMPILE = Mode(VMLinker(use_cloop=False, c_thunks=False), "fast_compile") FAST_COMPILE = Mode(
VMLinker(use_cloop=False, c_thunks=False),
RewriteDatabaseQuery(include=["fast_compile", "py_only"]),
)
if config.cxx: if config.cxx:
FAST_RUN = Mode("cvm", "fast_run") FAST_RUN = Mode("cvm", "fast_run")
else: else:
FAST_RUN = Mode("vm", "fast_run") FAST_RUN = Mode(
"vm",
RewriteDatabaseQuery(include=["fast_run", "py_only"]),
)
JAX = Mode( JAX = Mode(
JAXLinker(), JAXLinker(),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论