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

Remove custom pytensor flags or move them to pytensor #7520

Open
ricardoV94 opened this issue Oct 2, 2024 · 0 comments
Open

Remove custom pytensor flags or move them to pytensor #7520

ricardoV94 opened this issue Oct 2, 2024 · 0 comments
Labels
needs info Additional information required pytensor

Comments

@ricardoV94
Copy link
Member

If these flags are needed for PyMC they are also needed for PyTensor. Doesn't make sense to have them here.

pymc/pymc/__init__.py

Lines 27 to 46 in 45069a9

def __set_compiler_flags():
# Workarounds for PyTensor compiler problems on various platforms
import pytensor
current = pytensor.config.gcc__cxxflags
augmented = f"{current} -Wno-c++11-narrowing"
# Work around compiler bug in GCC < 8.4 related to structured exception
# handling registers on Windows.
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65782 for details.
# First disable C++ exception handling altogether since it's not needed
# for the C extensions that we generate.
augmented = f"{augmented} -fno-exceptions"
# Now disable the generation of stack unwinding tables.
augmented = f"{augmented} -fno-unwind-tables -fno-asynchronous-unwind-tables"
pytensor.config.gcc__cxxflags = augmented
__set_compiler_flags()

This somehow lead to problems in the CI of pymc-experimental (band-aid in pymc-devs/pytensor#1009) but that's not super relevant for the question here.

@ricardoV94 ricardoV94 added needs info Additional information required pytensor labels Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info Additional information required pytensor
Projects
None yet
Development

No branches or pull requests

1 participant