You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Building with ThreadSanitizer (TSan)](#building-with-threadsanitizer-tsan)
23
25
-[Building the documentation](#building-the-documentation)
24
26
-[Serving the documentation](#serving-the-documentation)
@@ -138,6 +140,23 @@ python -m pytest tests
138
140
139
141
8.**Architecture**: The instructions are for x64. For x86 builds, change `-A x64` to `-A Win32`.
140
142
143
+
## Build Options
144
+
145
+
### Disabling FMA (Fused Multiply-Add)
146
+
147
+
On older x86-64 CPUs without FMA support (e.g., Sandy Bridge / x86_64-v2), the SLEEF's `PURECFMA` scalar code path will cause illegal instruction errors. By default, FMA support is auto-detected at build time, but you can explicitly disable it:
148
+
149
+
```bash
150
+
pip install . -Csetup-args=-Ddisable_fma=true
151
+
```
152
+
153
+
This is a workaround for a [SLEEF issue](https://github.com/shibatch/sleef/issues/707) where `PURECFMA` scalar functions are unconditionally compiled with FMA instructions even on systems that don't support them.
154
+
155
+
**When to use this option:**
156
+
- Building on or for x86_64-v2 (Sandy Bridge era) CPUs
157
+
- Cross-compiling for older x86_64 targets
158
+
- Running in emulators/VMs that don't expose FMA capability
159
+
141
160
## Building with ThreadSanitizer (TSan)
142
161
143
162
This is a development feature to help detect threading issues. To build `numpy-quaddtype` with TSan enabled, follow these steps:
0 commit comments