code
stringlengths
3
6.57k
is_sudo()
run_subprocess(['apt-get', 'install', '-y', package])
install_ubuntu_deps(args)
not (args.enable_pybind or args.use_openblas)
is_docker()
install_apt_package("python3")
install_apt_package("libopenblas-dev")
format(str(e)
install_python_deps(numpy_version="")
dep_packages.append('numpy=={}'.format(numpy_version)
dep_packages.append('sympy>=1.1')
dep_packages.append('packaging')
dep_packages.append('cerberus')
install_torch()
check_md5(filename, expected_md5)
os.path.exists(filename)
hashlib.md5()
open(filename, "rb")
f.read(BLOCKSIZE)
len(buf)
hash_md5.update(buf)
f.read(BLOCKSIZE)
hash_md5.hexdigest()
log.info('md5 mismatch, expect %s, got %s' % (expected_md5, hex)
os.remove(filename)
setup_test_data(build_dir, configs)
is_windows()
os.path.join(build_dir, 'models')
os.path.exists('C:\\local\\models')
get_config_build_dir(build_dir, config)
os.makedirs(config_build_dir, exist_ok=True)
os.path.join(config_build_dir, 'models')
os.path.exists('C:\\local\\models')
os.path.exists(src_model_dir)
use_dev_mode(args)
is_macOS()
log.info("Generating CMake build tree")
os.path.join(source_dir, "cmake")
builds. (e.g. onnxuntime_pybind)
use_dev_mode(args)
or (args.use_mklml and (is_macOS()
is_windows()
or (args.ios and is_macOS()
os.path.exists(mpi_home)
os.path.exists(nccl_home)
is_windows()
is_windows()
str(args.android_api)
str(args.android_abi)
is_macOS()
all(needed_args)
zip(arg_names, needed_args)
all(needed_args)
zip(arg_names, needed_args)
glob.glob(args.ios_toolchain_dir + "/bin/*-clang*")
len(compilers)
is_windows()
format(define)
os.getenv('Build_BuildNumber')
os.getenv('Build_SourceVersion')
build_matches.group(2)
build_matches.group(3)
build_matches.group(4)
open(os.path.join(source_dir, 'VERSION_NUMBER')
f.readline()
re.match(r"(\d+)
BuildError("Couldn't read version from VERSION_FILE")
ort_version_matches.group(1)
ort_version_matches.group(2)
format(ort_major)
format(ort_minor)
format(YY)
format(MM, DD)
get_config_build_dir(build_dir, config)
os.makedirs(config_build_dir, exist_ok=True)
os.path.dirname(sys.executable)
config.lower()
format(config)
clean_targets(cmake_path, build_dir, configs)
log.info("Cleaning targets for %s configuration", config)
get_config_build_dir(build_dir, config)
run_subprocess(cmd_args)
build_targets(args, cmake_path, build_dir, configs, parallel, target=None)
log.info("Building targets for %s configuration", config)
get_config_build_dir(build_dir, config)
cmd_args.extend(['--target', target])
str(multiprocessing.cpu_count()
is_windows()
elif (is_macOS()
run_subprocess(cmd_args, env=env)
add_dir_if_exists(directory, dir_list)
os.path.isdir(directory)
dir_list.append(directory)
setup_cuda_vars(args)
os.path.exists(cuda_home)
setup_tensorrt_vars(args)
os.getenv("TENSORRT_HOME")
os.path.exists(tensorrt_home)
format(tensorrt_home, tensorrt_home_valid)
TensorRT (1GB = 1073741824 bytes)