Return a dictionary of supported CPU features by the platform, and accumulate the rest of undefined options in `conf_features`, the returned dict has same rules and notes in class attribute `conf_features`, also its override any options that been set in 'conf_features
(self)
| 328 | ASIMDFHM = dict(interest=7, implies="ASIMDHP"), |
| 329 | ) |
| 330 | def conf_features_partial(self): |
| 331 | """Return a dictionary of supported CPU features by the platform, |
| 332 | and accumulate the rest of undefined options in `conf_features`, |
| 333 | the returned dict has same rules and notes in |
| 334 | class attribute `conf_features`, also its override |
| 335 | any options that been set in 'conf_features'. |
| 336 | """ |
| 337 | if self.cc_noopt: |
| 338 | # optimization is disabled |
| 339 | return {} |
| 340 | |
| 341 | on_x86 = self.cc_on_x86 or self.cc_on_x64 |
| 342 | is_unix = self.cc_is_gcc or self.cc_is_clang or self.cc_is_fcc |
| 343 | |
| 344 | if on_x86 and is_unix: return dict( |
| 345 | SSE = dict(flags="-msse"), |
| 346 | SSE2 = dict(flags="-msse2"), |
| 347 | SSE3 = dict(flags="-msse3"), |
| 348 | SSSE3 = dict(flags="-mssse3"), |
| 349 | SSE41 = dict(flags="-msse4.1"), |
| 350 | POPCNT = dict(flags="-mpopcnt"), |
| 351 | SSE42 = dict(flags="-msse4.2"), |
| 352 | AVX = dict(flags="-mavx"), |
| 353 | F16C = dict(flags="-mf16c"), |
| 354 | XOP = dict(flags="-mxop"), |
| 355 | FMA4 = dict(flags="-mfma4"), |
| 356 | FMA3 = dict(flags="-mfma"), |
| 357 | AVX2 = dict(flags="-mavx2"), |
| 358 | AVX512F = dict(flags="-mavx512f -mno-mmx"), |
| 359 | AVX512CD = dict(flags="-mavx512cd"), |
| 360 | AVX512_KNL = dict(flags="-mavx512er -mavx512pf"), |
| 361 | AVX512_KNM = dict( |
| 362 | flags="-mavx5124fmaps -mavx5124vnniw -mavx512vpopcntdq" |
| 363 | ), |
| 364 | AVX512_SKX = dict(flags="-mavx512vl -mavx512bw -mavx512dq"), |
| 365 | AVX512_CLX = dict(flags="-mavx512vnni"), |
| 366 | AVX512_CNL = dict(flags="-mavx512ifma -mavx512vbmi"), |
| 367 | AVX512_ICL = dict( |
| 368 | flags="-mavx512vbmi2 -mavx512bitalg -mavx512vpopcntdq" |
| 369 | ), |
| 370 | AVX512_SPR = dict(flags="-mavx512fp16"), |
| 371 | ) |
| 372 | if on_x86 and self.cc_is_icc: return dict( |
| 373 | SSE = dict(flags="-msse"), |
| 374 | SSE2 = dict(flags="-msse2"), |
| 375 | SSE3 = dict(flags="-msse3"), |
| 376 | SSSE3 = dict(flags="-mssse3"), |
| 377 | SSE41 = dict(flags="-msse4.1"), |
| 378 | POPCNT = {}, |
| 379 | SSE42 = dict(flags="-msse4.2"), |
| 380 | AVX = dict(flags="-mavx"), |
| 381 | F16C = {}, |
| 382 | XOP = dict(disable="Intel Compiler doesn't support it"), |
| 383 | FMA4 = dict(disable="Intel Compiler doesn't support it"), |
| 384 | # Intel Compiler doesn't support AVX2 or FMA3 independently |
| 385 | FMA3 = dict( |
| 386 | implies="F16C AVX2", flags="-march=core-avx2" |
| 387 | ), |