code
stringlengths
3
6.57k
setup_migraphx_vars(args)
if (args.use_migraphx)
print("migraphx_home = {}".format(args.migraphx_home)
os.getenv("MIGRAPHX_HOME")
os.path.exists(migraphx_home)
if (migraphx_home_not_valid)
format(migraphx_home, migraphx_home_not_valid)
setup_dml_build(args, cmake_path, build_dir, configs)
get_config_build_dir(build_dir, config)
run_subprocess(cmd_args)
adb_push(src, dest, **kwargs)
run_subprocess(['adb', 'push', src, dest], **kwargs)
adb_shell(*args, **kwargs)
run_subprocess(['adb', 'shell', *args], **kwargs)
run_android_tests(args, source_dir, config, cwd)
adb_push('testdata', '/data/local/tmp/', cwd=cwd)
os.path.join(source_dir, 'cmake', 'external', 'onnx', 'onnx', 'backend', 'test')
adb_push('onnxruntime_test_all', '/data/local/tmp/', cwd=cwd)
adb_push('onnx_test_runner', '/data/local/tmp/', cwd=cwd)
adb_shell('cd /data/local/tmp && /data/local/tmp/onnxruntime_test_all')
adb_shell('cd /data/local/tmp && /data/local/tmp/onnx_test_runner -e nnapi /data/local/tmp/test')
adb_shell('cd /data/local/tmp && /data/local/tmp/onnx_test_runner /data/local/tmp/test')
adb_push('libonnxruntime.so', '/data/local/tmp/', cwd=cwd)
adb_push('onnxruntime_shared_lib_test', '/data/local/tmp/', cwd=cwd)
os.path.getsize(os.path.join(cwd, 'libonnxruntime.so')
log.info('Android arm64 minsizerel libonnxruntime.so size [' + str(bin_actual_size)
open(os.path.join(cwd, 'binary_size_data.txt')
str(bin_actual_size)
BuildError('Android arm64 minsizerel libonnxruntime.so size [' + str(bin_actual_size)
str(bin_size_threshold)
run_ios_tests(args, source_dir, config, cwd)
SE (2nd generation)
SE (2nd generation)
cpr.check_returncode()
run_orttraining_test_orttrainer_frontend_separately(cwd)
__init__(self)
set()
pytest_collection_modifyitems(self, items)
print('item.name: ', item.name)
test_name.find('[')
self.collected.add(test_name)
TestNameCollecterPlugin()
os.path.join(cwd, "orttraining_test_orttrainer_frontend.py")
pytest.main(['--collect-only', test_script_filename], plugins=[plugin])
run_training_python_frontend_tests(cwd)
run_subprocess([sys.executable, 'onnxruntime_test_ort_trainer.py'], cwd=cwd)
run_subprocess([sys.executable, 'onnxruntime_test_training_unit_tests.py'], cwd=cwd)
run_orttraining_test_orttrainer_frontend_separately(cwd)
run_subprocess([sys.executable, '-m', 'pytest', '-sv', 'orttraining_test_orttrainer_frontend.py'], cwd=cwd)
run_subprocess([sys.executable, '-m', 'pytest', '-sv', 'orttraining_test_orttrainer_bert_toy_onnx.py'], cwd=cwd)
run_training_python_frontend_e2e_tests(cwd)
log.info("Running python frontend e2e tests.")
torch.cuda.device_count()
str(ngpus)
str(ngpus)
str(ngpus)
log.debug('RUN: mpirun -n {} {} orttraining_run_glue.py'.format(ngpus, sys.executable)
str(ngpus)
GPU (with CUDA_VISIBLE_DEVICES)
run_subprocess([sys.executable, 'onnxruntime_test_ort_trainer_with_mixed_precision.py'], cwd=cwd)
run_training_pipeline_e2e_tests(cwd)
log.info("Running pipeline e2e tests.")
torch.cuda.device_count()
str(ngpus)
join(pp_command)
log.debug('RUN: ' + command_str)
run_subprocess(pp_command, cwd=cwd)
str(ngpus)
join(pp_dp_command)
log.debug('RUN: ' + command_str)
run_subprocess(pp_dp_command, cwd=cwd)
run_onnxruntime_tests(args, source_dir, ctest_path, build_dir, configs)
log.info("Running tests for %s configuration", config)
get_config_build_dir(build_dir, config)
run_training_python_frontend_e2e_tests(cwd=cwd)
run_training_python_frontend_tests(cwd=cwd)
run_training_pipeline_e2e_tests(cwd=cwd)
run_android_tests(args, source_dir, config, cwd)
run_ios_tests(args, source_dir, config, cwd)
dll_path_list.append(os.path.join(args.tensorrt_home, 'lib')
dll_path_list.append(os.path.join(build_dir, config, "mklml", "src", "project_mklml", "lib")
is_windows()
dll_path_list.append(os.path.join(build_dir, config)
len(dll_path_list)
os.pathsep.join(dll_path_list)
os.path.join(source_dir, 'packages.config')
os.path.join(source_dir, 'NuGet.config')
os.path.join(cwd, config)
executables.append('onnxruntime_shared_lib_test.exe')
executables.append('onnxruntime_global_thread_pools_test.exe')
run_subprocess(ctest_cmd, cwd=cwd, dll_path=dll_path)
is_windows()
os.path.join(cwd, config)
run_subprocess([sys.executable, 'onnxruntime_test_python.py'], cwd=cwd, dll_path=dll_path)
log.info("Testing IOBinding feature")
run_subprocess([sys.executable, 'onnxruntime_test_python_iobinding.py'], cwd=cwd, dll_path=dll_path)
run_subprocess([sys.executable, 'onnxruntime_test_python_mlops.py'], cwd=cwd, dll_path=dll_path)
run_training_python_frontend_tests(cwd=cwd)
log.exception(error)
log.warning("onnx is not installed. The ONNX tests will be skipped.")