Skip to content

Commit 52904fa

Browse files
committed
Always use CVM instead of CLinker due to tests failing
1 parent 43744bf commit 52904fa

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
@@ -932,7 +932,6 @@ def prepare_node(
932932
self.fn
933933

934934
def make_thunk(self, node, storage_map, compute_map, no_recycling, impl=None):
935-
from pytensor.link.c.basic import CLinker
936935
from pytensor.link.vm import VMLinker
937936

938937
self.prepare_node(node, storage_map, compute_map, impl)
@@ -963,14 +962,14 @@ def thunk_wrapper(thunk=thunk, node_compute_map=node_compute_map):
963962
return thunk_wrapper
964963

965964
if impl != "py":
966-
try:
967-
# We default to CLinker because it generates code for the whole graph that the compiler can reason about.
968-
# Whereas the VMLinker will compile each node separately and call them in a pre-defined VM.
969-
# It also has less overhead
970-
return create_thunk(linker=CLinker())
971-
except NotImplementedError:
972-
# Some Op doesn't have a C implementation, VM it is
973-
return create_thunk(VMLinker(use_cloop=True, c_thunks=True))
965+
# try:
966+
# # We default to CLinker because it generates code for the whole graph that the compiler can reason about.
967+
# # Whereas the VMLinker will compile each node separately and call them in a pre-defined VM.
968+
# # It also has less overhead
969+
# return create_thunk(linker=CLinker())
970+
# except NotImplementedError:
971+
# # Some Op doesn't have a C implementation, VM it is
972+
return create_thunk(VMLinker(use_cloop=True, c_thunks=True))
974973
else:
975974
return create_thunk(VMLinker(use_cloop=False, c_thunks=False))
976975

0 commit comments

Comments
 (0)