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

Function asv_compare_config

runtests.py:560–585  ·  view source on GitHub ↗

Fill the required build options through custom variable 'numpy_build_options' and return the generated config path.

(bench_path, args, h_commits)

Source from the content-addressed store, hash-verified

558 return site_dir, site_dir_noarch
559
560def asv_compare_config(bench_path, args, h_commits):
561 """
562 Fill the required build options through custom variable
563 'numpy_build_options' and return the generated config path.
564 """
565 conf_path = os.path.join(bench_path, "asv_compare.conf.json.tpl")
566 nconf_path = os.path.join(bench_path, "_asv_compare.conf.json")
567
568 # add custom build
569 build = []
570 if args.parallel > 1:
571 build += ["-j", str(args.parallel)]
572 if args.cpu_baseline:
573 build += ["--cpu-baseline", args.cpu_baseline]
574 if args.cpu_dispatch:
575 build += ["--cpu-dispatch", args.cpu_dispatch]
576 if args.disable_optimization:
577 build += ["--disable-optimization"]
578
579 is_cached = asv_substitute_config(conf_path, nconf_path,
580 numpy_build_options = ' '.join([f'\\"{v}\\"' for v in build]),
581 numpy_global_options= ' '.join([f'--global-option=\\"{v}\\"' for v in ["build"] + build])
582 )
583 if not is_cached:
584 asv_clear_cache(bench_path, h_commits)
585 return nconf_path
586
587def asv_clear_cache(bench_path, h_commits, env_dir="env"):
588 """

Callers 1

mainFunction · 0.85

Calls 3

asv_substitute_configFunction · 0.85
asv_clear_cacheFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected