MCPcopy Create free account
hub / github.com/alibaba/BladeDISC / update_cpu_specific_setting

Function update_cpu_specific_setting

scripts/python/common_setup.py:373–387  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

371 raise RuntimeError("auto_detect_host_cpu failed")
372
373def update_cpu_specific_setting(args):
374 if not hasattr(args, 'x86'):
375 args.x86 = False
376 if not hasattr(args, 'aarch64'):
377 args.aarch64 = False
378 if not hasattr(args, 'enable_mkldnn'):
379 args.enable_mkldnn = False
380 if not hasattr(args, 'cpu_only'):
381 args.cpu_only = False
382 if not hasattr(args, 'target_cpu_arch'):
383 args.target_cpu_arch = ""
384
385 if args.cpu_only:
386 auto_detect_host_cpu(args)
387 args.enable_mkldnn = (args.x86 or args.aarch64)
388
389def get_tf_info(python_executable):
390 output = subprocess.check_output(

Callers 2

parse_argsFunction · 0.90
parse_argsFunction · 0.70

Calls 1

auto_detect_host_cpuFunction · 0.70

Tested by

no test coverage detected