Skip to content

Commit

Permalink
Add Accelerate framework blas__ldflags tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lucianopaz committed Oct 30, 2024
1 parent 6132203 commit 656f9d0
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions pytensor/link/c/cmodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -2873,9 +2873,18 @@ def check_libs(
)
except Exception as e:
_logger.debug(e)
try:
# 3. Mac Accelerate framework
_logger.debug("Checking Accelerate framework")
validated_flags = try_blas_flag(["-framework", "Accelerate", "-rpath", rpath])
if validated_flags == "":
raise Exception("Accelerate framework flag failed ")
return validated_flags

Check warning on line 2882 in pytensor/link/c/cmodule.py

View check run for this annotation

Codecov / codecov/patch

pytensor/link/c/cmodule.py#L2882

Added line #L2882 was not covered by tests
except Exception as e:
_logger.debug(e)
try:
_logger.debug("Checking Lapack + blas")
# 3. Try to use LAPACK + BLAS
# 4. Try to use LAPACK + BLAS
return check_libs(
all_libs,
required_libs=["lapack", "blas", "cblas", "m"],
Expand All @@ -2885,7 +2894,7 @@ def check_libs(
except Exception as e:
_logger.debug(e)
try:
# 4. Try to use BLAS alone
# 5. Try to use BLAS alone
_logger.debug("Checking blas alone")
return check_libs(
all_libs,
Expand All @@ -2896,7 +2905,7 @@ def check_libs(
except Exception as e:
_logger.debug(e)
try:
# 5. Try to use openblas
# 6. Try to use openblas
_logger.debug("Checking openblas")
return check_libs(
all_libs,
Expand Down

0 comments on commit 656f9d0

Please sign in to comment.