MCPcopy Create free account
hub / github.com/numpy/numpy / test_flags

Method test_flags

numpy/distutils/tests/test_ccompiler_opt.py:436–473  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

434 raise AssertionError("excepted no exceptions")
435
436 def test_flags(self):
437 self.expect_flags(
438 "sse sse2 vsx vsx2 neon neon_fp16 vx vxe",
439 x86_gcc="-msse -msse2", x86_icc="-msse -msse2",
440 x86_iccw="/arch:SSE2",
441 x86_msvc="/arch:SSE2" if self.march() == "x86" else "",
442 ppc64_gcc= "-mcpu=power8",
443 ppc64_clang="-mcpu=power8",
444 armhf_gcc="-mfpu=neon-fp16 -mfp16-format=ieee",
445 aarch64="",
446 s390x="-mzvector -march=arch12"
447 )
448 # testing normalize -march
449 self.expect_flags(
450 "asimd",
451 aarch64="",
452 armhf_gcc=r"-mfp16-format=ieee -mfpu=neon-fp-armv8 -march=armv8-a\+simd"
453 )
454 self.expect_flags(
455 "asimdhp",
456 aarch64_gcc=r"-march=armv8.2-a\+fp16",
457 armhf_gcc=r"-mfp16-format=ieee -mfpu=neon-fp-armv8 -march=armv8.2-a\+fp16"
458 )
459 self.expect_flags(
460 "asimddp", aarch64_gcc=r"-march=armv8.2-a\+dotprod"
461 )
462 self.expect_flags(
463 # asimdfhm implies asimdhp
464 "asimdfhm", aarch64_gcc=r"-march=armv8.2-a\+fp16\+fp16fml"
465 )
466 self.expect_flags(
467 "asimddp asimdhp asimdfhm",
468 aarch64_gcc=r"-march=armv8.2-a\+dotprod\+fp16\+fp16fml"
469 )
470 self.expect_flags(
471 "vx vxe vxe2",
472 s390x=r"-mzvector -march=arch13"
473 )
474
475 def test_targets_exceptions(self):
476 for targets in (

Callers

nothing calls this directly

Calls 2

expect_flagsMethod · 0.95
marchMethod · 0.95

Tested by

no test coverage detected