Skip to content

Commit c66d74c

Browse files
committed
.IS CVM more stable?
1 parent f4dd305 commit c66d74c

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

pytensor/compile/builders.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,6 @@ def clone(self):
907907
return res
908908

909909
def make_thunk(self, node, storage_map, compute_map, no_recycling, impl=None):
910-
from pytensor.link.c.basic import CLinker
911910
from pytensor.link.vm import VMLinker
912911

913912
fg = self._prepare_fgraph(impl)
@@ -937,14 +936,14 @@ def thunk_without_returns():
937936
return thunk
938937

939938
if impl != "py":
940-
try:
941-
# We default to CLinker because it generates code for the whole graph that the compiler can reason about.
942-
# Whereas the VMLinker will compile each node separately and call them in a pre-defined VM.
943-
# It also has less overhead
944-
return create_thunk(linker=CLinker())
945-
except NotImplementedError:
946-
# Some Op doesn't have a C implementation, VM it is
947-
return create_thunk(linker=VMLinker(use_cloop=True, c_thunks=True))
939+
# try:
940+
# # We default to CLinker because it generates code for the whole graph that the compiler can reason about.
941+
# # Whereas the VMLinker will compile each node separately and call them in a pre-defined VM.
942+
# # It also has less overhead
943+
# return create_thunk(linker=CLinker())
944+
# except NotImplementedError:
945+
# # Some Op doesn't have a C implementation, VM it is
946+
return create_thunk(linker=VMLinker(use_cloop=True, c_thunks=True))
948947
else:
949948
return create_thunk(VMLinker(use_cloop=False, c_thunks=False))
950949

0 commit comments

Comments
 (0)