-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
Description
If these flags are needed for PyMC they are also needed for PyTensor. Doesn't make sense to have them here.
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.