54
54
import numpy as np
55
55
56
56
import pytensor
57
+ import pytensor .link .utils as link_utils
57
58
from pytensor import tensor as at
58
59
from pytensor .compile .builders import construct_nominal_fgraph , infer_shape
59
60
from pytensor .compile .function .pfunc import pfunc
75
76
from pytensor .graph .utils import InconsistencyError , MissingInputError
76
77
from pytensor .link .c .basic import CLinker
77
78
from pytensor .link .c .exceptions import MissingGXX
78
- from pytensor .link .utils import raise_with_op
79
79
from pytensor .printing import op_debug_information
80
80
from pytensor .scan .utils import ScanProfileStats , Validator , forced_replace , safe_new
81
81
from pytensor .tensor .basic import as_tensor_variable
@@ -1627,7 +1627,7 @@ def p(node, inputs, outputs):
1627
1627
if hasattr (self .fn .vm , "position_of_error" ) and hasattr (
1628
1628
self .fn .vm , "thunks"
1629
1629
):
1630
- raise_with_op (
1630
+ link_utils . raise_with_op (
1631
1631
self .fn .maker .fgraph ,
1632
1632
self .fn .vm .nodes [self .fn .vm .position_of_error ],
1633
1633
self .fn .vm .thunks [self .fn .vm .position_of_error ],
@@ -1930,7 +1930,7 @@ def perform(self, node, inputs, output_storage, params=None):
1930
1930
# done by raise_with_op is not implemented in C.
1931
1931
if hasattr (vm , "thunks" ):
1932
1932
# For the CVM
1933
- raise_with_op (
1933
+ link_utils . raise_with_op (
1934
1934
self .fn .maker .fgraph ,
1935
1935
vm .nodes [vm .position_of_error ],
1936
1936
vm .thunks [vm .position_of_error ],
@@ -1940,7 +1940,7 @@ def perform(self, node, inputs, output_storage, params=None):
1940
1940
# We don't have access from python to all the
1941
1941
# temps values So for now, we just don't print
1942
1942
# the extra shapes/strides info
1943
- raise_with_op (
1943
+ link_utils . raise_with_op (
1944
1944
self .fn .maker .fgraph , vm .nodes [vm .position_of_error ]
1945
1945
)
1946
1946
else :
0 commit comments