-
Notifications
You must be signed in to change notification settings - Fork 130
Remove iostream include for C backend #1400
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
base: main
Are you sure you want to change the base?
Conversation
Why can't we include it and are you sure it's not used? |
We can include it, but at the cost of a discrepancy on Windows between the libgcc v13 and v15 symbols that can lead to #1398. If we remove it, then I think we no longer have to worry about #1398, at least for now. I am not absolutely sure it's unused. How confident are you in the test suite? There's one usage here that's commented out: pytensor/pytensor/tensor/blas.py Line 693 in 7b0a392
|
I couldn’t find any calls to the iostream functions in pytensor. I hope that we aren’t using any symbols from namespaces that are included indirectly by iostream. |
What does that mean? I'm more worried about the underlying breaking change than the specific test we happened to see failing since we don't test extensively on windows. Wonder if we're just sweeping it under the rug. Do we need to invalidate Pytensor cache for windows users for instance? How does including iostream suffice to break compilation? What's special about it vs other standard libraries? |
I don't know enough about C development to know myself. In particular I don't know what type of bug this is: I'm not sure if the DLL is just missing symbols that should be present, or if the symbols were deliberately removed. I also don't understand why there is a mismatch in the versions between the
Someone else (perhaps @lucianopaz) may be able to make more sense of that thread and conda-forge/ctng-compilers-feedstock#174. |
That thread flied way over my head! What I managed to follow from this is that the symbol |
Thanks @lucianopaz for the input!!! The common fix I implemented in both conda-forge/pytensor-suite-feedstock#158 and conda-forge/conda-forge-repodata-patches-feedstock#1024 blocks only Removing the unused If you want to keep |
Description
The
iostream
include seems to be unused, and it's actually leading to #1398, so an alternative resolution is to remove the include.We'll see if the test suite still passes...
Related Issue
ImportError: DLL load failed while importing
whenlibgcc 15.1.0
is installed #1398Checklist
Type of change
📚 Documentation preview 📚: https://pytensor--1400.org.readthedocs.build/en/1400/