Skip to content

Commit fa6ffb8

Browse files
committed
Always use CVM instead of CLinker due to tests failing
1 parent 99d37ce commit fa6ffb8

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

pytensor/compile/builders.py

+8-9
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,6 @@ def clone(self):
913913
return res
914914

915915
def make_thunk(self, node, storage_map, compute_map, no_recycling, impl=None):
916-
from pytensor.link.c.basic import CLinker
917916
from pytensor.link.vm import VMLinker
918917

919918
fg, _, _ = self._prepare_fgraph(impl)
@@ -935,14 +934,14 @@ def create_thunk(linker):
935934
return thunk
936935

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

0 commit comments

Comments
 (0)