Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checking for blas flags has a high import cost on the library #1160

Closed
ricardoV94 opened this issue Jan 21, 2025 · 1 comment · Fixed by #1165
Closed

Checking for blas flags has a high import cost on the library #1160

ricardoV94 opened this issue Jan 21, 2025 · 1 comment · Fixed by #1165

Comments

@ricardoV94
Copy link
Member

Description

On my machine, which uses openblas, the check_blas, ultimately triggered in these lines when pytensor is imported:

if not config.blas__ldflags:
_logger.warning("Using NumPy C-API based implementation for BLAS functions.")

Takes 2s out of the total 3s import time. The rest is due to scipy imports:

Image

@ricardoV94
Copy link
Member Author

At the very least we should explain in the docs how to store the computed flags in pytensorrc to avoid doing it after the first time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant