Skip to content

Commit aada5a7

Browse files
committed
Fixup
1 parent 5d64688 commit aada5a7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pytensor/link/c/cmodule.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -2820,31 +2820,31 @@ def check_libs(all_libs, required_libs, extra_compile_flags=None):
28202820
except Exception:
28212821
pass
28222822
try:
2823-
# 3. Try to use openblas
2823+
# 3. Try to use LAPACK + BLAS
28242824
return check_libs(
28252825
all_libs,
2826-
required_libs=["openblas", "gfortran", "gomp", "m"],
2827-
extra_compile_flags=["-fopenmp", f"-Wl,-rpath,{rpath}"]
2828-
if rpath is not None
2829-
else ["-fopenmp"],
2826+
required_libs=["lapack", "blas", "cblas", "m"],
2827+
extra_compile_flags=[f"-Wl,-rpath,{rpath}"] if rpath is not None else [],
28302828
)
28312829
except Exception:
28322830
pass
28332831
try:
2834-
# 4. Try to use LAPACK
2832+
# 4. Try to use BLAS alone
28352833
return check_libs(
28362834
all_libs,
2837-
required_libs=["lapack", "blas", "cblas", "m"],
2835+
required_libs=["blas", "cblas"],
28382836
extra_compile_flags=[f"-Wl,-rpath,{rpath}"] if rpath is not None else [],
28392837
)
28402838
except Exception:
28412839
pass
28422840
try:
2843-
# 5. Try to use blas
2841+
# 5. Try to use openblas
28442842
return check_libs(
28452843
all_libs,
2846-
required_libs=["blas", "cblas"],
2847-
extra_compile_flags=[f"-Wl,-rpath,{rpath}"] if rpath is not None else [],
2844+
required_libs=["openblas", "gfortran", "gomp", "m"],
2845+
extra_compile_flags=["-fopenmp", f"-Wl,-rpath,{rpath}"]
2846+
if rpath is not None
2847+
else ["-fopenmp"],
28482848
)
28492849
except Exception:
28502850
pass

0 commit comments

Comments
 (0)